Bug #10045

SegFault in BigDecimal in 2.1.2p95

Added by David Kennedy 12 months ago. Updated 9 months ago.

[ruby-core:63769]
Status:Feedback
Priority:Normal
Assignee:Kenta Murata
ruby -v:ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] Backport:2.0.0: UNKNOWN, 2.1: UNKNOWN

Description

We use Travis CI to build our code and are having issues with some builds terminating; today we caught a segfault in one of the unresponsive builds' logs. It appears to be a segfault in BigDecimal. This is in Ruby 2.1.2p95 which is currently the latest version, and we cannot see a similar bug listed already.

Unfortunately it is not easy to reproduce this bug on demand; it may be platform specific? Stack trace attached along with a little of the header matter from Travis to list Ruby versions etc.

setup build cache
attempting to download cache archive
found cache
rvm.1
$ rvm use 2.1.2 --install --binary --fuzzy
ruby-2.1.2 is not installed - installing.
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-2.1.2.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.1.2 - #configure
ruby-2.1.2 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.2M  100 21.2M    0     0  25.6M      0 --:--:-- --:--:-- --:--:-- 26.0M
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.1.2 - #validate archive
ruby-2.1.2 - #extract
ruby-2.1.2 - #validate binary
ruby-2.1.2 - #setup
ruby-2.1.2 - #making binaries executable..
Rubygems 2.2.2 already available in installed ruby, skipping installation, use --force to reinstall.
ruby-2.1.2 - #gemset created /home/travis/.rvm/gems/ruby-2.1.2@global
ruby-2.1.2 - #importing gemset /home/travis/.rvm/gemsets/global.gems................................
ruby-2.1.2 - #generating global wrappers.........
ruby-2.1.2 - #uninstalling gem rubygems-bundler-1.4.4.
ruby-2.1.2 - #gemset created /home/travis/.rvm/gems/ruby-2.1.2
ruby-2.1.2 - #importing gemset /home/travis/.rvm/gemsets/default.gems................
ruby-2.1.2 - #generating default wrappers.........
Using /home/travis/.rvm/gems/ruby-2.1.2
$ export BUNDLE_GEMFILE=$PWD/Gemfile
$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
$ rvm --version
rvm 1.25.25 (latest-minor) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ gem --version
2.2.2
$ bundle --version
Bundler version 1.6.2
adding /home/travis/build/shopkeep/backoffice/vendor/bundle to cache

bug-10045.log Magnifier (542 KB) Nobuyoshi Nakada, 07/16/2014 04:33 PM

History

#1 Updated by David Kennedy 12 months ago

Actually, I'm not sure if this should be core or extensions? Please correct as needed during triage; I'm not familiar with the core project's processes.

#2 Updated by Heesob Park 12 months ago

It seems that this bug is a duplicate of bug #9657.
The bug was fixed and backported to ruby-2.1.2
https://bugs.ruby-lang.org/projects/ruby-21/repository/revisions/45815

The above stack trace shows that rubygems(bigdecimal-1.2.5) version of BigDecimal module is used instead of embedded extension library version.

Try after removing bigdecimal-1.2.5 gem.

#3 Updated by Nobuyoshi Nakada 12 months ago

#4 Updated by Kenta Murata 12 months ago

  • Assignee set to Kenta Murata

#5 Updated by David Kennedy 11 months ago

I've been unable to replicate the segfault on demand.

Because I've been unable to create the segfault on demand I am unwilling to remove the BigDecimal-1.2.5 gem - we started using it specifically to avoid another segfault a few months ago (possibly https://bugs.ruby-lang.org/issues/9657? but I am not sure)

Looking at 2.1.2 head the integrated version of BigDecimal is at 2.1.4, so removing the BigDecimal external gem would leave us exposed to the previous segfault bug.

#6 Updated by Zachary Scott 11 months ago

  • Status changed from Open to Assigned

#7 Updated by Zachary Scott 11 months ago

Does using the gem fix the segfaults for you?

#8 Updated by Hiroshi SHIBATA 9 months ago

  • Status changed from Assigned to Feedback
  • Priority changed from 5 to Normal

Could you try with latest version of Ruby 2.1?

Also available in: Atom PDF