Project

General

Profile

Actions

Bug #14653

closed

Bootsnap gets segmentation fault

Added by yahonda (Yasuo Honda) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-03-29 trunk 63037) [x86_64-linux]
[ruby-core:86398]

Description

Steps to reproduce

$ rbenv install 2.6.0-dev
$ rbenv global 2.6.0-dev
$ gem install bundler
$ git clone https://github.com/Shopify/bootsnap
$ cd bootsnap
$ bundle
$ rake
$ bundle exec bin/testunit

Expected result

bundle exec bin/testunit should pass. Ruby 2.5.1 passes all tests.

Actual result

$ ruby -v
ruby 2.6.0dev (2018-03-29 trunk 63037) [x86_64-linux]
$ rake
install -c tmp/x86_64-linux/bootsnap/2.6.0/bootsnap.so lib/bootsnap/bootsnap.so
cp tmp/x86_64-linux/bootsnap/2.6.0/bootsnap.so tmp/x86_64-linux/stage/lib/bootsnap/bootsnap.so
$ bundle exec bin/testunit
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/return_values.rb:19: warning: mismatched indentations at 'when' with 'case' at 18
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/return_values.rb:20: warning: mismatched indentations at 'when' with 'case' at 18
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/return_values.rb:21: warning: mismatched indentations at 'else' with 'case' at 18
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/yield_parameters.rb:15: warning: mismatched indentations at 'when' with 'case' at 14
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/yield_parameters.rb:16: warning: mismatched indentations at 'when' with 'case' at 14
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/yield_parameters.rb:17: warning: mismatched indentations at 'else' with 'case' at 14
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:23: warning: mismatched indentations at 'when' with 'case' at 22
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:24: warning: mismatched indentations at 'else' with 'case' at 22
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:82: warning: mismatched indentations at 'when' with 'case' at 81
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:83: warning: mismatched indentations at 'when' with 'case' at 81
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:84: warning: mismatched indentations at 'when' with 'case' at 81
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:85: warning: mismatched indentations at 'else' with 'case' at 81
Run options: --seed 8304

# Running:

...../home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/object_methods.rb:79: [BUG] Segmentation fault at 0x000055d682994898
ruby 2.6.0dev (2018-03-29 trunk 63037) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0027 p:---- s:0149 e:000148 CFUNC  :caller
c:0026 p:0053 s:0145 e:000142 BLOCK  /home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/object_methods.rb:79
c:0025 p:0032 s:0137 e:000136 METHOD /home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/argument_iterator.rb:15
c:0024 p:0108 s:0132 e:000131 METHOD /home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/object_methods.rb:74
Segmentation fault (core dumped)
$

Related

I have reported these issues at Rails and Bootsnap and disucssed it should be filed to bugs.ruby-lang.org.
https://github.com/rails/rails/issues/32339
https://github.com/Shopify/bootsnap/issues/148

Also, I have found this report. It looks like similar with mine but not sure it is duplicate.
https://bugs.ruby-lang.org/issues/14596


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #14553: Maybe this is too early for this but i encountered issues when using jit with railsClosedActions

Updated by wanabe (_ wanabe) over 6 years ago

I guess it is fixed at [Bug #14553] r63040.
(And it also needs [Bug #14660] r63103 to pass all tests, but although it is not directly related to this issue.)

Would you please retry with latest trunk ruby?

An Execution result of my environment is here.

$ bundle exec bin/testunit && ruby -v
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/return_values.rb:19: warning: mismatched indentations at 'when' with 'case' at 18
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/return_values.rb:20: warning: mismatched indentations at 'when' with 'case' at 18
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/return_values.rb:21: warning: mismatched indentations at 'else' with 'case' at 18
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/yield_parameters.rb:15: warning: mismatched indentations at 'when' with 'case' at 14
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/yield_parameters.rb:16: warning: mismatched indentations at 'when' with 'case' at 14
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/yield_parameters.rb:17: warning: mismatched indentations at 'else' with 'case' at 14
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/cardinality.rb:23: warning: mismatched indentations at 'when' with 'case' at 22
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/cardinality.rb:24: warning: mismatched indentations at 'else' with 'case' at 22
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/cardinality.rb:82: warning: mismatched indentations at 'when' with 'case' at 81
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/cardinality.rb:83: warning: mismatched indentations at 'when' with 'case' at 81
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/cardinality.rb:84: warning: mismatched indentations at 'when' with 'case' at 81
/work/bootsnap/.bundle/ruby/2.6.0/gems/mocha-1.5.0/lib/mocha/cardinality.rb:85: warning: mismatched indentations at 'else' with 'case' at 81
Run options: --seed 31648

# Running:

.....................................................................................................................

Finished in 0.118636s, 986.2100 runs/s, 1711.1165 assertions/s.

117 runs, 203 assertions, 0 failures, 0 errors, 0 skips
ruby 2.6.0dev (2018-04-07 trunk 63107) [x86_64-linux]

Updated by yahonda (Yasuo Honda) over 6 years ago

Thanks for the update. This issue does not reproduce anymore using ruby 2.6.0dev (2018-04-07 trunk 63108) [x86_64-linux]

$ bundle exec bin/testunit
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/return_values.rb:19: warning: mismatched indentations at 'when' with 'case' at 18
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/return_values.rb:20: warning: mismatched indentations at 'when' with 'case' at 18
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/return_values.rb:21: warning: mismatched indentations at 'else' with 'case' at 18
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/yield_parameters.rb:15: warning: mismatched indentations at 'when' with 'case' at 14
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/yield_parameters.rb:16: warning: mismatched indentations at 'when' with 'case' at 14
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/yield_parameters.rb:17: warning: mismatched indentations at 'else' with 'case' at 14
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:23: warning: mismatched indentations at 'when' with 'case' at 22
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:24: warning: mismatched indentations at 'else' with 'case' at 22
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:82: warning: mismatched indentations at 'when' with 'case' at 81
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:83: warning: mismatched indentations at 'when' with 'case' at 81
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:84: warning: mismatched indentations at 'when' with 'case' at 81
/home/yahonda/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/gems/mocha-1.4.0/lib/mocha/cardinality.rb:85: warning: mismatched indentations at 'else' with 'case' at 81
Run options: --seed 25408

# Running:

.....................................................................................................................

Finished in 0.104083s, 1124.1033 runs/s, 1950.3672 assertions/s.

117 runs, 203 assertions, 0 failures, 0 errors, 0 skips
[yahonda@li1885-190 bootsnap (master)]$ ruby -v
ruby 2.6.0dev (2018-04-07 trunk 63108) [x86_64-linux]
$

Thank you!

Actions #3

Updated by wanabe (_ wanabe) over 6 years ago

  • Is duplicate of Bug #14553: Maybe this is too early for this but i encountered issues when using jit with rails added

Updated by wanabe (_ wanabe) over 6 years ago

  • Status changed from Open to Closed

yahonda (Yasuo Honda) wrote:

Thanks for the update. This issue does not reproduce anymore using ruby 2.6.0dev (2018-04-07 trunk 63108) [x86_64-linux]

I'm glad to hear that! Thank you to confirm.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0