You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2013/05/28 10:57:20 UTC

[jira] [Resolved] (HTTPASYNC-41) Possible Multithreading issue (when used with Akka?)

     [ https://issues.apache.org/jira/browse/HTTPASYNC-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPASYNC-41.
----------------------------------------

    Resolution: Cannot Reproduce
    
> Possible Multithreading issue (when used with Akka?)
> ----------------------------------------------------
>
>                 Key: HTTPASYNC-41
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-41
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0-beta4
>         Environment: Linux
>            Reporter: Joshua Andrews
>            Priority: Minor
>
> I'm not sure if this a bug or just me doing something wrong.
> I have actor instances, that execute a request with a future for setting some state - real simple stuff. It works great when I have 1 Session, but as soon as I add another this happens.
> session starting
> session starting
> ERROR [org.apache.http.impl.nio.client.InternalHttpAsyncClient] I/O reactor terminated abnormally
> java.lang.IllegalStateException: Illegal state ACTIVE
>         at org.apache.http.util.Asserts.check(Asserts.java:40)
>         at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:316)
>         at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:169)
>         at org.apache.http.impl.nio.client.InternalHttpAsyncClient.doExecute(InternalHttpAsyncClient.java:101)
>         at org.apache.http.impl.nio.client.InternalHttpAsyncClient.access$000(InternalHttpAsyncClient.java:56)
>         at org.apache.http.impl.nio.client.InternalHttpAsyncClient$1.run(InternalHttpAsyncClient.java:91)
> ERROR [actors.Session] Request cannot be executed; I/O reactor status: SHUT_DOWN
> java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: SHUT_DOWN
>         at org.apache.http.util.Asserts.check(Asserts.java:40)
>         at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:171)
>         at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:63)
>         at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:93)
>         at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:78)
>         at actors.FutureBridge$.bridge(bridge.scala:137)
>         at actors.AsyncClient.POSTPayload(bridge.scala:296)
>         at engines.MobileHelper$.getAuthToken(MobileHelper.scala:26)
>         at actors.Session$$anonfun$receive$1.applyOrElse(Session.scala:92)
>         at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425)
>         at akka.actor.ActorCell.invoke(ActorCell.scala:386)
>         at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230)
>         at akka.dispatch.Mailbox.run(Mailbox.scala:212)
>         at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506)
>         at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262)
>         at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
>         at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478)
>         at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
> Each actor creates its own instance of my actors.AsyncClient, which is basically just a wrapper around the apache client, and maps Java futures to akka futures, it does not support shutdown of the client at all.
> Any advice on how to debug this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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