[MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError)
MacRuby
ruby-noreply at macosforge.org
Sat Jan 15 07:33:14 PST 2011
#542: Attempt to unlock a mutex which is not locked (ThreadError)
-------------------------------------+--------------------------------------
Reporter: valerii.hiora@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone: MacRuby 1.0
Component: MacRuby | Keywords:
-------------------------------------+--------------------------------------
Comment(by jhemmelg@…):
I think I have a possible reduction for this problem. I was prototyping
some thread code for work and tried it out on macruby version 0.8. It
acts like a race condition. Mostly it manifests with the error about
unlocking an unlocked mutex, but I have had it end up with the mutex
locked and the threads blocked. Here is a sample of running the script:
{{{
$ macruby testThreadComm.rb
0
^C
$ macruby testThreadComm.rb
0
1251879
2504224
3709045
5051891
6291455
7625310
8934016
$ macruby testThreadComm.rb
0
1315628
2659968
3938967
testThreadComm.rb:62:in `<main>': Attempt to unlock a mutex which is not
locked (ThreadError)
}}}
The first time the program locked up and I had to kill it. I assume the
mutex was locked, blocking progress on either thread. The second
invocation is a clean run, and the third ends with the mutex being
unlocked when it shouldn't be. Most of the time it completes without a
problem.
--
Ticket URL: <http://www.macruby.org/trac/ticket/542#comment:3>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list