Bug 1181160 - [abrt] ruby: rb_bug(): ruby-mri killed by SIGABRT
Summary: [abrt] ruby: rb_bug(): ruby-mri killed by SIGABRT
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ruby
Version: 21
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:99230aa317771942fab3500f584...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-12 13:51 UTC by Richard Z.
Modified: 2015-05-21 17:33 UTC (History)
10 users (show)

Fixed In Version: ruby-2.1.6-29.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-21 17:33:33 UTC


Attachments (Terms of Use)
File: backtrace (22.45 KB, text/plain)
2015-01-12 13:51 UTC, Richard Z.
no flags Details
File: cgroup (177 bytes, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: core_backtrace (961 bytes, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: dso_list (4.96 KB, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: environ (1.09 KB, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: limits (1.29 KB, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: maps (19.97 KB, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: open_fds (476 bytes, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: proc_pid_status (799 bytes, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
File: var_log_messages (29 bytes, text/plain)
2015-01-12 13:52 UTC, Richard Z.
no flags Details
reduced test case demonstarting the problem (1.94 KB, application/x-ruby)
2015-01-12 21:28 UTC, Richard Z.
no flags Details
File: backtrace (31.04 KB, text/plain)
2015-04-23 21:29 UTC, Joao Carlos Mendes Luis
no flags Details


Links
System ID Priority Status Summary Last Updated
Ruby 10401 None None None Never

Description Richard Z. 2015-01-12 13:51:52 UTC
Description of problem:
running a ruby-tcltk program, very simple graphical GUI.

Happens before the GUI appears on screen.

Version-Release number of selected component:
ruby-2.1.5-26.fc21

Additional info:
reporter:       libreport-2.3.0
backtrace_rating: 3
cmdline:        /usr/bin/ruby-mri /home/rz/bin/rselect4
crash_function: rb_bug
executable:     /usr/bin/ruby-mri
kernel:         3.17.8-300.fc21.i686+PAE
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (4 frames)
 #3 rb_bug at error.c:346
 #4 sigsegv at signal.c:812
 #6 BogusFind at /usr/src/debug/tcl8.6.3/generic/tclHash.c:961
 #7 ?? at /usr/lib/libtk8.6.so

Potential duplicate: bug 704606

Comment 1 Richard Z. 2015-01-12 13:51:59 UTC
Created attachment 979163 [details]
File: backtrace

Comment 2 Richard Z. 2015-01-12 13:52:00 UTC
Created attachment 979164 [details]
File: cgroup

Comment 3 Richard Z. 2015-01-12 13:52:02 UTC
Created attachment 979165 [details]
File: core_backtrace

Comment 4 Richard Z. 2015-01-12 13:52:04 UTC
Created attachment 979166 [details]
File: dso_list

Comment 5 Richard Z. 2015-01-12 13:52:06 UTC
Created attachment 979167 [details]
File: environ

Comment 6 Richard Z. 2015-01-12 13:52:07 UTC
Created attachment 979168 [details]
File: limits

Comment 7 Richard Z. 2015-01-12 13:52:11 UTC
Created attachment 979169 [details]
File: maps

Comment 8 Richard Z. 2015-01-12 13:52:13 UTC
Created attachment 979170 [details]
File: open_fds

Comment 9 Richard Z. 2015-01-12 13:52:14 UTC
Created attachment 979171 [details]
File: proc_pid_status

Comment 10 Richard Z. 2015-01-12 13:52:16 UTC
Created attachment 979172 [details]
File: var_log_messages

Comment 11 Vít Ondruch 2015-01-12 15:31:45 UTC
(In reply to Richard Z. from comment #0)
> Description of problem:
> running a ruby-tcltk program, very simple graphical GUI.

Could you please provide it?

Comment 12 Richard Z. 2015-01-12 21:28:45 UTC
Created attachment 979344 [details]
reduced test case demonstarting the problem

reduced test case causing coredump, original program had complicated data dependency

Comment 13 Joao Carlos Mendes Luis 2015-04-23 21:29:09 UTC
Another user experienced a similar problem:

Just upgraded to fc21, from fc20.

This is a modified version of sshmenu I made, but it could never SIGABRT!

reporter:       libreport-2.3.0
backtrace_rating: 4
cmdline:        /usr/bin/ruby-mri /home/jonny/git-external/sshmenu/bin/sshmenu-gnome
crash_function: rb_bug
executable:     /usr/bin/ruby-mri
kernel:         3.19.4-200.fc21.x86_64
package:        ruby-2.1.5-26.fc21
reason:         ruby-mri killed by SIGABRT
runlevel:       N 5
type:           CCpp
uid:            40024

Comment 14 Joao Carlos Mendes Luis 2015-04-23 21:29:12 UTC
Created attachment 1018187 [details]
File: backtrace

Comment 15 Vít Ondruch 2015-04-30 08:13:55 UTC
(In reply to Richard Z. from comment #12)
> Created attachment 979344 [details]
> reduced test case demonstarting the problem
> 
> reduced test case causing coredump, original program had complicated data
> dependency

Are there any particular steps to reproduce this?




(In reply to Joao Carlos Mendes Luis from comment #13)
> Another user experienced a similar problem:
> 
> Just upgraded to fc21, from fc20.
> 
> This is a modified version of sshmenu I made, but it could never SIGABRT!

I doubt this is the same issue. The original issue was reported as a Tcl/Tk related issue while sshmenu is using GTK2. If you can reproduce the issue with official package, I'd suggest to report this against sshmenu. If it fails just in your modified version, then I would suspect ruby-gconf2, which appears to be latest in the backtrace. So that would be probably the right component to report this issue against.

Comment 16 Joao Carlos Mendes Luis 2015-04-30 16:54:41 UTC
Another user experienced a similar problem:

sudo yum install sshmenu
sudo gem install ftools
/usr/bin/sshmenu-gnome

reporter:       libreport-2.3.0
backtrace_rating: 4
cmdline:        /usr/bin/ruby-mri -W2 /usr/bin/sshmenu-gnome
crash_function: rb_bug
executable:     /usr/bin/ruby-mri
kernel:         3.19.4-200.fc21.x86_64
package:        ruby-2.1.6-27.fc21
reason:         ruby-mri killed by SIGABRT
runlevel:       N 5
type:           CCpp
uid:            40024

Comment 17 João Carlos Mendes Luís 2015-04-30 16:57:54 UTC
This bug was found not by me, but by abrt.


I was using my own version of sshmenu because the official version is very old (compared to the github version) and does not work at all (see bug 1215811).

If you manually install ftools in the root system, the bug can be reproduced running /usr/bin/sshmenu-gnome


$ /usr/bin/sshmenu-gnome 
/usr/share/ruby/vendor_ruby/sshmenu.rb:459: warning: assigned but unused variable - x
/usr/share/ruby/vendor_ruby/sshmenu.rb:459: warning: assigned but unused variable - y
/usr/share/ruby/vendor_ruby/sshmenu.rb:459: warning: assigned but unused variable - h
/usr/share/ruby/vendor_ruby/sshmenu.rb:978: warning: assigned but unused variable - w
/usr/share/ruby/vendor_ruby/sshmenu.rb:1022: warning: assigned but unused variable - keylist
/usr/share/ruby/vendor_ruby/sshmenu.rb:1706: warning: shadowing outer local variable - h
/usr/share/ruby/vendor_ruby/sshmenu.rb:2037: warning: shadowing outer local variable - renderer
/usr/share/ruby/vendor_ruby/sshmenu.rb:2295: warning: assigned but unused variable - result
/usr/share/ruby/vendor_ruby/sshmenu.rb:2314: warning: assigned but unused variable - result
/usr/share/ruby/vendor_ruby/sshmenu.rb:2355: warning: assigned but unused variable - item
/usr/share/ruby/vendor_ruby/sshmenu.rb:2981: warning: mismatched indentations at 'end' with 'def' at 2955
/usr/local/share/gems/gems/ftools-0.0.0/lib/ftools.rb:42: warning: shadowing outer local variable - file
/usr/share/ruby/vendor_ruby/sshmenu.rb:1628: warning: optional boolean argument is obsoleted
/usr/share/ruby/vendor_ruby/sshmenu.rb:1628: warning: optional boolean argument is obsoleted
/usr/share/ruby/vendor_ruby/sshmenu.rb:1628: warning: optional boolean argument is obsoleted
/usr/share/ruby/vendor_ruby/sshmenu.rb:1628: warning: optional boolean argument is obsoleted
/usr/lib64/ruby/vendor_ruby/gconf2.so: line 0
   GLib-GObject-WARNING **:cannot retrieve class for invalid (unclassed) type 'GInterface'
/usr/lib64/ruby/vendor_ruby/gconf2.so: [BUG] Segmentation fault at 0x00000000000010
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0011 p:-7309104 s:0053 e:000052 TOP    [FINISH]
c:0010 p:---- s:0051 e:000050 CFUNC  :require
c:0009 p:0115 s:0047 e:000046 METHOD /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55
c:0008 p:0015 s:0037 e:000036 TOP    /usr/share/ruby/vendor_ruby/gconf2.rb:2 [FINISH]
c:0007 p:---- s:0035 e:000034 CFUNC  :require
...




This traps abrt, as you can see from the previous comment.

Comment 18 João Carlos Mendes Luís 2015-04-30 17:02:40 UTC
BTW, ruby has just been upgraded to ruby-2.1.6-27.fc21.x86_64

The last too comments were running this binary (and a full yum upgrade).

Comment 19 Richard Z. 2015-04-30 18:25:11 UTC
(In reply to Vít Ondruch from comment #15)
> (In reply to Richard Z. from comment #12)
> > Created attachment 979344 [details]
> > reduced test case demonstarting the problem
> > 
> > reduced test case causing coredump, original program had complicated data
> > dependency
> 
> Are there any particular steps to reproduce this?

no, just run it. Needs F21 and 32 bit to reproduce reliably. The problem
is not 32 bit dependent but may trigger in different circumstances on
different architectures.

> 
> 
> 
> 
> (In reply to Joao Carlos Mendes Luis from comment #13)
> > Another user experienced a similar problem:
> > 
> > Just upgraded to fc21, from fc20.
> > 
> > This is a modified version of sshmenu I made, but it could never SIGABRT!
> 
> I doubt this is the same issue. The original issue was reported as a Tcl/Tk
> related issue while sshmenu is using GTK2. If you can reproduce the issue
> with official package, I'd suggest to report this against sshmenu. If it
> fails just in your modified version, then I would suspect ruby-gconf2, which
> appears to be latest in the backtrace. So that would be probably the right
> component to report this issue against.

we still have the problem that ABRT fails to get backtrace of the ruby process
and all segfaults end up under this bug as they have identical faulty stacktrace - #979344

Comment 21 João Carlos Mendes Luís 2015-05-02 13:37:03 UTC
Note that my system is 64 bits!

Comment 22 Mamoru TASAKA 2015-05-03 14:08:39 UTC
sshmenu issue is different from this bug.

Comment 23 Mamoru TASAKA 2015-05-03 14:41:06 UTC
(In reply to Mamoru TASAKA from comment #22)
> sshmenu issue is different from this bug.

For sshmenu, see bug 1215811

Comment 24 Vít Ondruch 2015-05-04 08:10:49 UTC
(In reply to João Carlos Mendes Luís from comment #17)
Could you please check bug 1213627, i.e. ruby-gnome2-0.90.4-5.fc21.

Comment 25 Vít Ondruch 2015-05-04 08:32:17 UTC
(In reply to Richard Z. from comment #19)
> (In reply to Vít Ondruch from comment #15)
> > (In reply to Richard Z. from comment #12)
> > > Created attachment 979344 [details]
> > > reduced test case demonstarting the problem
> > > 
> > > reduced test case causing coredump, original program had complicated data
> > > dependency
> > 
> > Are there any particular steps to reproduce this?
> 
> no, just run it. Needs F21 and 32 bit to reproduce reliably. The problem
> is not 32 bit dependent but may trigger in different circumstances on
> different architectures.

The thing is I can't reproduce this. But I found upstream ticket [1], which talks specifically about 32b. So this might help. Would you mind to test Ruby 2.2 which should already include the patches?


[1] https://bugs.ruby-lang.org/issues/8000


> > (In reply to Joao Carlos Mendes Luis from comment #13)
> > > Another user experienced a similar problem:
> > > 
> > > Just upgraded to fc21, from fc20.
> > > 
> > > This is a modified version of sshmenu I made, but it could never SIGABRT!
> > 
> > I doubt this is the same issue. The original issue was reported as a Tcl/Tk
> > related issue while sshmenu is using GTK2. If you can reproduce the issue
> > with official package, I'd suggest to report this against sshmenu. If it
> > fails just in your modified version, then I would suspect ruby-gconf2, which
> > appears to be latest in the backtrace. So that would be probably the right
> > component to report this issue against.
> 
> we still have the problem that ABRT fails to get backtrace of the ruby
> process
> and all segfaults end up under this bug as they have identical faulty
> stacktrace - #979344

Yes, that is unfortunate. I was suggested by ABRT team to disable the custom SIGSEV signal handling in Ruby, but I am a bit reluctant to do so. Especially since there is no official way to do so.

Comment 26 Richard Z. 2015-05-05 14:26:38 UTC
(In reply to Vít Ondruch from comment #25)
> (In reply to Richard Z. from comment #19)
> > (In reply to Vít Ondruch from comment #15)
> > > (In reply to Richard Z. from comment #12)
> > > > Created attachment 979344 [details]
> > > > reduced test case demonstarting the problem
> > > > 
> > > > reduced test case causing coredump, original program had complicated data
> > > > dependency
> > > 
> > > Are there any particular steps to reproduce this?
> > 
> > no, just run it. Needs F21 and 32 bit to reproduce reliably. The problem
> > is not 32 bit dependent but may trigger in different circumstances on
> > different architectures.
> 
> The thing is I can't reproduce this. But I found upstream ticket [1], which
> talks specifically about 32b. So this might help. Would you mind to test
> Ruby 2.2 which should already include the patches?
> 
> 
> [1] https://bugs.ruby-lang.org/issues/8000

I have tried to rebuild  ruby-2.1.6-27.fc21.src.rpm with tk-diff-ruby-2.1.3-p242
but it does not build cleanly:
rpmbuild -ba SPECS/ruby.spec
...
...
...
+ mkdir -p /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/lib/rpm/fileattrs
+ install -m 644 /home/rz/rpmbuild/SOURCES/rubygems.attr /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/lib/rpm/fileattrs
+ install -m 755 /home/rz/rpmbuild/SOURCES/rubygems.req /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/lib/rpm
+ install -m 755 /home/rz/rpmbuild/SOURCES/rubygems.prov /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/lib/rpm
+ mkdir -p /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/share/rubygems/rubygems/defaults
+ cp /home/rz/rpmbuild/SOURCES/operating_system.rb /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/share/rubygems/rubygems/defaults
+ mv /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/share/ruby/gems /home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/share/gems
mv: cannot stat '/home/rz/rpmbuild/BUILDROOT/ruby-2.1.6-28.fc21.i386/usr/share/ruby/gems': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.Kayt0k (%install)

Do we have ruby-2.2 packaged?

> > we still have the problem that ABRT fails to get backtrace of the ruby
> > process
> > and all segfaults end up under this bug as they have identical faulty
> > stacktrace - #979344
> 
> Yes, that is unfortunate. I was suggested by ABRT team to disable the custom
> SIGSEV signal handling in Ruby, but I am a bit reluctant to do so.
> Especially since there is no official way to do so.

The custom SIGSEGV handling was never useful to me in any way, more often it did make it harder to find important diagnostic messages so it may not be a big loss.

Comment 27 Vít Ondruch 2015-05-06 09:51:16 UTC
(In reply to Richard Z. from comment #26)
> I have tried to rebuild  ruby-2.1.6-27.fc21.src.rpm with
> tk-diff-ruby-2.1.3-p242
> but it does not build cleanly:

Please use mock for Ruby builds (or Koji scratch build).

> Do we have ruby-2.2 packaged?

F22+

Comment 28 Richard Z. 2015-05-06 21:48:19 UTC
This does fix it for me
  http://koji.fedoraproject.org/koji/taskinfo?taskID=9667830

Comment 29 Vít Ondruch 2015-05-07 10:59:00 UTC
(In reply to Richard Z. from comment #28)
> This does fix it for me
>   http://koji.fedoraproject.org/koji/taskinfo?taskID=9667830

Thanks for testing. So you just took the patch [1] from upstream ticket and that is it if I understand it correctly.

Since upstream had some objections about backporting it for 2.1 and older, I  prepared stripped down version of that patch, which might be suitable for upstream. Would you mind to test the scratch build [2] if that works for you as well?


[1] https://bugs.ruby-lang.org/attachments/download/4790/tk-diff-ruby-2.1.3-p242
[2] http://koji.fedoraproject.org/koji/taskinfo?taskID=9676324

Comment 30 Richard Z. 2015-05-07 22:48:08 UTC
(In reply to Vít Ondruch from comment #29)

> Thanks for testing. So you just took the patch [1] from upstream ticket and
> that is it if I understand it correctly.

exactly.

> Since upstream had some objections about backporting it for 2.1 and older, I
> prepared stripped down version of that patch, which might be suitable for
> upstream. Would you mind to test the scratch build [2] if that works for you
> as well?

works fine.

Comment 31 Fedora Update System 2015-05-11 11:48:14 UTC
ruby-2.1.6-29.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/ruby-2.1.6-29.fc21

Comment 32 Vít Ondruch 2015-05-11 11:52:22 UTC
(In reply to Richard Z. from comment #30)
> > Since upstream had some objections about backporting it for 2.1 and older, I
> > prepared stripped down version of that patch, which might be suitable for
> > upstream. Would you mind to test the scratch build [2] if that works for you
> > as well?
> 
> works fine.

Thanks for testing. Actually I did not noticed that there is already upstream backport request for Ruby 2.1 with similar patch to mine last one :)

Comment 33 Fedora Update System 2015-05-12 20:39:01 UTC
Package ruby-2.1.6-29.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ruby-2.1.6-29.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-8027/ruby-2.1.6-29.fc21
then log in and leave karma (feedback).

Comment 34 Fedora Update System 2015-05-21 17:33:33 UTC
ruby-2.1.6-29.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.