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" <as...@wso2.com> on 2007/01/25 09:36:22 UTC

ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts()

Hi

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.. does this sound like 
a bug to open a JIRA?

thanks
asankha

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)

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


Re: ConcurrentModificationException thrown by DefaultConnectingIOReactor.processTimeouts()

Posted by Oleg Kalnichevski <ol...@apache.org>.
Asankha C. Perera wrote:
> Hi
>
> 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.. does 
> this sound like a bug to open a JIRA?
>
> thanks
> asankha
>
Hi Asankha

This is obviously a bug. Please open a Jira ticket for it and I will try 
to come up with a fix tonight

Oleg


> 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)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> httpcomponents-dev-help@jakarta.apache.org
>
>


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