From egor at technoparkcorp.com Mon Sep 10 05:51:43 2012 From: egor at technoparkcorp.com (Yegor Bugayenko) Date: Mon, 10 Sep 2012 14:51:43 +0200 Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? Message-ID: I already posted the question here: http://stackoverflow.com/questions/12349881 Could one of you guys take a look? Thanks! ? Yegor From iris.clark at oracle.com Mon Sep 10 11:00:21 2012 From: iris.clark at oracle.com (Iris Clark) Date: Mon, 10 Sep 2012 11:00:21 -0700 (PDT) Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? In-Reply-To: References: Message-ID: <88a1b522-8bac-4046-b038-ced3cb0f1d40@default> Forwarding to core-libs-dev. iris -----Original Message----- From: Yegor Bugayenko [mailto:egor at technoparkcorp.com] Sent: Monday, September 10, 2012 5:52 AM To: jdk7-dev at openjdk.java.net Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? I already posted the question here: http://stackoverflow.com/questions/12349881 Could one of you guys take a look? Thanks! - Yegor From david.holmes at oracle.com Mon Sep 10 17:44:38 2012 From: david.holmes at oracle.com (David Holmes) Date: Tue, 11 Sep 2012 10:44:38 +1000 Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? In-Reply-To: <88a1b522-8bac-4046-b038-ced3cb0f1d40@default> References: <88a1b522-8bac-4046-b038-ced3cb0f1d40@default> Message-ID: <504E8976.6010501@oracle.com> This kind of issue is better discussed, at least initially on Doug Lea's concurrency interest list: concurrency-interest at cs.oswego.edu The stack shows that it is the lock acquisition that is blocking indefinitely, not the poll itself. That is why it doesn't time out and why it hangs again immediately after you interrupt the thread. You need to see what is happening to other threads using this LBQ and whether one of them holds the lock and is itself "stuck" somewhere. You also need to see if there are any asynchronous exceptions involved (Thread.stop use, or StackOverflowException) as these can corrupt the internal state of an AbstractQueuedSynchronizer like ReentrantLock. David On 11/09/2012 4:00 AM, Iris Clark wrote: > Forwarding to core-libs-dev. > > iris > > -----Original Message----- > From: Yegor Bugayenko [mailto:egor at technoparkcorp.com] > Sent: Monday, September 10, 2012 5:52 AM > To: jdk7-dev at openjdk.java.net > Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? > > I already posted the question here: > http://stackoverflow.com/questions/12349881 > > Could one of you guys take a look? Thanks! > > - > Yegor From david.holmes at oracle.com Mon Sep 10 19:05:30 2012 From: david.holmes at oracle.com (David Holmes) Date: Tue, 11 Sep 2012 12:05:30 +1000 Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? In-Reply-To: References: <88a1b522-8bac-4046-b038-ced3cb0f1d40@default> <504E8976.6010501@oracle.com> Message-ID: <504E9C6A.7070407@oracle.com> On 11/09/2012 11:43 AM, Vitaly Davidovich wrote: > Symptoms here are eerily similar to > http://bugs.sun.com/view_bug.do?bug_id=6822370, hence I'm curious if it > still repros with -XX:+UseMembar. Always an interesting question to ask but 6822370 was fixed in 7 and this is reported in 7u5. We really need a way to reproduce this, and see what all the other threads are doing with respect to this queue. David > > Sent from my phone > > On Sep 10, 2012 8:45 PM, "David Holmes" > wrote: > > This kind of issue is better discussed, at least initially on Doug > Lea's concurrency interest list: > concurrency-interest at cs.__oswego.edu > > > The stack shows that it is the lock acquisition that is blocking > indefinitely, not the poll itself. That is why it doesn't time out > and why it hangs again immediately after you interrupt the thread. > > You need to see what is happening to other threads using this LBQ > and whether one of them holds the lock and is itself "stuck" > somewhere. You also need to see if there are any asynchronous > exceptions involved (Thread.stop use, or StackOverflowException) as > these can corrupt the internal state of an > AbstractQueuedSynchronizer like ReentrantLock. > > David > > On 11/09/2012 4:00 AM, Iris Clark wrote: > > Forwarding to core-libs-dev. > > iris > > -----Original Message----- > From: Yegor Bugayenko [mailto:egor at technoparkcorp.__com > ] > Sent: Monday, September 10, 2012 5:52 AM > To: jdk7-dev at openjdk.java.net > Subject: why LinkedBlockingQueue#poll(int, TimeUnit) is hanging up? > > I already posted the question here: > http://stackoverflow.com/__questions/12349881 > > > Could one of you guys take a look? Thanks! > > - > Yegor >