[MacRuby] #1225: Segfault occurs when override the @sock.shutdown in NET::IMAP.

MacRuby ruby-noreply at macosforge.org
Sun Apr 17 23:33:52 PDT 2011


#1225: Segfault occurs when override the @sock.shutdown in NET::IMAP.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  minor                 |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------

Comment(by lsansonetti@…):

 Apparently a race condition when calling LLVM:

 {{{
 (gdb) thread apply all bt

 Thread 5 (process 2780):
 #0  0x00000001004eef1a in llvm::InstCombiner::DoOneIteration ()
 #1  0x00000001004ead3b in llvm::InstCombiner::runOnFunction ()
 #2  0x0000000100642b08 in llvm::FPPassManager::runOnFunction ()
 #3  0x0000000100643cea in llvm::FunctionPassManagerImpl::run ()
 #4  0x0000000100643e1b in llvm::FunctionPassManager::run ()
 #5  0x0000000100144640 in RoxorCore::optimize () at /Users/lrz/src
 /macruby-master/vm.cpp:543
 #6  0x0000000100144640 in RoxorCore::compile (this=0x10101bc00,
 func=0x102c022b0, run_optimize=<value temporarily unavailable, due to
 optimizations>) at vm.cpp:577
 #7  0x000000010014eda1 in RoxorCore::resolve_method (this=0x10101bc00,
 klass=0x400314e20, sel=0x1028dfb70, func=0x102c022b0, arity=@0x102d43828,
 flags=2, imp=0, m=0x0, objc_imp_types=0x0) at vm.cpp:1867
 #8  0x000000010014ef5c in RoxorCore::resolve_methods (this=0x10101bc00,
 map=0x100bbf410, klass=0x400314e20, sel=0x1028dfb70) at vm.cpp:1946
 #9  0x00000001001555ac in rb_vm_resolve_method (klass=0x400314e20,
 sel=0x1028dfb70) at vm.cpp:2006
 #10 0x000000010015565c in resolveInstanceMethod_imp (self=<value
 temporarily unavailable, due to optimizations>, sel=<value temporarily
 unavailable, due to optimizations>, name=<value temporarily unavailable,
 due to optimizations>) at vm.cpp:4920
 #11 0x00007fff851736e1 in _class_resolveMethod ()
 #12 0x000000010013cba0 in rb_vm_dispatch (_vm=0x102d4cb20,
 cache=0x102bb3240, top=17187292448, self=17187292448, klass=0x400317040,
 sel=0x1028dfb70, block=0x0, opt=1 '\001', argc=0, argv=0x0) at
 dispatcher.cpp:635
 #13 0x0000000102b00d6c in ?? ()
 #14 0x0000000102b033dd in ?? ()
 #15 0x000000010013e6ac in rb_vm_dispatch (_vm=0x102d4cb20,
 cache=0x102bbc540, top=17187292448, self=17187292448, klass=0x400317040,
 sel=0x1028f3610, block=0x0, opt=1 '\001', argc=<value temporarily
 unavailable, due to optimizations>, argv=0x0) at dispatcher.cpp:159
 #16 0x0000000102b00d6c in ?? ()
 #17 0x0000000102b02ad3 in ?? ()
 #18 0x000000010013e6ac in rb_vm_dispatch (_vm=0x102d4cb20,
 cache=0x102ba9290, top=17187292448, self=17187292448, klass=0x400317040,
 sel=0x7fff86892c96, block=0x40071f3e0, opt=2 '\002', argc=<value
 temporarily unavailable, due to optimizations>, argv=0x0) at
 dispatcher.cpp:159
 #19 0x0000000100f8a1a1 in dyld_stub_rb_define_module ()
 #20 0x0000000100f9c237 in MREP_6211DECCE62B4C3B8D629CABF02EA283 ()
 #21 0x000000010013e6ac in rb_vm_dispatch (_vm=0x102d4cb20,
 cache=0x102ba4440, top=17187292448, self=17187292448, klass=0x400317040,
 sel=0x100bbff30, block=0x0, opt=1 '\001', argc=<value temporarily
 unavailable, due to optimizations>, argv=0x0) at dispatcher.cpp:159
 #22 0x0000000100f8a1a1 in dyld_stub_rb_define_module ()
 #23 0x0000000100f9be5f in MREP_6211DECCE62B4C3B8D629CABF02EA283 ()
 #24 0x000000010013fdc9 in rb_vm_block_eval (b=0x102d4cb20, argc=<value
 temporarily unavailable, due to optimizations>, argv=0x0) at
 dispatcher.cpp:98
 #25 0x0000000100153f28 in rb_vm_thread_run (thread=17187334816) at
 vm.cpp:4577
 #26 0x00007fff8bf0b5b2 in _pthread_start ()
 #27 0x00007fff8bf0e339 in thread_start ()

 Thread 4 (process 2780):
 #0  0x00007fff8435d162 in __workq_kernreturn ()
 #1  0x00007fff8bf0d287 in _pthread_wqthread ()
 #2  0x00007fff8bf0e349 in start_wqthread ()

 Thread 3 (process 2780):
 #0  0x00007fff8435d7b6 in kevent ()
 #1  0x00007fff8196b872 in _dispatch_mgr_invoke ()
 #2  0x00007fff8196a40a in _dispatch_mgr_thread ()

 Thread 2 (process 2780):
 #0  0x00007fff8435d162 in __workq_kernreturn ()
 #1  0x00007fff8bf0d287 in _pthread_wqthread ()
 #2  0x00007fff8bf0e349 in start_wqthread ()

 Thread 1 (process 2780):
 #0  0x00000001001ceaf0 in (anonymous namespace)::X86DAGToDAGISel::Select
 ()
 #1  0x00000001003398f2 in llvm::SelectionDAGISel::DoInstructionSelection
 ()
 #2  0x000000010033ae61 in llvm::SelectionDAGISel::CodeGenAndEmitDAG ()
 #3  0x000000010033c12e in llvm::SelectionDAGISel::SelectBasicBlock ()
 #4  0x000000010033c3d6 in llvm::SelectionDAGISel::SelectAllBasicBlocks ()
 #5  0x000000010033c7a0 in llvm::SelectionDAGISel::runOnMachineFunction ()
 #6  0x00000001003b0501 in llvm::MachineFunctionPass::runOnFunction ()
 #7  0x0000000100642b08 in llvm::FPPassManager::runOnFunction ()
 #8  0x0000000100643cea in llvm::FunctionPassManagerImpl::run ()
 #9  0x0000000100643e1b in llvm::FunctionPassManager::run ()
 #10 0x000000010035464d in llvm::JIT::getPointerToFunction ()
 #11 0x00000001001445a2 in RoxorCore::compile (this=0x10101bc00,
 func=0x1028b6800, run_optimize=<value temporarily unavailable, due to
 optimizations>) at vm.cpp:581
 #12 0x000000010014ece6 in RoxorCore::resolve_method (this=0x10101bc00,
 klass=0x400316fc0, sel=0x100bb5ac0, func=0x100bb9ad0,
 arity=@0x7fff5fbfe328, flags=1, imp=0x102b0a400, m=0x100be5148,
 objc_imp_types=0x0) at vm.cpp:1903
 #13 0x0000000100155ac9 in prepare_method (klass=0x400316fc0,
 dynamic_class=<value temporarily unavailable, due to optimizations>,
 sel=0x100bb5ac0, data=0x100bb9ad0, arity=@0x7fff5fbfe328, flags=1,
 precompiled=false, objc_imp_types=0x0) at vm.cpp:2125
 #14 0x0000000100156190 in rb_vm_prepare_method (klass=<value temporarily
 unavailable, due to optimizations>, dynamic_class=<value temporarily
 unavailable, due to optimizations>, sel=<value temporarily unavailable,
 due to optimizations>, func=<value temporarily unavailable, due to
 optimizations>, arity=<value temporarily unavailable, due to
 optimizations>, flags=<value temporarily unavailable, due to
 optimizations>) at vm.cpp:2201
 #15 0x0000000102b0a370 in ?? ()
 #16 0x000000010013f12d in rb_vm_yield_under (klass=<value temporarily
 unavailable, due to optimizations>, self=17187292448, argc=<value
 temporarily unavailable, due to optimizations>, argv=0x0) at
 dispatcher.cpp:98
 #17 0x00000001000f5bef in specific_eval (argc=<value temporarily
 unavailable, due to optimizations>, argv=0x0, klass=17183109184,
 self=17187292448) at vm_eval.c:353
 #18 0x000000010013e1df in rb_vm_dispatch (_vm=0x100b3b1e0,
 cache=0x100a96560, top=17184153504, self=17187292448, klass=0x400314ea0,
 sel=0x100b69920, block=0x40071b420, opt=0 '\0', argc=0, argv=0x0) at
 dispatcher.cpp:457
 #19 0x0000000102b00d6c in ?? ()
 #20 0x0000000102b003f5 in ?? ()
 #21 0x0000000100154fa3 in rb_vm_run (fname=<value temporarily unavailable,
 due to optimizations>, node=0x4004a4e00, binding=<value temporarily
 unavailable, due to optimizations>, inside_eval=false) at vm.cpp:3962
 warning: .o file "/Users/lrz/src/macruby-master/.objs/eval.o" more recent
 than executable timestamp in "/Users/lrz/src/macruby-
 master/libmacruby.1.9.2.dylib"
 warning: Couldn't open object file '/Users/lrz/src/macruby-
 master/.objs/eval.o'
 #22 0x0000000100031050 in ruby_run_node ()
 #23 0x0000000100000cf8 in main (argc=2, argv=0x10280f810, envp=<value
 temporarily unavailable, due to optimizations>) at main.cpp:40
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1225#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list