Bug #3005: Ruby core dump - [BUG] rb_sys_fail() - errno == 0
http://redmine.ruby-lang.org/issues/show/3005

Author: Sebastian YEPES
Status: Open, Priority: Normal
Category: core, Target version: 1.9.x
ruby -v: 1.9.1p376

My ruby script is generating cores, this is the dump:

--
sv.rb:268: [BUG] rb_sys_fail() - errno == 0
ruby 1.9.1p376 (2009-12-07 revision 26041) [ia64-hpux11.31]

-- control frame ----------
c:0005 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC  :gets
c:0004 p:0210 s:0013 b:0013 l:000012 d:000012 METHOD sv.rb:268
c:0003 p:0653 s:0006 b:0006 l:0009b4 d:001a54 EVAL   sv.rb:780
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0009b4 d:0009b4 TOP   
---------------------------
-- Ruby level backtrace information-----------------------------------------
sv.rb:268:in `gets'
sv.rb:268:in `svcm_listener'
sv.rb:780:in `<main>'

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
-----


(gdb) bt
#0  0x60000000c01e93f0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux32/libpthread.so.1
#1  0x60000000c0153310:0 in pthread_kill+0x8d0 ()
   from /usr/lib/hpux32/libpthread.so.1
#2  0x60000000c02f05a0:0 in raise+0xe0 () from /usr/lib/hpux32/libc.so.1
#3  0x60000000c0410cd0:0 in abort+0x170 () from /usr/lib/hpux32/libc.so.1
#4  0x60000000d663ef00:0 in rb_bug (fmt=<optimized out>) at error.c:233
#5  0x60000000d66434e0:0 in rb_sys_fail (mesg=<not available>) at error.c:1140
#6  0x60000000d6696cf0:0 in io_fillbuf (fptr=<not available>) at io.c:1169
#7  0x60000000d669b5d0:0 in rb_io_getline_fast (fptr=<not available>, 
    enc=<not available>) at io.c:2151
#8  0x60000000d669c360:0 in rb_io_getline_1 (rs=<not available>, limit=-1, 
    io=<not available>) at io.c:2229
#9  0x60000000d669c550:2 in inline rb_io_getline () at io.c:2312
#10 0x60000000d669c530:0 in rb_io_gets_m (argc=<optimized out>, 
    argv=<optimized out>, io=<optimized out>) at io.c:2347
#11 0x60000000d686f560:0 in call_cfunc (func=<not available>, 
    recv=<not available>, len=<not available>, argc=<not available>, 
    argv=<not available>) at vm_insnhelper.c:286
#12 0x60000000d6870270:0 in vm_call_cfunc (th=<not available>, 
    reg_cfp=<not available>, num=<not available>, id=<not available>, 
    oid=<not available>, recv=<not available>, klass=<not available>, 
    mn=<not available>, blockptr=<not available>) at vm_insnhelper.c:384
---Type <return> to continue, or q <return> to quit---
#13 0x60000000d6872190:0 in vm_call_method (th=<not available>, 
    cfp=<not available>, num=<not available>, blockptr=<not available>, 
    flag=<not available>, id=<not available>, mn=<not available>, 
    recv=<not available>) at vm_insnhelper.c:517
#14 0x60000000d6879dd0:0 in vm_exec_core (th=<not available>) at insns.def:995
#15 0x60000000d68881c0:0 in vm_exec () at vm.c:1080
#16 0x60000000d68957d0:0 in rb_iseq_eval_main (iseqval=<optimized out>)
    at vm.c:1304
#17 0x60000000d6647c80:0 in ruby_exec_node (n=<not available>) at eval.c:205
#18 0x60000000d6647e00:0 in ruby_run_node (n=0x402f8400) at eval.c:226
#19 0x4000b00:0 in main (argc=2, argv=0x7fffedb4) at main.c:35
------


----------------------------------------
http://redmine.ruby-lang.org