[MacRuby] #1435: GC crashing when trying to free a regex currently in use
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I have scores of crash reports now where the problem originates from the GC thread. The top of the backtrace always looks the same: ``` Thread 1 Crashed:: Dispatch queue: Garbage Collection Work Queue 0 ??? 0x00007fff7b51f930 typeinfo for icu::UVector + 0 1 libicucore.A.dylib 0x00007fff8cad159c icu::RegexPattern::~RegexPattern() + 30 2 libicucore.A.dylib 0x00007fff8cb10632 0x7fff8c9c0000 + 1377842 3 libicucore.A.dylib 0x00007fff8cb10779 uregex_close + 40 4 libmacruby.dylib 0x00000001000baf44 rb_char_to_icu_option + 564 5 libobjc.A.dylib 0x00007fff959fb57c finalizeOneObject + 53 6 libauto.dylib 0x00007fff946de07e Auto::foreach_block_do(auto_zone_cursor*, void (*)(void*, void*), void*) + 94 7 libobjc.A.dylib 0x00007fff959fb4ac batchFinalize + 53 8 libauto.dylib 0x00007fff946de019 Auto::Zone::invalidate_garbage(unsigned long, void**) + 73 9 libauto.dylib 0x00007fff946f19db __finalize_local_garbage_later_block_invoke_0 + 59 10 libdispatch.dylib 0x00007fff8fbc48ba _dispatch_call_block_and_release + 18 11 libdispatch.dylib 0x00007fff8fbc610a _dispatch_queue_drain + 264 12 libdispatch.dylib 0x00007fff8fbc5f66 _dispatch_queue_invoke + 54 13 libdispatch.dylib 0x00007fff8fbc5760 _dispatch_worker_thread2 + 198 14 libsystem_c.dylib 0x00007fff8e6bc3da _pthread_wqthread + 316 15 libsystem_c.dylib 0x00007fff8e6bdb85 start_wqthread + 13 ``` This happens when I build myself or when I use a nightly build. It has been happening for a while now, I'm not sure exactly how long since I only started using MacRuby regularly a again recently. I get this crash when running my AXElements gem, but seems to happen a lot more often if I also run Rspec (2.6, the latest version doesn't run on MacRuby). I'm not sure of any other way to cause the bug. If you want full crash reports, just ask. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): ``` Thread 1 Crashed:: Dispatch queue: Garbage Collection Work Queue 0 ??? 0x00007fff7b51f930 typeinfo for icu::UVector + 0 1 libicucore.A.dylib 0x00007fff8cad159c icu::RegexPattern::~RegexPattern() + 30 2 libicucore.A.dylib 0x00007fff8cb10632 0x7fff8c9c0000 + 1377842 3 libicucore.A.dylib 0x00007fff8cb10779 uregex_close + 40 4 libmacruby.dylib 0x00000001000baf44 rb_char_to_icu_option + 564 5 libobjc.A.dylib 0x00007fff959fb57c finalizeOneObject + 53 6 libauto.dylib 0x00007fff946de07e Auto::foreach_block_do(auto_zone_cursor*, void (*)(void*, void*), void*) + 94 7 libobjc.A.dylib 0x00007fff959fb4ac batchFinalize + 53 8 libauto.dylib 0x00007fff946de019 Auto::Zone::invalidate_garbage(unsigned long, void**) + 73 9 libauto.dylib 0x00007fff946f19db __finalize_local_garbage_later_block_invoke_0 + 59 10 libdispatch.dylib 0x00007fff8fbc48ba _dispatch_call_block_and_release + 18 11 libdispatch.dylib 0x00007fff8fbc610a _dispatch_queue_drain + 264 12 libdispatch.dylib 0x00007fff8fbc5f66 _dispatch_queue_invoke + 54 13 libdispatch.dylib 0x00007fff8fbc5760 _dispatch_worker_thread2 + 198 14 libsystem_c.dylib 0x00007fff8e6bc3da _pthread_wqthread + 316 15 libsystem_c.dylib 0x00007fff8e6bdb85 start_wqthread + 13 ``` Better formatting.... -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:1> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Ok, well, I can't edit comments, so I'll just leave it now. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:2> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Description changed by watson1978@…: Old description:
I have scores of crash reports now where the problem originates from the GC thread. The top of the backtrace always looks the same:
``` Thread 1 Crashed:: Dispatch queue: Garbage Collection Work Queue 0 ??? 0x00007fff7b51f930 typeinfo for icu::UVector + 0 1 libicucore.A.dylib 0x00007fff8cad159c icu::RegexPattern::~RegexPattern() + 30 2 libicucore.A.dylib 0x00007fff8cb10632 0x7fff8c9c0000 + 1377842 3 libicucore.A.dylib 0x00007fff8cb10779 uregex_close + 40 4 libmacruby.dylib 0x00000001000baf44 rb_char_to_icu_option + 564 5 libobjc.A.dylib 0x00007fff959fb57c finalizeOneObject + 53 6 libauto.dylib 0x00007fff946de07e Auto::foreach_block_do(auto_zone_cursor*, void (*)(void*, void*), void*) + 94 7 libobjc.A.dylib 0x00007fff959fb4ac batchFinalize + 53 8 libauto.dylib 0x00007fff946de019 Auto::Zone::invalidate_garbage(unsigned long, void**) + 73 9 libauto.dylib 0x00007fff946f19db __finalize_local_garbage_later_block_invoke_0 + 59 10 libdispatch.dylib 0x00007fff8fbc48ba _dispatch_call_block_and_release + 18 11 libdispatch.dylib 0x00007fff8fbc610a _dispatch_queue_drain + 264 12 libdispatch.dylib 0x00007fff8fbc5f66 _dispatch_queue_invoke + 54 13 libdispatch.dylib 0x00007fff8fbc5760 _dispatch_worker_thread2 + 198 14 libsystem_c.dylib 0x00007fff8e6bc3da _pthread_wqthread + 316 15 libsystem_c.dylib 0x00007fff8e6bdb85 start_wqthread + 13 ```
This happens when I build myself or when I use a nightly build. It has been happening for a while now, I'm not sure exactly how long since I only started using MacRuby regularly a again recently.
I get this crash when running my AXElements gem, but seems to happen a lot more often if I also run Rspec (2.6, the latest version doesn't run on MacRuby). I'm not sure of any other way to cause the bug.
If you want full crash reports, just ask.
New description: I have scores of crash reports now where the problem originates from the GC thread. The top of the backtrace always looks the same: {{{ Thread 1 Crashed:: Dispatch queue: Garbage Collection Work Queue 0 ??? 0x00007fff7b51f930 typeinfo for icu::UVector + 0 1 libicucore.A.dylib 0x00007fff8cad159c icu::RegexPattern::~RegexPattern() + 30 2 libicucore.A.dylib 0x00007fff8cb10632 0x7fff8c9c0000 + 1377842 3 libicucore.A.dylib 0x00007fff8cb10779 uregex_close + 40 4 libmacruby.dylib 0x00000001000baf44 rb_char_to_icu_option + 564 5 libobjc.A.dylib 0x00007fff959fb57c finalizeOneObject + 53 6 libauto.dylib 0x00007fff946de07e Auto::foreach_block_do(auto_zone_cursor*, void (*)(void*, void*), void*) + 94 7 libobjc.A.dylib 0x00007fff959fb4ac batchFinalize + 53 8 libauto.dylib 0x00007fff946de019 Auto::Zone::invalidate_garbage(unsigned long, void**) + 73 9 libauto.dylib 0x00007fff946f19db __finalize_local_garbage_later_block_invoke_0 + 59 10 libdispatch.dylib 0x00007fff8fbc48ba _dispatch_call_block_and_release + 18 11 libdispatch.dylib 0x00007fff8fbc610a _dispatch_queue_drain + 264 12 libdispatch.dylib 0x00007fff8fbc5f66 _dispatch_queue_invoke + 54 13 libdispatch.dylib 0x00007fff8fbc5760 _dispatch_worker_thread2 + 198 14 libsystem_c.dylib 0x00007fff8e6bc3da _pthread_wqthread + 316 15 libsystem_c.dylib 0x00007fff8e6bdb85 start_wqthread + 13 }}} This happens when I build myself or when I use a nightly build. It has been happening for a while now, I'm not sure exactly how long since I only started using MacRuby regularly a again recently. I get this crash when running my AXElements gem, but seems to happen a lot more often if I also run Rspec (2.6, the latest version doesn't run on MacRuby). I'm not sure of any other way to cause the bug. If you want full crash reports, just ask. -- -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:3> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): I want to know how to get crash report. [[BR]] Can I get it when run AXElements's test code or sample? [[BR]] and, which should I use AXElements version? -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:4> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): You can get crashes running the test suite. For me the test suite crashes approximately 1 out of every 15 times I run it. But, I do not think any of those crashes have ever been the one I am reporting here. Let me check... -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:5> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Ok, I got a few types of crashes, some are my fault, some I don't know who's fault is, and a couple are crashing in the GC thread. I went back to commit d04165b4b298e26ec425 to run the test suite as master has a disabled test suite. I think I will have to reduce a test script from work to demonstrate this bug. I will do that tomorrow. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:6> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): I have found that using AXElements from the master branch, I can get a GC crash in irb like so: {{{ [mrada@ferrous] /Users/mrada/Developer/AXElements ⌘ master✗ ± rake console (in /Users/mrada/Developer/AXElements) irb -Ilib -Iext -rubygems -rax_elements irb(main):001:0> app = Accessibility.application_with_name 'Finder' => #<AX::Application 4 children focused[✘] pid=170> irb(main):002:0> 10_000_000.times { puts app.main_window.children.map &:inspect } }}} It crashes in a few seconds when I do that. Also with Adium. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:7> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Hmmm, so I do not get the crash if I use the nightly build instead of building myself. I'm building from LLVM 2.9 release instead of specific revision listed in the README. I wonder if that has something to do with it. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:8> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): I think more better for repro that use GC.start: {{{ $ macirb --simple -Ilib -Iext -rubygems -rax_elements
app = Accessibility.application_with_name 'Finder' => #<AX::Application 4 children focused[✘] pid=159> 10_000_000.times { puts app.main_window.children.map &:inspect; GC.start } }}}
-- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:9> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Hmm, still only have the crash with MacRuby that I build myself using LLVM 2.9. I have noticed that the backtrace is a little different than the one originally reported: {{{ Thread 2 Crashed:: Dispatch queue: Garbage Collection Work Queue 0 ??? 0x00007fff71fa6930 typeinfo for icu::UVector + 0 1 libicucore.A.dylib 0x00007fff891604cb icu::RegexPattern::zap() + 71 2 libicucore.A.dylib 0x00007fff8916059c icu::RegexPattern::~RegexPattern() + 30 3 libicucore.A.dylib 0x00007fff8919f632 0x7fff8904f000 + 1377842 4 libicucore.A.dylib 0x00007fff8919f779 uregex_close + 40 5 libmacruby.dylib 0x0000000108e7ba0e 0x108de9000 + 600590 6 libobjc.A.dylib 0x00007fff8407357c finalizeOneObject + 53 7 libauto.dylib 0x00007fff8402707e Auto::foreach_block_do(auto_zone_cursor*, void (*)(void*, void*), void*) + 94 8 libobjc.A.dylib 0x00007fff840734ac batchFinalize + 53 9 libauto.dylib 0x00007fff84027019 Auto::Zone::invalidate_garbage(unsigned long, void**) + 73 10 libauto.dylib 0x00007fff8403a9db __finalize_local_garbage_later_block_invoke_0 + 59 11 libdispatch.dylib 0x00007fff8a2038ba _dispatch_call_block_and_release + 18 12 libdispatch.dylib 0x00007fff8a20510a _dispatch_queue_drain + 264 13 libdispatch.dylib 0x00007fff8a204f66 _dispatch_queue_invoke + 54 14 libdispatch.dylib 0x00007fff8a204760 _dispatch_worker_thread2 + 198 15 libsystem_c.dylib 0x00007fff8c2c43da _pthread_wqthread + 316 16 libsystem_c.dylib 0x00007fff8c2c5b85 start_wqthread + 13 }}} So I will try using the exact revision of LLVM. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:10> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): it might seem to improve with https://github.com/MacRuby/MacRuby/commit/e461ba27fb5e1d417638dc6ce94176577e... [[BR]] At least, I can't reproduce this issue no longer in my environment. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:11> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): I also no longer get the error for the test case. Yay! I don't want to be too optimistic just yet, as I have tested it out in normal usage yet, but I think you may have fixed the bug. :D I owe you a cake. :) -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:12> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed Comment: Thank you for your checked. [[BR]] This issue should be closed :) If it reproduces, please reopen this ticket. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:13> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Changes (by mrada@…): * status: closed => reopened * resolution: fixed => Comment: Today I had another GC crash. The backtrace is close to the one originally reported for this ticket. :( I will try and capture something in miniruby/gdb, but this is happening in production and I haven't found a good way to reproduce yet. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:14> MacRuby <http://macruby.org/>
#1435: GC crashing when trying to free a regex currently in use ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@…): Ok, I've been running for a couple of days with GC enabled and have not had any crashes. :) I think it is safe now to close this bug. -- Ticket URL: <http://www.macruby.org/trac/ticket/1435#comment:15> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby