Closed ibc closed 12 years ago
loop do printf "." t = Thread.new { AE.run { AE.add_timer(2) {} } } AE.stop end
Waiting a bit or pressing Ctrl+C (or probably any signal) "sometimes" causes the following different critical error:
src/unix/core.c:256: uv__finish_close: Assertion
malloc.c:4636: _int_malloc: Assertion
Segmentation fault ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] -- control frame ---------- c:0007 p:---- s:0017 b:0017 l:000016 d:000016 CFUNC :new c:0006 p:0027 s:0014 b:0014 l:001db8 d:000013 BLOCK ./bugs.rb:44 c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :loop c:0003 p:0191 s:0006 b:0006 l:001db8 d:002178 EVAL ./bugs.rb:42 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001db8 d:001db8 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- ./bugs.rb:42:in `' ./bugs.rb:42:in`loop' ./bugs.rb:44:in `block in ' ./bugs.rb:44:in`new' -- C level backtrace information ------------------------------------------- /usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x61) [0x7f8bb1f36db1] [...] /usr/lib/libruby-1.9.1.so.1.9(+0xf3c84) [0x7f8bb1ed8c84] /lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7f8bb1a7a420] /usr/lib/libruby-1.9.1.so.1.9(+0x6da78) [0x7f8bb1e52a78] [...] /usr/lib/libruby-1.9.1.so.1.9(+0x6d55a) [0x7f8bb1e5255a] /home/ibc/Proyectos/AsyncEngine/lib/asyncengine/asyncengine_ext.so(+0x1a3a4) [0x7f8bb03e13a4] /usr/lib/libruby-1.9.1.so.1.9(+0x6d55a) [0x7f8bb1e5255a] [...]
Obviously there is a thread problem. The code above is really ugly and dangerous, but it should not crash.
Cannot reproduce it anymore... but I'll let it open for now.
Fixed.
Waiting a bit or pressing Ctrl+C (or probably any signal) "sometimes" causes the following different critical error:
src/unix/core.c:256: uv__finish_close: Assertion
!(handle->flags & UV_CLOSED)' failed.`malloc.c:4636: _int_malloc: Assertion
victim->fd_nextsize->bk_nextsize == victim' failed.`src/unix/core.c:256: uv__finish_close: Assertion
!(handle->flags & UV_CLOSED)' failed.`Obviously there is a thread problem. The code above is really ugly and dangerous, but it should not crash.