Issue #6634 has been updated by L Nicoara.


L Nicoara wrote:
> nhm tanveeer hossain khan wrote:
> > Hi there,
> > 
> > I've faced similar problem with ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.1.0] (installed with rvm)
> 
> Hey, I have the same problem. I took the test case you posted, reduced it further, and fiddled with the numbers of threads, etc. See attached. It crashed reliably for me, always right after launching it. 
> 

For the record, the test case is malformed. Bummer. I think the one I based it on (from khan) is malformed as well. My apologies if you spent time on it.

----------------------------------------
Bug #6634: Deadlock with join and ConditionVariable
https://bugs.ruby-lang.org/issues/6634#change-46482

* Author: meh. I don't care
* Status: Rejected
* Priority: Normal
* Assignee: Yusuke Endoh
* Category: core
* Target version: 2.0.0
* ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
* Backport: 
----------------------------------------
I'm getting a fatal deadlock in one of my gems, it's a simple threadpool implementation.

The library works both in Rubinius and JRuby, so I guess it's a bug.

The gem is here: https://github.com/meh/ruby-threadpool

The example that crashes is attached.

Basically it raises a fatal deadlock if you join a thread and then call ConditionVariable#wait, I'm not 100% sure if the bug is in the ConditionVariable or what, all I know is that it happens in that situation and that it works on Rubinius and JRuby.

---Files--------------------------------
lol.rb (134 Bytes)
noname (500 Bytes)
reduced.rb (170 Bytes)
lol2.rb (189 Bytes)
thread_deadlock_error_test.rb (1.47 KB)
t.rb (996 Bytes)


-- 
https://bugs.ruby-lang.org/