Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubinius fails to build on macOS in GitHub Actions #3830

Closed
1 task done
eregon opened this issue Jan 25, 2020 · 15 comments
Closed
1 task done

Rubinius fails to build on macOS in GitHub Actions #3830

eregon opened this issue Jan 25, 2020 · 15 comments

Comments

@eregon
Copy link
Contributor

eregon commented Jan 25, 2020

  1. What command did you run?

I ran

./configure --prefix=$HOME/.rubies/rubinius-4.13
make
make install
  1. What behavior did you expect?

I expected it builds.

  1. What behavior did you get instead?

I observed a SEGV.

  1. What version of Rubinius?

4.13

  1. What version of operating system?

macOS Mojave 10.15.

  1. How did you build your version of Rubinius?
  • I built manually from a tarball.

I got a SEGV while building on macOS:

RBC rexml/element.rb
The Rubinius process is aborting with signal: SIGSEGV
--- begin system info ---
node: info: Mac-1297.local Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
--- end system info ---
--- begin rubinius info ---
process: info: runner rbx 59061 4.13 10.0 2020-01-20 806f3be4 9.0.0 JIT disabled
--- end rubinius info ---
--- begin system backtrace ---
0   rbx                                 0x000000010d2d8cf9 _ZN8rubiniusL20abandon_ship_handlerEiP9__siginfoPv + 249
1   libsystem_platform.dylib            0x00007fff6486742d _sigtramp + 29
2   ???                                 0x00007000092cef60 0x0 + 123145456250720
3   rbx                                 0x000000010d250fbb _ZN8rubiniusL7kind_ofINS_6StringEEEbPKNS_6ObjectE + 34
4   rbx                                 0x000000010d250f3d _ZN8rubinius12instructions11object_to_sEPNS_5StateEPNS_9CallFrameEl + 118
5   rbx                                 0x000000010d250e9d _ZN8rubinius11interpreter11object_to_sEPNS_5StateEPNS_9CallFrameEPKl + 33
6   rbx                                 0x000000010d24aac0 _ZN8rubinius11Interpreter7executeEPNS_5StateEPNS_11MachineCodeE + 64

https://github.com/eregon/ruby-install-builder/runs/408680687

A second try also ended in a SEGV, this time for RBC rubygems/package.rb

RBC rubygems/package.rb
The Rubinius process is aborting with signal: SIGSEGV
--- begin system info ---
node: info: Mac-1457.local Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
--- end system info ---
--- begin rubinius info ---
process: info: runner rbx 59128 4.13 10.0 2020-01-20 806f3be4 9.0.0 JIT disabled
--- end rubinius info ---
--- begin system backtrace ---
0   rbx                                 0x00000001047eccf9 _ZN8rubiniusL20abandon_ship_handlerEiP9__siginfoPv + 249
1   libsystem_platform.dylib            0x00007fff695c142d _sigtramp + 29
2   rbx                                 0x000000010475eac0 _ZN8rubinius11Interpreter7executeEPNS_5StateEPNS_11MachineCodeE + 64
3   rbx                                 0x0000000104767a8e _ZN8rubiniusL2asINS_9ByteArrayEEEPT_PNS_6ObjectE + 32
4   rbx                                 0x0000000104767799 _ZN8rubinius12instructions12string_buildEPNS_5StateEPNS_9CallFrameEl + 146
5   rbx                                 0x00000001047676dd _ZN8rubinius11interpreter12string_buildEPNS_5StateEPNS_9CallFrameEPKl + 33

https://github.com/eregon/ruby-install-builder/runs/408693316

Extracted from #3828

@eregon
Copy link
Contributor Author

eregon commented Jan 25, 2020

Additional questions:

  • It seems llvm from Homebrew needs to be installed, is the system one not enough?
  • Is llvm only needed at build time or also at runtime?

I would be unfortunate to need it at runtime because it's not installed by default in GitHub Actions and it takes ~1min35s to install via Homebrew.

BTW, https://book.rubinius.com/manuscript/getting_rubinius.html mentions llvm38 but that formula no longer exists.

@eregon
Copy link
Contributor Author

eregon commented Jan 25, 2020

A third try, also SEGV:

RBC core/time.rb
The Rubinius process is aborting with signal: SIGSEGV
--- begin system info ---
node: info: Mac-1297.local Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
--- end system info ---
--- begin rubinius info ---
process: info: runner rbx 59020 4.13 10.0 2020-01-20 806f3be4 9.0.0 JIT disabled
--- end rubinius info ---
--- begin system backtrace ---
0   rbx                                 0x0000000109096cf9 _ZN8rubiniusL20abandon_ship_handlerEiP9__siginfoPv + 249
1   libsystem_platform.dylib            0x00007fff6ecb042d _sigtramp + 29
2   ???                                 0x00007fc796287750 0x0 + 140495194453840
3   rbx                                 0x0000000109011a8e _ZN8rubiniusL2asINS_9ByteArrayEEEPT_PNS_6ObjectE + 32
4   rbx                                 0x0000000109011799 _ZN8rubinius12instructions12string_buildEPNS_5StateEPNS_9CallFrameEl + 146
5   rbx                                 0x00000001090116dd _ZN8rubinius11interpreter12string_buildEPNS_5StateEPNS_9CallFrameEPKl + 33
6   rbx                                 0x0000000109008ac0 _ZN8rubinius11Interpreter7executeEPNS_5StateEPNS_11MachineCodeE + 64

https://github.com/eregon/ruby-install-builder/runs/408706695

@brixen
Copy link
Member

brixen commented Jan 26, 2020

@eregon I fixed a bunch of stuff for memory headers and memory handles, I'll tag a release soon.

For LLVM, it's only a build-time dependency, but I'm only going to support the latest release (currently 9.0). If that isn't available, the build just won't have any LLVM-dependent features. I'll take me some time to clean up all the obsolete LLVM cruft, so thanks for pointing that out.

@brixen
Copy link
Member

brixen commented Jan 26, 2020

@eregon please try 4.14.

@eregon
Copy link
Contributor Author

eregon commented Jan 27, 2020

4.14 still segfaults:
https://github.com/eregon/ruby-install-builder/runs/410673147

RBC core/file.rb
The Rubinius process is aborting with signal: SIGSEGV
--- begin system info ---
node: info: Mac-1461.local Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
--- end system info ---
--- begin rubinius info ---
process: info: runner rbx 59094 4.14 10.0 2020-01-26 02f6c527 9.0.0 JIT disabled
--- end rubinius info ---
--- begin system backtrace ---
0   rbx                                 0x000000010bdc9859 _ZN8rubiniusL20abandon_ship_handlerEiP9__siginfoPv + 249
1   libsystem_platform.dylib            0x00007fff642d442d _sigtramp + 29
2   ???                                 0x000070000901ee10 0x0 + 123145453432336
3   rbx                                 0x000000010bd794fe _ZN8rubinius6memory8MainHeap14collect_finishEPNS_5StateE + 46
4   rbx                                 0x000000010bd7cc55 _ZN8rubinius6memory12MemoryTracer10trace_heapEPNS_5StateE + 1525
5   rbx                                 0x000000010bd769d1 _ZNSt3__110__function6__funcIZN8rubinius6memory9Collector7collectEPNS2_5StateEE3$_2NS_9allocatorIS7_EEFvvEEclEv + 113
6   rbx                                 0x000000010bd7558f _ZN8rubinius6memory9Collector19stop_for_collectionEPNS_5StateENSt3__18functionIFvvEEE + 367
7   rbx                                 0x000000010bd75653 _ZN8rubinius6memory9Collector7collectEPNS_5StateE + 99
8   rbx                                 0x000000010bd759fd _ZN8rubinius6memory9Collector6Worker3runEPNS_5StateE + 269
9   rbx                                 0x000000010bd6fb91 _ZN8rubinius13MachineThread3runEPv + 161
10  libsystem_pthread.dylib             0x00007fff642dfe65 _pthread_start + 148
11  libsystem_pthread.dylib             0x00007fff642db83b thread_start + 15
--- end system backtrace ---
--- begin Ruby backtraces ---
--- Thread 1 backtrace ---
Integer#to_s in core/integer.rb:1498 (+38)
__block__ in rubinius/code/compiler/compiled_file.rb:316 (+52)
...

@eregon
Copy link
Contributor Author

eregon commented Jan 27, 2020

This time it seems a SEGV from the GC.

@brixen
Copy link
Member

brixen commented Jan 29, 2020

@eregon hm, I fixed something there, too. I'm in the middle of a pretty big reorg of some internal data structures. I've switched CI to Travis, which is building. I'll ping you when I tag the next release.

@eregon
Copy link
Contributor Author

eregon commented Feb 2, 2020

I got a lucky build that succeeded: https://github.com/eregon/ruby-builder/runs/421811427
I didn't change anything since the last build though, so it just seems luck to not get the segfault.

@eregon
Copy link
Contributor Author

eregon commented Feb 2, 2020

OTOH it still segfaults at runtime for bundle install:
https://github.com/eregon/use-ruby-action/runs/421838829
Also on Ubuntu 16.04:
https://github.com/eregon/use-ruby-action/runs/421838746

@brixen
Copy link
Member

brixen commented Feb 2, 2020

@eregon you must use the version of Bundler that is installed by Rubinius.

You may have better success with 4.15.

@eregon
Copy link
Contributor Author

eregon commented Feb 2, 2020

Where is the bundle executable? It's not in install_prefix/bin/bundle like in other Ruby, so that's why the logic ends up installing Bundler (https://github.com/eregon/ruby-builder/runs/421811427).
I guess in install_prefix/gems/bin/bundle?
MRI 2.6+ ships a bin/bundle so it would be nice to match that.

@eregon
Copy link
Contributor Author

eregon commented Feb 2, 2020

Rubinius 4.15 fails to compile on Ubuntu 16.04:
https://github.com/eregon/ruby-builder/runs/421971027

2: CXX machine/memory.cpp
machine/memory.cpp:195:29: error: unused variable 'vm' [-Werror,-Wunused-variable]
  if(rubinius::ThreadState* vm = rubinius::ThreadState::current()) {
                            ^
machine/memory.cpp:206:29: error: unused variable 'vm' [-Werror,-Wunused-variable]
  if(rubinius::ThreadState* vm = rubinius::ThreadState::current()) {
                            ^
machine/memory.cpp:216:29: error: unused variable 'vm' [-Werror,-Wunused-variable]
  if(rubinius::ThreadState* vm = rubinius::ThreadState::current()) {
                            ^
machine/memory.cpp:230:29: error: unused variable 'vm' [-Werror,-Wunused-variable]
  if(rubinius::ThreadState* vm = rubinius::ThreadState::current()) {
                            ^
3: CXX machine/memory/code_manager.cpp

@eregon
Copy link
Contributor Author

eregon commented Feb 2, 2020

It still segfaults with 4.14 on Ubuntu 16.04 with the bundled bundler:
https://github.com/eregon/ruby-builder/runs/422071201

@brixen
Copy link
Member

brixen commented Feb 2, 2020

@eregon not supporting anything older than 18.04. Bundler is pre-installed, so you'll need to point to it with your script. If you're curious https://github.com/rubygems/bundler/issues/6274.

@brixen
Copy link
Member

brixen commented Feb 2, 2020

@eregon please close this issue if 18.04 is working with pre-installed Bundler.

@eregon eregon closed this as completed Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants