run in rails occur crash, core dump
include rails Gemfile, start rails, it's crash and core dump
1497 /usr/local/lib/ruby/gems/2.5.0/gems/numo-linalg-0.1.4/lib/numo/linalg/lapack.so
- Process memory map:
56331ff11000-563320235000 r-xp 00000000 fd:01 271503 /usr/local/bin/ruby 563320435000-56332043a000 r--p 00324000 fd:01 271503 /usr/local/bin/ruby 56332043a000-56332043b000 rw-p 00329000 fd:01 271503 /usr/local/bin/ruby 56332043b000-56332044d000 rw-p 00000000 00:00 0 5633209b0000-5633240af000 rw-p 00000000 00:00 0 [heap] 7f3e656d7000-7f3e6671f000 r--s 00000000 fd:01 271503 /usr/local/bin/ruby 7f3e6671f000-7f3e66758000 r-xp 00000000 fd:01 1838621 /usr/local/lib/ruby/gems/2.5.0/gems/numo-linalg-0.1.4/lib/numo/linalg/lapack.so 7f3e66758000-7f3e66957000 ---p 00039000 fd:01 1838621 /usr/local/lib/ruby/gems/2.5.0/gems/numo-linalg-0.1.4/lib/numo/linalg/lapack.so 7f3e66957000-7f3e66958000 r--p 00038000 fd:01 1838621 /usr/local/lib/ruby/gems/2.5.0/gems/numo-linalg-0.1.4/lib/numo/linalg/lapack.so 7f3e66958000-7f3e66959000 rw-p 00039000 fd:01 1838621 /usr/local/lib/ruby/gems/2.5.0/gems/numo-linalg-0.1.4/lib/numo/linalg/lapack.so 7f3e66959000-7f3e6695a000 rw-p 00000000 00:00 0 7f3e6695a000-7f3e6697c000 r-xp 00000000 fd:01 1838602 /usr/local/lib/ruby/gems/2.5.0/gems/numo-linalg-0.1.4/lib/numo/linalg/blas.so
I would appreciate if you could show me a sample code to reproduce this crash.
Environment is: ruby 2.5.3, rails 5.2, ubuntu 18.0.4 In a new rails project, just add below statement in Gemfile: gem "numo-narray" gem "numo-linalg"
Than run: rails s It will crash and occur core dump like above (* Windows environment is no problem, CentOS 7 also has same problem)
I got same crash, but this is due to a problem in ruby 2.5.x.: https://bugs.ruby-lang.org/issues/15200 Possible solutions:
- Use ruby 2.6.
- Apply patch to numo-linalg: https://github.com/ruby-numo/numo-linalg/commit/87732cab8c5fa3dbffd0dbdaf206c6076053a17e
- Unuse 'bootsnap' option which is set in config/boot.rb in your rails project.