You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Anders Wallgren (JIRA)" <ji...@apache.org> on 2007/03/06 08:23:24 UTC

[jira] Created: (HTTPCORE-54) NPE during DefaultConnectingIOReactor.shutdown

NPE during DefaultConnectingIOReactor.shutdown
----------------------------------------------

                 Key: HTTPCORE-54
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-54
             Project: HttpComponents Core
          Issue Type: Bug
          Components: HttpCore NIO
            Reporter: Anders Wallgren


java.lang.NullPointerException 
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.stopWorkers(AbstractMultiworkerIOReactor.java:91)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.shutdown(DefaultConnectingIOReactor.java:279)
at com.electriccloud.commander.agent.AgentManager.onStop(AgentManager.java:203)
at com.electriccloud.util.FailsafeRunnable.stop(FailsafeRunnable.java:154)
at com.electriccloud.commander.agent.AgentManagerTest.tearDown(AgentManagerTest.java:329)

It's possible that shutdown was called twice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-54) NPE during DefaultConnectingIOReactor.shutdown

Posted by "Anders Wallgren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478879 ] 

Anders Wallgren commented on HTTPCORE-54:
-----------------------------------------

Just updated and ran through a few test runs -- haven't seen this since.

> NPE during DefaultConnectingIOReactor.shutdown
> ----------------------------------------------
>
>                 Key: HTTPCORE-54
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-54
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Anders Wallgren
>             Fix For: 4.0-alpha4
>
>
> java.lang.NullPointerException 
> at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.stopWorkers(AbstractMultiworkerIOReactor.java:91)
> at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.shutdown(DefaultConnectingIOReactor.java:279)
> at com.electriccloud.commander.agent.AgentManager.onStop(AgentManager.java:203)
> at com.electriccloud.util.FailsafeRunnable.stop(FailsafeRunnable.java:154)
> at com.electriccloud.commander.agent.AgentManagerTest.tearDown(AgentManagerTest.java:329)
> It's possible that shutdown was called twice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Updated: (HTTPCORE-54) NPE during DefaultConnectingIOReactor.shutdown

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCORE-54:
--------------------------------------

    Fix Version/s: 4.0-alpha4

Anders,

I think what happens here is that the I/O reactor gets shut down before all of its worker threads and I/O dispatchers are fully initialized. This is a legitimate scenario, so we have to make AbstractMultiworkerIOReactor capable of shutting itself down even in a partially initialized state.

Oleg

> NPE during DefaultConnectingIOReactor.shutdown
> ----------------------------------------------
>
>                 Key: HTTPCORE-54
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-54
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Anders Wallgren
>             Fix For: 4.0-alpha4
>
>
> java.lang.NullPointerException 
> at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.stopWorkers(AbstractMultiworkerIOReactor.java:91)
> at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.shutdown(DefaultConnectingIOReactor.java:279)
> at com.electriccloud.commander.agent.AgentManager.onStop(AgentManager.java:203)
> at com.electriccloud.util.FailsafeRunnable.stop(FailsafeRunnable.java:154)
> at com.electriccloud.commander.agent.AgentManagerTest.tearDown(AgentManagerTest.java:329)
> It's possible that shutdown was called twice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Resolved: (HTTPCORE-54) NPE during DefaultConnectingIOReactor.shutdown

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-54.
---------------------------------------

    Resolution: Fixed

Anders,

I submitted a fix for this issue. Please review. If you find the solution unsatisfactory, please re-open the issue.

Oleg

> NPE during DefaultConnectingIOReactor.shutdown
> ----------------------------------------------
>
>                 Key: HTTPCORE-54
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-54
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Anders Wallgren
>             Fix For: 4.0-alpha4
>
>
> java.lang.NullPointerException 
> at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.stopWorkers(AbstractMultiworkerIOReactor.java:91)
> at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.shutdown(DefaultConnectingIOReactor.java:279)
> at com.electriccloud.commander.agent.AgentManager.onStop(AgentManager.java:203)
> at com.electriccloud.util.FailsafeRunnable.stop(FailsafeRunnable.java:154)
> at com.electriccloud.commander.agent.AgentManagerTest.tearDown(AgentManagerTest.java:329)
> It's possible that shutdown was called twice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-54) NPE during DefaultConnectingIOReactor.shutdown

Posted by "Anders Wallgren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478312 ] 

Anders Wallgren commented on HTTPCORE-54:
-----------------------------------------

Any chance this is a visibility issue?  Naturally, I call shutdown() from a different thread than execute().  While the threads member is final and allocate in the constructor, the threads are not allocated until execute() is called.

Is there any synchronization that guarantees that the contents of the threads member will be visible?

> NPE during DefaultConnectingIOReactor.shutdown
> ----------------------------------------------
>
>                 Key: HTTPCORE-54
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-54
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Anders Wallgren
>
> java.lang.NullPointerException 
> at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.stopWorkers(AbstractMultiworkerIOReactor.java:91)
> at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.shutdown(DefaultConnectingIOReactor.java:279)
> at com.electriccloud.commander.agent.AgentManager.onStop(AgentManager.java:203)
> at com.electriccloud.util.FailsafeRunnable.stop(FailsafeRunnable.java:154)
> at com.electriccloud.commander.agent.AgentManagerTest.tearDown(AgentManagerTest.java:329)
> It's possible that shutdown was called twice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org