SegFault in BigDecimal in 2.1.2p95
|ruby -v:||ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]||Backport:||2.0.0: UNKNOWN, 2.1: UNKNOWN|
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 <firstname.lastname@example.org>, Michal Papis <email@example.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
#2 Updated by Heesob Park 11 months ago
It seems that this bug is a duplicate of bug #9657.
The bug was fixed and backported to ruby-2.1.2
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.
#5 Updated by David Kennedy 10 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.