You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "James Abley (Created) (JIRA)" <ji...@apache.org> on 2011/10/04 13:00:35 UTC

[jira] [Created] (WW-3689) NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)

NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)
--------------------------------------------------------------------------------------------------------

                 Key: WW-3689
                 URL: https://issues.apache.org/jira/browse/WW-3689
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.2.3.1, 2.0.14
         Environment: Any; multi-core machines tend to demonstrate the problem more readily though.
            Reporter: James Abley


When running a load test, we intermittently see failures with this stack trace (the line numbers are for 2.0.14, but we also see this with 2.2.3.1):

{noformat}
Exception in thread "MultiThreadTestRunner-5" java.lang.NullPointerException
	at org.apache.struts2.config.Settings.get(Settings.java:175)
	at org.apache.struts2.config.Settings.getDefaultInstance(Settings.java:293)
	at org.apache.struts2.config.Settings.getInstance(Settings.java:109)
	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:67)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
	at com.example.platform.test.servlet.OurServlet.handleRequest(OurServlet.java:64)
{noformat}

or

{noformat}
Caused by: java.lang.NullPointerException
	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.loadSettings(LegacyPropertiesConfigurationProvider.java:86)
	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:69)
	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
{noformat}

Our suspicion is that the initialisation isn't thread-safe; we've not seen this failure on older, single-processor / single-core machines.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3689) NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)

Posted by "Lukasz Lenart (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162649#comment-13162649 ] 

Lukasz Lenart commented on WW-3689:
-----------------------------------

Did you test that patch with your environment ?
                
> NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3689
>                 URL: https://issues.apache.org/jira/browse/WW-3689
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14, 2.2.3.1
>         Environment: Any; multi-core machines tend to demonstrate the problem more readily though.
>            Reporter: James Abley
>         Attachments: WW-3689-locked-initialisation.patch
>
>
> When running a load test, we intermittently see failures with this stack trace (the line numbers are for 2.0.14, but we also see this with 2.2.3.1):
> {noformat}
> Exception in thread "MultiThreadTestRunner-5" java.lang.NullPointerException
> 	at org.apache.struts2.config.Settings.get(Settings.java:175)
> 	at org.apache.struts2.config.Settings.getDefaultInstance(Settings.java:293)
> 	at org.apache.struts2.config.Settings.getInstance(Settings.java:109)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:67)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> 	at com.example.platform.test.servlet.OurServlet.handleRequest(OurServlet.java:64)
> {noformat}
> or
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.loadSettings(LegacyPropertiesConfigurationProvider.java:86)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:69)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> {noformat}
> Our suspicion is that the initialisation isn't thread-safe; we've not seen this failure on older, single-processor / single-core machines.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (WW-3689) NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)

Posted by "James Abley (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120005#comment-13120005 ] 

James Abley edited comment on WW-3689 at 10/4/11 11:02 AM:
-----------------------------------------------------------

Candidate patch for locking around initialisation (made against trunk r1178753).
                
      was (Author: jabley):
    Candidate patch for locking around initialisation
                  
> NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3689
>                 URL: https://issues.apache.org/jira/browse/WW-3689
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14, 2.2.3.1
>         Environment: Any; multi-core machines tend to demonstrate the problem more readily though.
>            Reporter: James Abley
>         Attachments: WW-3689-locked-initialisation.patch
>
>
> When running a load test, we intermittently see failures with this stack trace (the line numbers are for 2.0.14, but we also see this with 2.2.3.1):
> {noformat}
> Exception in thread "MultiThreadTestRunner-5" java.lang.NullPointerException
> 	at org.apache.struts2.config.Settings.get(Settings.java:175)
> 	at org.apache.struts2.config.Settings.getDefaultInstance(Settings.java:293)
> 	at org.apache.struts2.config.Settings.getInstance(Settings.java:109)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:67)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> 	at com.example.platform.test.servlet.OurServlet.handleRequest(OurServlet.java:64)
> {noformat}
> or
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.loadSettings(LegacyPropertiesConfigurationProvider.java:86)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:69)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> {noformat}
> Our suspicion is that the initialisation isn't thread-safe; we've not seen this failure on older, single-processor / single-core machines.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3689) NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)

Posted by "Lukasz Lenart (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3689:
------------------------------

    Fix Version/s: 2.3.x
    
> NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3689
>                 URL: https://issues.apache.org/jira/browse/WW-3689
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14, 2.2.3.1
>         Environment: Any; multi-core machines tend to demonstrate the problem more readily though.
>            Reporter: James Abley
>             Fix For: 2.3.x
>
>         Attachments: WW-3689-locked-initialisation.patch
>
>
> When running a load test, we intermittently see failures with this stack trace (the line numbers are for 2.0.14, but we also see this with 2.2.3.1):
> {noformat}
> Exception in thread "MultiThreadTestRunner-5" java.lang.NullPointerException
> 	at org.apache.struts2.config.Settings.get(Settings.java:175)
> 	at org.apache.struts2.config.Settings.getDefaultInstance(Settings.java:293)
> 	at org.apache.struts2.config.Settings.getInstance(Settings.java:109)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:67)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> 	at com.example.platform.test.servlet.OurServlet.handleRequest(OurServlet.java:64)
> {noformat}
> or
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.loadSettings(LegacyPropertiesConfigurationProvider.java:86)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:69)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> {noformat}
> Our suspicion is that the initialisation isn't thread-safe; we've not seen this failure on older, single-processor / single-core machines.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3689) NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)

Posted by "James Abley (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Abley updated WW-3689:
----------------------------

    Attachment: WW-3689-locked-initialisation.patch

Candidate patch for locking around initialisation
                
> NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3689
>                 URL: https://issues.apache.org/jira/browse/WW-3689
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14, 2.2.3.1
>         Environment: Any; multi-core machines tend to demonstrate the problem more readily though.
>            Reporter: James Abley
>         Attachments: WW-3689-locked-initialisation.patch
>
>
> When running a load test, we intermittently see failures with this stack trace (the line numbers are for 2.0.14, but we also see this with 2.2.3.1):
> {noformat}
> Exception in thread "MultiThreadTestRunner-5" java.lang.NullPointerException
> 	at org.apache.struts2.config.Settings.get(Settings.java:175)
> 	at org.apache.struts2.config.Settings.getDefaultInstance(Settings.java:293)
> 	at org.apache.struts2.config.Settings.getInstance(Settings.java:109)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:67)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> 	at com.example.platform.test.servlet.OurServlet.handleRequest(OurServlet.java:64)
> {noformat}
> or
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.loadSettings(LegacyPropertiesConfigurationProvider.java:86)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:69)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> {noformat}
> Our suspicion is that the initialisation isn't thread-safe; we've not seen this failure on older, single-processor / single-core machines.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira