Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpClientLoadTest.testConcurrent() reports connection leaking #2814

Closed
sbordet opened this issue Aug 16, 2018 · 3 comments
Closed

HttpClientLoadTest.testConcurrent() reports connection leaking #2814

sbordet opened this issue Aug 16, 2018 · 3 comments

Comments

@sbordet
Copy link
Contributor

sbordet commented Aug 16, 2018

2018-08-16 12:18:03.380:INFO:oejc.LeakTrackingConnectionPool:ForkJoinPool.commonPool-worker-6: Connection HttpConnectionOverHTTP@3f1b1089::SocketChannelEndPoint@60c6d021{localhost/127.0.0.1:35239<->/127.0.0.1:53846,OPEN,fill=FI,flush=-,to=2699/0}{io=1/1,kio=1,kro=1}->HttpConnectionOverHTTP@3f1b1089(l:/127.0.0.1:53846 <-> r:localhost/127.0.0.1:35239,closed=false)=>HttpChannelOverHTTP@3200749c(exchange=null)[send=HttpSenderOverHTTP@46e8bc5e(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@21107352{s=START}],recv=HttpReceiverOverHTTP@7701e889(rsp=IDLE,failure=null)[HttpParser{s=START,0 of -1}]]@1058738313 not tracked
2018-08-16 12:18:03.381:INFO:oejc.LeakTrackingConnectionPool:client-49: Connection HttpConnectionOverHTTP@3f1b1089::SocketChannelEndPoint@60c6d021{localhost/127.0.0.1:35239<->/127.0.0.1:53846,OPEN,fill=-,flush=-,to=0/0}{io=1/0,kio=1,kro=1}->HttpConnectionOverHTTP@3f1b1089(l:/127.0.0.1:53846 <-> r:localhost/127.0.0.1:35239,closed=false)=>HttpChannelOverHTTP@3200749c(exchange=null)[send=HttpSenderOverHTTP@46e8bc5e(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@21107352{s=START}],recv=HttpReceiverOverHTTP@7701e889(rsp=IDLE,failure=null)[HttpParser{s=START,0 of -1}]]@1058738313 released but not acquired
@sbordet
Copy link
Contributor Author

sbordet commented Aug 16, 2018

This is due to the fact that the active(Connection) and released(Connection) methods are called outside synchronized blocks.

Thread1 releases connectionA, which is now put in idleConnections, but released(Connection) is not called yet; thread2 acquires a connection, finds connectionA in idleConnections calls active(Connection) and the leak detector thinks there has been a double acquire without release, but in fact the release happened correctly.

The thread safety needs to be reviewed.

@stale
Copy link

stale bot commented Nov 20, 2019

This issue has been automatically marked as stale because it has been a full year without activit. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale For auto-closed stale issues and pull requests label Nov 20, 2019
@joakime
Copy link
Contributor

joakime commented Nov 20, 2019

Closing, the last 5 builds on CI (jobs 1323 thru 1327) do not show this leak anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants