Bug #3549
closedSegfault when using god
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
- Status changed from Open to Third Party's Issue
=begin
Hi,
2010/7/8 David Kelso redmine@ruby-lang.org:
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 mame@tsg.ne.jp
=end
Updated by tenderlovemaking (Aaron Patterson) over 15 years ago
=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/3549Author: David Kelso
Status: Open, Priority: Normal
ruby -v: 1.9.2 rc1I'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/1035298The file in question is viewable here:
http://github.com/mojombo/god/blob/master/lib/god/event_handler.rbI compiled ruby from source using this file
ftp://ftp.ruby-lang.org//pub/ruby/ruby-1.9.2-rc1.tar.gzI'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:
-
Does this happen every time you start up god?
-
Can you provide us with a script that reproduces the error? If not:
-
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
=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/3549Author: David Kelso
Status: Open, Priority: Normal
ruby -v: 1.9.2 rc1I'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/1035298The file in question is viewable here:
http://github.com/mojombo/god/blob/master/lib/god/event_handler.rbI compiled ruby from source using this file
ftp://ftp.ruby-lang.org//pub/ruby/ruby-1.9.2-rc1.tar.gzI'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:
Does this happen every time you start up god?
Can you provide us with a script that reproduces the error? If not:
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 scriptargsThe 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