F
francois DOT delobel removeAT free DOT fr
Hello,
I've been trying to understand a segfault from ruby for quite a long
time (about one month) and I think it's time for asking for help. :-(
This bug is reproductible, on different architecture. I've tried
recompiling ruby but the same segfault happens again. The same error
happens with ruby1.6.
$ ruby -v
ruby 1.8.1 (2003-11-11) [i386-linux]
Here is the error message from ruby:
../utilities.rb:33: [BUG] Segmentation fault
ruby 1.8.1 (2003-11-11) [i386-linux]
The line in which it is signal may change.
Here is a backtrace from the dumped core:
#7 0x400f6815 in __pthread_sighandler () from /lib/libpthread.so.0
#6 0x40098fc2 in ruby_posix_signal () from /usr/lib/libruby1.8.so.1.8
#5 0x400358e1 in rb_bug () from /usr/lib/libruby1.8.so.1.8
#4 0x401b9838 in abort () from /lib/libc.so.6
#3 0x401b8324 in raise () from /lib/libc.so.6
#2 0x400f3a6b in raise () from /lib/libpthread.so.0
#1 0x400f3761 in pthread_kill () from /lib/libpthread.so.0
#0 0x401b8571 in kill () from /lib/libc.so.6
Brief description of the program:
It's a TCP server receiving requests to execute (as forked code, with
stdin/out/err redirections) from several clients. The program is
multi-threaded (and I therefore receive the "fork terminates thread"
warning when it forks). I think I've kept the number of opened FD to a
sensible value by setting the fcntl FD_CLOEXEC for each pipe/file/socket
used. Memory usage is quite low for ruby (between 10Mb and 20Mb for 40
clients). The program works fine for the first request and then
segfaults after a while (I have my 40 clients sending always the same
kind of requests).
I've tried stracing the program but I can't see any suspicious system call.
I now laking of any ideas where to look for the bug. I'm now wondering
if it may be in the ruby interpreter... ?
Does any of you have an idea of where to look, or what to do?
Fil
I've been trying to understand a segfault from ruby for quite a long
time (about one month) and I think it's time for asking for help. :-(
This bug is reproductible, on different architecture. I've tried
recompiling ruby but the same segfault happens again. The same error
happens with ruby1.6.
$ ruby -v
ruby 1.8.1 (2003-11-11) [i386-linux]
Here is the error message from ruby:
../utilities.rb:33: [BUG] Segmentation fault
ruby 1.8.1 (2003-11-11) [i386-linux]
The line in which it is signal may change.
Here is a backtrace from the dumped core:
#7 0x400f6815 in __pthread_sighandler () from /lib/libpthread.so.0
#6 0x40098fc2 in ruby_posix_signal () from /usr/lib/libruby1.8.so.1.8
#5 0x400358e1 in rb_bug () from /usr/lib/libruby1.8.so.1.8
#4 0x401b9838 in abort () from /lib/libc.so.6
#3 0x401b8324 in raise () from /lib/libc.so.6
#2 0x400f3a6b in raise () from /lib/libpthread.so.0
#1 0x400f3761 in pthread_kill () from /lib/libpthread.so.0
#0 0x401b8571 in kill () from /lib/libc.so.6
Brief description of the program:
It's a TCP server receiving requests to execute (as forked code, with
stdin/out/err redirections) from several clients. The program is
multi-threaded (and I therefore receive the "fork terminates thread"
warning when it forks). I think I've kept the number of opened FD to a
sensible value by setting the fcntl FD_CLOEXEC for each pipe/file/socket
used. Memory usage is quite low for ruby (between 10Mb and 20Mb for 40
clients). The program works fine for the first request and then
segfaults after a while (I have my 40 clients sending always the same
kind of requests).
I've tried stracing the program but I can't see any suspicious system call.
I now laking of any ideas where to look for the bug. I'm now wondering
if it may be in the ruby interpreter... ?
Does any of you have an idea of where to look, or what to do?
Fil