Project

General

Profile

Actions

Bug #3549

closed

Segfault when using god

Bug #3549: Segfault when using god

Added by zaius (David Kelso) over 15 years ago. Updated over 14 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
1.9.2 rc1
Backport:
[ruby-core:31117]

Description

=begin
I'm in the middle of upgrading our servers to 1.9.2 rc 1.

I'm running into this segfault when trying to start god.
http://pastie.org/1035298

The file in question is viewable here:
http://github.com/mojombo/god/blob/master/lib/god/event_handler.rb

I compiled ruby from source using this file
ftp://ftp.ruby-lang.org//pub/ruby/ruby-1.9.2-rc1.tar.gz

I'm on Ubuntu 9.10

I don't know a thing about ruby internals, but let me know what info is needed and I'll hopefully be able to provide it!

david
=end

Updated by mame (Yusuke Endoh) over 15 years ago Actions #1

  • Status changed from Open to Third Party's Issue

=begin
Hi,

2010/7/8 David Kelso :

I'm running into this segfault when trying to start god.
http://pastie.org/1035298

Looks like a god's bug.
Please contact to the developper/maintainer of god.
Here is a patch (note that I did not test it):

diff --git a/ext/god/netlink_handler.c b/ext/god/netlink_handler.c
index ce056a3..8609504 100644
--- a/ext/god/netlink_handler.c
+++ b/ext/god/netlink_handler.c
@@ -79,10 +79,10 @@ nlh_handle_events()
}

      extra_data = rb_hash_new();
  •    rb_hash_aset(extra_data, rb_intern("parent_pid"), INT2FIX(event->event_data.fork.parent_pid));
    
  •    rb_hash_aset(extra_data, rb_intern("parent_thread_group_id"), INT2FIX(event->event_data.fork.parent_tgid));
    
  •    rb_hash_aset(extra_data, rb_intern("child_pid"), INT2FIX(event->event_data.fork.child_pid));
    
  •    rb_hash_aset(extra_data, rb_intern("child_thread_group_id"), INT2FIX(event->event_data.fork.child_tgid));
    
  •    rb_hash_aset(extra_data, ID2SYM(rb_intern("parent_pid")), INT2FIX(event->event_data.fork.parent_pid));
    
  •    rb_hash_aset(extra_data, ID2SYM(rb_intern("parent_thread_group_id")), INT2FIX(event->event_data.fork.parent_tgid));
    
  •    rb_hash_aset(extra_data, ID2SYM(rb_intern("child_pid")), INT2FIX(event->event_data.fork.child_pid));
    
  •    rb_hash_aset(extra_data, ID2SYM(rb_intern("child_thread_group_id")), INT2FIX(event->event_data.fork.child_tgid));
     
       rb_funcall(cEventHandler, m_call, 3, INT2FIX(event->event_data.fork.parent_pid), ID2SYM(proc_fork), extra_data);
       return INT2FIX(1);
    

--
Yusuke Endoh
=end

Updated by tenderlovemaking (Aaron Patterson) over 15 years ago Actions #2

=begin
On Thu, Jul 08, 2010 at 10:47:54AM +0900, David Kelso wrote:

Bug #3549: Segfault when using god
http://redmine.ruby-lang.org/issues/show/3549

Author: David Kelso
Status: Open, Priority: Normal
ruby -v: 1.9.2 rc1

I'm in the middle of upgrading our servers to 1.9.2 rc 1.

I'm running into this segfault when trying to start god.
http://pastie.org/1035298

The file in question is viewable here:
http://github.com/mojombo/god/blob/master/lib/god/event_handler.rb

I compiled ruby from source using this file
ftp://ftp.ruby-lang.org//pub/ruby/ruby-1.9.2-rc1.tar.gz

I'm on Ubuntu 9.10

I don't know a thing about ruby internals, but let me know what info is needed and I'll hopefully be able to provide it!

No problem! Thanks for reporting a bug. Could you possibly provide us
with a little bit more info:

  1. Does this happen every time you start up god?

  2. Can you provide us with a script that reproduces the error? If not:

  3. Can you provide us with a gdb backtrace? The way to get a backtrace
    is like this:

$ gdb /path/to/ruby
(gdb) run -S /path/to/script scriptargs

The above part should run your script. Once you get a segmentation
fault, you'll be dropped back to the gdb shell. Execute the "bt" command like
so:

(gdb) bt

Send us that back trace.

Any other info you can provide, like the type of hardware and compile
options you used to build ruby would be helpful too!

Thanks!

--
Aaron Patterson
http://tenderlovemaking.com/

Attachment: (unnamed)
=end

Updated by tenderlovemaking (Aaron Patterson) over 15 years ago Actions #3

=begin
On Thu, Jul 08, 2010 at 12:25:27PM +0900, Aaron Patterson wrote:

On Thu, Jul 08, 2010 at 10:47:54AM +0900, David Kelso wrote:

Bug #3549: Segfault when using god
http://redmine.ruby-lang.org/issues/show/3549

Author: David Kelso
Status: Open, Priority: Normal
ruby -v: 1.9.2 rc1

I'm in the middle of upgrading our servers to 1.9.2 rc 1.

I'm running into this segfault when trying to start god.
http://pastie.org/1035298

The file in question is viewable here:
http://github.com/mojombo/god/blob/master/lib/god/event_handler.rb

I compiled ruby from source using this file
ftp://ftp.ruby-lang.org//pub/ruby/ruby-1.9.2-rc1.tar.gz

I'm on Ubuntu 9.10

I don't know a thing about ruby internals, but let me know what info is needed and I'll hopefully be able to provide it!

No problem! Thanks for reporting a bug. Could you possibly provide us
with a little bit more info:

  1. Does this happen every time you start up god?

  2. Can you provide us with a script that reproduces the error? If not:

  3. Can you provide us with a gdb backtrace? The way to get a backtrace
    is like this:

$ gdb /path/to/ruby
(gdb) run -S /path/to/script scriptargs

The above part should run your script. Once you get a segmentation
fault, you'll be dropped back to the gdb shell. Execute the "bt" command like
so:

(gdb) bt

Send us that back trace.

Any other info you can provide, like the type of hardware and compile
options you used to build ruby would be helpful too!

Oops. Looks like Yusuke solved this in [ruby-core:31118].

--
Aaron Patterson
http://tenderlovemaking.com/

Attachment: (unnamed)
=end

Actions

Also available in: PDF Atom