Project

General

Profile

Actions

Bug #10045

closed

SegFault in BigDecimal in 2.1.2p95

Added by dkennedy (David Kennedy) over 10 years ago. Updated over 5 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
[ruby-core:63769]

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


Files

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

Updated by dkennedy (David Kennedy) over 10 years 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.

Updated by phasis68 (Heesob Park) over 10 years 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.

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

Updated by mrkn (Kenta Murata) over 10 years ago

  • Assignee set to mrkn (Kenta Murata)

Updated by dkennedy (David Kennedy) over 10 years 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.

Actions #6

Updated by zzak (zzak _) over 10 years ago

  • Status changed from Open to Assigned

Updated by zzak (zzak _) over 10 years ago

Does using the gem fix the segfaults for you?

Updated by hsbt (Hiroshi SHIBATA) about 10 years ago

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

Could you try with latest version of Ruby 2.1?

Actions #9

Updated by naruse (Yui NARUSE) almost 7 years ago

  • Target version deleted (2.6)
Actions #10

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0