Professional Web Applications Themes

Ruby 1.8.1 segfault (debian testing) - Ruby

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 ...

  1. #1

    Default Ruby 1.8.1 segfault (debian testing)

    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

    francois Guest

  2. #2

    Default Re: Ruby 1.8.1 segfault (debian testing)

    >>>>> "f" == francois DOT delobel removeAT free DOT fr <"francois DOT delobel removeAT free DOT fr"> writes:

    f> Does any of you have an idea of where to look, or what to do?

    Try to compile 1.8.1 with --enable-pthread


    --

    Guy Decoux
    ts Guest

  3. #3

    Default Re: Ruby 1.8.1 segfault (debian testing)

    ts wrote: 

    Thanks for the help. :-)

    I've tried that and the segfault has "magically" disappeared. But the
    time overhead for using posix threads instrad of ruby ones seems really
    huge (my program keeps creating and destroying thread).


    Fil

    francois Guest

  4. #4

    Default Re: Ruby 1.8.1 segfault (debian testing)

    The following message is a courtesy copy of an article
    that has been posted to comp.lang.ruby as well.
     [/ref][/ref]

    f> ts wrote: [/ref]

    f> Thanks for the help. :-)

    f> I've tried that and the segfault has "magically" disappeared. But the
    f> time overhead for using posix threads instrad of ruby ones seems
    f> really huge (my program keeps creating and destroying thread).

    Well, I forward your message to ruby-talk to see if someone has an idea
    why it exit a huge difference between ruby compiled with and without
    --enable-pthread i this case

    Apparently your messages don't go to ruby-talk


    --

    Guy Decoux


    ts Guest

Similar Threads

  1. Downloading debian-testing
    By OvErboRed in forum Linux Setup, Configuration & Administration
    Replies: 3
    Last Post: October 19th, 07:00 AM
  2. LFS problem with Debian testing
    By Jukka in forum Debian
    Replies: 8
    Last Post: August 20th, 08:00 PM
  3. Debian/Testing and security updates
    By Greg Folkert in forum Debian
    Replies: 3
    Last Post: July 26th, 06:10 AM
  4. Building FVWM 2.5.7 for Debian testing / Gnome 2
    By David Fokkema in forum Debian
    Replies: 3
    Last Post: July 15th, 05:40 PM
  5. ruby-1.8.0.p3 segfault
    By George Moschovitis in forum Ruby
    Replies: 0
    Last Post: July 9th, 11:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139