[MacRuby] #816: Assertion fails on multi-threaded code
#816: Assertion fails on multi-threaded code ------------------------------+--------------------------------------------- Reporter: mootoh@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- I tried the following simple multi-threaded code snippet on MacRuby 0.6 (release build, obtained from http://www.macruby.org/downloads.html, universal-darwin10.0, x86_64), and it aborted with following assertion: {{{ Assertion failed: ((b->flags & flags) == flags), function rb_vm_prepare_block, file dispatcher.cpp, line 1773. }}} Code snippet to reproduce this issue: {{{ N=2 M=1000000 def compute_intensive n r = 0 M.times do |i| M.times do |j| r = i * j + n end end r end threads = [] N.times do |i| th = Thread.new do compute_intensive i end threads.push th end threads.each { |thread| thread.join } }}} I tried both ruby 1.8.7 (2009-06-12 patchlevel 174) and ruby 1.9.2dev (2009-08-30 trunk 24718), and those produced no error. -- Ticket URL: <http://www.macruby.org/trac/ticket/816> MacRuby <http://macruby.org/>
#816: Assertion fails on multi-threaded code ------------------------------+--------------------------------------------- Reporter: mootoh@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------+--------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: I tried the snippet on trunk and it seems to work well. The program uses 170% of my mac book pro CPU which seems correct too. However, it takes quite a lot of time. Could you retry with trunk too and let us know if you find any trouble? (You can download a nightly build here: http://www.macruby.org/files/nightlies/). Thanks! -- Ticket URL: <http://www.macruby.org/trac/ticket/816#comment:1> MacRuby <http://macruby.org/>
#816: Assertion fails on multi-threaded code ------------------------------+--------------------------------------------- Reporter: mootoh@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------+--------------------------------------------- Comment(by mootoh@…): I tried it with the latest nightly build and found it works fine. Thank you for such a rapid answer. -- Ticket URL: <http://www.macruby.org/trac/ticket/816#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby