You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera (JIRA)" <ji...@apache.org> on 2007/01/25 10:23:49 UTC

[jira] Created: (HTTPCORE-31) ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used

ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used
---------------------------------------------------------------------------------------------------------------------

                 Key: HTTPCORE-31
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-31
             Project: HttpComponents Core
          Issue Type: Bug
          Components: HttpCore NIO
    Affects Versions: 4.0-alpha4
            Reporter: Asankha C. Perera


I am seeing a ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when a load test is being performed. The Javadocs for the Selector.keys() states that the returned Set is not directly modifiable, but a key is removed only after it has been cancelled and its channel deregistered. I have started the DefaultConnectingIOReactor with two worker nodes

Exception in thread "HttpCoreNIOSender" java.util.ConcurrentModificationException
       at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
       at java.util.HashMap$KeyIterator.next(HashMap.java:877)
       at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
       at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:151)
       at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.execute(DefaultConnectingIOReactor.java:92)
       at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:103)
       at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:57)
       at org.apache.axis2.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:80)
       at java.lang.Thread.run(Thread.java:595)

-- 
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-31) ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467326 ] 

Asankha C. Perera commented on HTTPCORE-31:
-------------------------------------------

Oleg
I updated my codebase just now but didnt get the HTTPCORE-28 patched code - neither am I able to apply the patch attached to the JIRA to my local code to verify if the issue gets fixed. I would be glad to help in to verify this once the above is updated in the code / or with the new weekly build you may place on the maven2 repo

asankha

> ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-31
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-31
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha4
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>
> I am seeing a ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when a load test is being performed. The Javadocs for the Selector.keys() states that the returned Set is not directly modifiable, but a key is removed only after it has been cancelled and its channel deregistered. I have started the DefaultConnectingIOReactor with two worker nodes
> Exception in thread "HttpCoreNIOSender" java.util.ConcurrentModificationException
>        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
>        at java.util.HashMap$KeyIterator.next(HashMap.java:877)
>        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:151)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.execute(DefaultConnectingIOReactor.java:92)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:103)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:57)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:80)
>        at java.lang.Thread.run(Thread.java:595)

-- 
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-31) ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used

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

Oleg Kalnichevski resolved HTTPCORE-31.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0-alpha4

Asankha,

I am reasonably sure HTTPCORE-28 fixed the problem. There have also been a number of other fixes and improvements in HttpCore NIO. I am going to update the snapshots in the coming days and submit a patch for Synapse to fix any API breakage.

Oleg

> ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-31
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-31
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha4
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>             Fix For: 4.0-alpha4
>
>
> I am seeing a ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when a load test is being performed. The Javadocs for the Selector.keys() states that the returned Set is not directly modifiable, but a key is removed only after it has been cancelled and its channel deregistered. I have started the DefaultConnectingIOReactor with two worker nodes
> Exception in thread "HttpCoreNIOSender" java.util.ConcurrentModificationException
>        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
>        at java.util.HashMap$KeyIterator.next(HashMap.java:877)
>        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:151)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.execute(DefaultConnectingIOReactor.java:92)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:103)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:57)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:80)
>        at java.lang.Thread.run(Thread.java:595)

-- 
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] Assigned: (HTTPCORE-31) ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used

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

Oleg Kalnichevski reassigned HTTPCORE-31:
-----------------------------------------

    Assignee: Oleg Kalnichevski

Asankha,
It can well be that HTTPCORE-28 also fixed this bug, as I am currently unable to reproduce the problem. I'll be adding more test coverage for the NIO extensions in the coming days and hopefully there will be enough evidence that the bug is gone.

Oleg

> ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-31
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-31
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha4
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>
> I am seeing a ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when a load test is being performed. The Javadocs for the Selector.keys() states that the returned Set is not directly modifiable, but a key is removed only after it has been cancelled and its channel deregistered. I have started the DefaultConnectingIOReactor with two worker nodes
> Exception in thread "HttpCoreNIOSender" java.util.ConcurrentModificationException
>        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
>        at java.util.HashMap$KeyIterator.next(HashMap.java:877)
>        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:151)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.execute(DefaultConnectingIOReactor.java:92)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:103)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:57)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:80)
>        at java.lang.Thread.run(Thread.java:595)

-- 
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-31) ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468737 ] 

Asankha C. Perera commented on HTTPCORE-31:
-------------------------------------------

Oleg

The latest snapshots have indeed seem to have fixed this... 

many thanks
asankha

> ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-31
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-31
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha4
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>             Fix For: 4.0-alpha4
>
>
> I am seeing a ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when a load test is being performed. The Javadocs for the Selector.keys() states that the returned Set is not directly modifiable, but a key is removed only after it has been cancelled and its channel deregistered. I have started the DefaultConnectingIOReactor with two worker nodes
> Exception in thread "HttpCoreNIOSender" java.util.ConcurrentModificationException
>        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
>        at java.util.HashMap$KeyIterator.next(HashMap.java:877)
>        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:151)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.execute(DefaultConnectingIOReactor.java:92)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:103)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:57)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:80)
>        at java.lang.Thread.run(Thread.java:595)

-- 
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-31) ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used

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

Oleg Kalnichevski commented on HTTPCORE-31:
-------------------------------------------

Asankha,

I am pretty sure the fix for HTTPCORE-28 is in the SVN trunk (see rev 499577 [1]). I have not updated the snapshots in the maven2 repository primarily to not break Synapse code, as there have been some minor API changes. I wanted to hold this off until I manage to get better coverage for the client side code. Please let me know if you want me to go ahead and publish newest snapshots?

Oleg

[1] http://svn.apache.org/viewvc?view=rev&revision=499577

> ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when 2 worker threads are used
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-31
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-31
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha4
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>
> I am seeing a ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts() when a load test is being performed. The Javadocs for the Selector.keys() states that the returned Set is not directly modifiable, but a key is removed only after it has been cancelled and its channel deregistered. I have started the DefaultConnectingIOReactor with two worker nodes
> Exception in thread "HttpCoreNIOSender" java.util.ConcurrentModificationException
>        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
>        at java.util.HashMap$KeyIterator.next(HashMap.java:877)
>        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:151)
>        at org.apache.http.nio.impl.reactor.DefaultConnectingIOReactor.execute(DefaultConnectingIOReactor.java:92)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:103)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:57)
>        at org.apache.axis2.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:80)
>        at java.lang.Thread.run(Thread.java:595)

-- 
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