hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Julien (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-741) AbstractClientConnAdapter prone to concurrency issues
Date Tue, 01 Apr 2008 18:38:24 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584243#action_12584243
] 

Tim Julien commented on HTTPCLIENT-741:
---------------------------------------

(working with Sam)
Yes, we no longer see the first two, I think. Still seeing the third, as well as one I've
inserted below. I've done some digging and I have a patch I'll attach. Basically, in the recent
concurrency fixes a change was made to AbstractClientConnAdapter - its state is now marked
as volatile. I think the volatile marking needs to also be done in its subclasses, and classes
used in the subclasses:

1) AbstractPooledConnAdapter
2) AbstractPoolEntry

java.lang.IllegalStateException: Connection already open.
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:131)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    at org.apache.http.impl.client.DefaultClientRequestDirector.execute(DefaultClientRequestDirector.java:314)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:500)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:455)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:421)
    at com.limegroup.gnutella.http.DefaultHttpExecutor.performRequest(DefaultHttpExecutor.java:97)
    at com.limegroup.gnutella.http.DefaultHttpExecutor.access$000(DefaultHttpExecutor.java:26)
    at com.limegroup.gnutella.http.DefaultHttpExecutor$MultiRequestor.run(DefaultHttpExecutor.java:135)
    at org.limewire.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1006)
    at org.limewire.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:549)
    at java.lang.Thread.run(Unknown Source)

> AbstractClientConnAdapter prone to concurrency issues
> -----------------------------------------------------
>
>                 Key: HTTPCLIENT-741
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-741
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 4.0 Alpha 2
>            Reporter: Oleg Kalnichevski
>            Priority: Critical
>             Fix For: 4.0 Alpha 3
>
>
> AbstractClientConnAdapter is currently prone to all sorts of concurrency issues. (1)
Access to internal state is not properry synchronized making the class prone  to race conditions.
Presently none of the instance variables is even declared volatile. (2) AbstractClientConnAdapter
treats aborted connection as one in an illegal state, which is not quite right.
> Oleg

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


Mime
View raw message