Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
LinkedTransferQueue.size() Liveness Hazard #6136
There appears to be an issue with the version of the JSR166 LinkedTransferQueue that ships with Scala 2.9.2 (also confirmed under 2.9.1) that can result in calls to LTQ.size() spinning infinitely and failing to return. This issue does not occur when using the latest version of LinkedTransferQueue in JSR166y.
We've run into this issue in production at Boundary a few times and finally sat down to reproduce it. Fortunately, it is very easy to trigger and has been fixed upstream in the JSR166 project.
Steps to reproduce in Scala 2.9.2:
Steps to demonstrate success with the latest version of JSR166:
If possible, I would recommend upgrading this package (or at least LinkedTransferQueue) to the latest available release of JSR166.
NB: This report and the following attachments can also be viewed as a Gist for your convenience: https://gist.github.com/3025111
Imported From: https://issues.scala-lang.org/browse/SI-6136?orig=1
C. Scott Andreas (cscotta) said (edited on Aug 16, 2012 8:08:25 PM UTC):
Here's the relevant section of the thread dump showing all of these threads caught in this state: https://gist.github.com/3373146
And here's a CPU graph for the past day as threads slowly became stuck in this state due to the bug: http://cl.ly/image/1l0l3Z342O3P
I see that this issue has been assigned as of two weeks ago, but has there been any movement? I'm happy to help if possible – and please let me know how I can. If not, we'll be moving off of the JSR-166 bundled with Scala and swapping deps for our OSS libraries shortly. This issue either needs to be fixed, or LTQ must replaced with the canonical JSR-166 implementation that does not exhibit this hazard.