[Bug 994726] New: combination of requires causes openssl.so segmentation fault
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
Bug ID: 994726
Summary: combination of requires causes openssl.so segmentation
fault
Classification: openSUSE
Product: openSUSE Distribution
Version: Leap 42.1
Hardware: x86-64
OS: Other
Status: NEW
Severity: Major
Priority: P5 - None
Component: Ruby
Assignee: ruby-devel@suse.de
Reporter: vanjab@icetec.com
QA Contact: qa-bugs@suse.de
Found By: ---
Blocker: ---
Running our ruby app on a new KVM guest with fresh Leap 42.1 install causes a
segfault.
After lots of tracing I created a one-line test case where segfault happens:
#> irb -rwebrick -rmysql2 -ropenssl
The order of requires is important - it crashes only in this order (from my
experience at least).
mysql2 is installed by
#> sudo gem install --no-document mysql2
MySQL was at first installed via Yast2 (default), but after segfaults I
uninstalled it and installed the official RPMs from MySQL website but with the
same end result and no change in behavior.
I also tried using the ruby 2.2 from Yast2 but it was experiencing identical
issue.
Error text:
/usr/lib64/ruby/2.1.0/x86_64-linux-gnu/openssl.so: [BUG] Segmentation fault at
0x00000000000000
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux-gnu]
-- Control frame information -----------------------------------------------
c:0013 p:-5851352 s:0056 e:000055 TOP [FINISH]
c:0012 p:---- s:0054 e:000053 CFUNC :require
c:0011 p:0115 s:0050 e:000049 METHOD
/usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55
c:0010 p:0007 s:0040 e:000039 TOP /usr/lib64/ruby/2.1.0/openssl.rb:17
[FINISH]
c:0009 p:---- s:0038 e:000037 CFUNC :require
c:0008 p:0115 s:0034 e:000033 METHOD
/usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55
c:0007 p:0015 s:0024 e:000023 BLOCK /usr/lib64/ruby/2.1.0/irb/init.rb:286
[FINISH]
c:0006 p:---- s:0021 e:000020 CFUNC :each
c:0005 p:0013 s:0018 e:000017 METHOD /usr/lib64/ruby/2.1.0/irb/init.rb:284
c:0004 p:0063 s:0013 e:000012 METHOD /usr/lib64/ruby/2.1.0/irb/init.rb:20
c:0003 p:0039 s:0009 e:000008 METHOD /usr/lib64/ruby/2.1.0/irb.rb:380
c:0002 p:0021 s:0004 E:0023e8 EVAL /usr/bin/irb:11 [FINISH]
c:0001 p:0000 s:0002 E:0010f8 TOP [FINISH]
-- Ruby level backtrace information ----------------------------------------
/usr/bin/irb:11:in `<main>'
/usr/lib64/ruby/2.1.0/irb.rb:380:in `start'
/usr/lib64/ruby/2.1.0/irb/init.rb:20:in `setup'
/usr/lib64/ruby/2.1.0/irb/init.rb:284:in `load_modules'
/usr/lib64/ruby/2.1.0/irb/init.rb:284:in `each'
/usr/lib64/ruby/2.1.0/irb/init.rb:286:in `block in load_modules'
/usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib64/ruby/2.1.0/openssl.rb:17:in `
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
Vanja Bucic
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c1
Marcus Rückert
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c2
--- Comment #2 from Vanja Bucic
does this also happen if you use the ruby2.1-rubygem-mysql2 package that comes with the distro?
if you need a newer version you could pick the package from devel:languages:ruby:extensions.
I cant reproduce the problem with the package here.
If I use the prebuilt version of mysql2 as you suggested the error does not happen. But it is not realistic to think we can always use the prebuilt version because 'bundle update' and 'bundle install' will install whatever exact gem version the project needs and there may be many projects. There must be something wrong to cause segfault on a compiled gem, and openssl seems to be involved. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c4
--- Comment #4 from Vanja Bucic
/lib64/libcrypto.so.1.0.0(EVP_add_digest+0x56) [0x7f9f42bd0326] /usr/lib64/libssl.so.37(SSL_library_init+0x235) [0x7f9f41897065]
you are mixing openssl and libressl here in 1 address space, this does not work.
What did you build against libressl?
It is a fresh Leap 42.1 minimal server install. We did not install anything extra, just basic ruby2.1 (2.2), mysql, core devel tools. Did 'gem install mysql2' and saw a crash. Was unaware of any libressl/openssl issues. Is it possible that gem build process would default to libressl?? ... Just looked into it inside yast2: libressl-devel package is installed by default, while openssl-devel is not, even though libressl itself is not installed at all. So everything is set up to use openssl, and compiled with openssl, but the package manager defaulted to libressl-devel. Gem compiled with whatever was there (libressl) and conflict was created. Does that sound right? If yes, someone needs to fix the package pattern in yast. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c5
--- Comment #5 from Marcus Rückert
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c6
--- Comment #6 from Vanja Bucic
while your assumption is almost correct, you first need to find out *what* pulled libressl-devel.
rpm -e libressl-devel might give you a hint.
Heh, i uninstalled it yesterday without any complaint or dependency issues. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c7
Marcus Rückert
http://bugzilla.opensuse.org/show_bug.cgi?id=994726
http://bugzilla.opensuse.org/show_bug.cgi?id=994726#c8
--- Comment #8 from Vanja Bucic
closing this bug as invalid.
btw: you could look at into packaging gems and rails apps. we do that for suse quite successfully. e.g. discourse (currently waiting for a new mini_racer release) or gitlab.
Will keep an eye on libressl-devel next time we do installs from scratch and see what is causing it to be pulled in. Will update this issue if something significant is found. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com