-
Notifications
You must be signed in to change notification settings - Fork 4
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
Crash on Ruby 3.0 and 3.1 after requiring expressir/express/parser
#109
Comments
I wonder if this is related to Expressir's occasional segfaults in #74 |
I was able to reproduce this issue on MacOS only |
This is for the extension build at rake-compiler-dock
This is for locally built extension:
It looks like in the first static library was used and it may be the root cause |
Latest findings There are two possible approaches:
|
I suppose we should do both? |
Can I ask for your help, please ? Attached please find an expresser prototype built differently. Does it fix this issue and metanorma/metanorma-cli#272) in your environment ? expressir-1.2.2-arm64-darwin-21.gem.gz Your help is much appreciated. Thanks |
@maxirmx I've just tried it with Ruby 3.0 (it doesn't install on Ruby 3.1): me:~/Downloads: gem install expressir-1.2.2-arm64-darwin-21.gem
ERROR: Error installing expressir-1.2.2-arm64-darwin-21.gem:
expressir-1.2.2-arm64-darwin-21 requires Ruby version >= 3.0, < 3.1.dev. The current ruby version is 3.1.1.18. When requiring me:~/Downloads: rbenv shell 3.0.3
me:~/Downloads: gem install expressir-1.2.2-arm64-darwin-21.gem
Fetching rice-4.0.3.gem
Successfully installed rice-4.0.3
Successfully installed expressir-1.2.2-arm64-darwin-21
2 gems installed
me:~/Downloads: irb
irb(main):001:0> require 'expressir'
=> true
irb(main):002:0> require 'expressir/express/parser'
/Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/parser.rb:5:in `require_relative': dlopen(/Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/express_parser.bundle, 0x0009): Library not loaded: /Users/maxirmx/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib (LoadError)
Referenced from: /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/express_parser.bundle
Reason: tried: '/Users/maxirmx/.rbenv/versions/3.0.0/lib/libruby.3.0.dylib' (no such file), '/usr/local/lib/libruby.3.0.dylib' (no such file), '/usr/lib/libruby.3.0.dylib' (no such file) - /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/express_parser.bundle
from /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/parser.rb:5:in `rescue in <top (required)>'
from /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/parser.rb:1:in `<top (required)>'
from <internal:/Users/me/.rbenv/versions/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/me/.rbenv/versions/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from (irb):2:in `<main>'
from /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/irb-1.3.7/exe/irb:11:in `<top (required)>'
from /Users/me/.rbenv/versions/3.0.3/bin/irb:25:in `load'
from /Users/me/.rbenv/versions/3.0.3/bin/irb:25:in `<main>'
/Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/parser.rb:3:in `require_relative': cannot load such file -- /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/3.0/express_parser (LoadError)
from /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/expressir-1.2.2-arm64-darwin-21/lib/expressir/express/parser.rb:3:in `<top (required)>'
from <internal:/Users/me/.rbenv/versions/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/me/.rbenv/versions/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from (irb):2:in `<main>'
from /Users/me/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/irb-1.3.7/exe/irb:11:in `<top (required)>'
from /Users/me/.rbenv/versions/3.0.3/bin/irb:25:in `load'
from /Users/me/.rbenv/versions/3.0.3/bin/irb:25:in `<main>' |
Thanks |
Crash (segfault) happens during execution of static destructors of some Rice objects. PR #110 disables destructors for static objects. It may be considered as permanent solution IMHO |
Interestingly this only happens at exit?
From: lutaml/lutaml#33
The text was updated successfully, but these errors were encountered: