Skip to content

Docker Arm64 Unsupported Floating Point Type: f128 #2578

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

Open
WozniakMac opened this issue Jan 20, 2022 · 3 comments
Open

Docker Arm64 Unsupported Floating Point Type: f128 #2578

WozniakMac opened this issue Jan 20, 2022 · 3 comments

Comments

@WozniakMac
Copy link

WozniakMac commented Jan 20, 2022

Tried to run my project on truffleruby and got this error multiple times.

#25 36.43 Bundler::GemRequireError: There was an error while trying to load the gem 'oj'.
#25 36.43 Gem Load Error is: Unsupported Floating Point Type: f128 (com.oracle.truffle.llvm.runtime.except.LLVMParserException)

This same error is with those gems too

gem "aws-sdk-firehose", "~> 1"
gem "aws-sdk-quicksight", "~> 1"
gem "aws-sdk-s3", "~> 1"

I use arm64 version on docker (created docker image based on debian by myself). Not sure if it fails on x64 because I'm stuck with my M1 for now.
https://github.com/oracle/truffleruby/releases/download/vm-21.3.0/truffleruby-21.3.0-linux-aarch64.tar.gz

Full stack trace

#25 36.43 rake aborted!
#25 36.43 Bundler::GemRequireError: There was an error while trying to load the gem 'oj'.
#25 36.43 Gem Load Error is: Unsupported Floating Point Type: f128 (com.oracle.truffle.llvm.runtime.except.LLVMParserException)
#25 36.43 Translated to internal error
#25 36.43 Backtrace for gem load error is:
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `gem_original_require'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `block in require'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:299:in `load_dependency'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `require'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/oj-3.13.7/lib/oj.rb:13:in `<top (required)>'
#25 36.43 <internal:core> core/kernel.rb:234:in `gem_original_require'
#25 36.43 /opt/truffleruby-21.3.0-linux-aarch64/lib/gems/gems/bundler-2.2.33/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
#25 36.43 /opt/truffleruby-21.3.0-linux-aarch64/lib/gems/gems/bundler-2.2.33/lib/bundler/runtime.rb:55:in `each'
#25 36.43 /opt/truffleruby-21.3.0-linux-aarch64/lib/gems/gems/bundler-2.2.33/lib/bundler/runtime.rb:55:in `block in require'
#25 36.43 /opt/truffleruby-21.3.0-linux-aarch64/lib/gems/gems/bundler-2.2.33/lib/bundler/runtime.rb:44:in `each'
#25 36.43 /opt/truffleruby-21.3.0-linux-aarch64/lib/gems/gems/bundler-2.2.33/lib/bundler/runtime.rb:44:in `require'
#25 36.43 /opt/truffleruby-21.3.0-linux-aarch64/lib/gems/gems/bundler-2.2.33/lib/bundler.rb:175:in `require'
#25 36.43 /app/config/application.rb:10:in `<top (required)>'
#25 36.43 <internal:core> core/kernel.rb:234:in `gem_original_require'
#25 36.43 /app/Rakefile:7:in `<top (required)>'
#25 36.43 <internal:core> core/kernel.rb:376:in `load'
#25 36.43 <internal:core> core/kernel.rb:376:in `load'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
#25 36.43 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
#25 36.43 ./bin/rake:9:in `<main>'
#25 36.43 Bundler Error Backtrace:
#25 36.44 /app/config/application.rb:10:in `<top (required)>'
#25 36.44 <internal:core> core/kernel.rb:234:in `gem_original_require'
#25 36.44 /app/Rakefile:7:in `<top (required)>'
#25 36.44 <internal:core> core/kernel.rb:376:in `load'
#25 36.44 <internal:core> core/kernel.rb:376:in `load'
#25 36.44 
#25 36.44 Caused by:
#25 36.44 Unsupported Floating Point Type: f128 (com.oracle.truffle.llvm.runtime.except.LLVMParserException)
#25 36.44 Translated to internal error
#25 36.44 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `gem_original_require'
#25 36.44 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `block in require'
#25 36.44 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:299:in `load_dependency'
#25 36.44 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/activesupport-6.1.4.3/lib/active_support/dependencies.rb:332:in `require'
#25 36.44 /app/vendor/bundle/truffleruby/2.7.4.21.3.0.1/gems/oj-3.13.7/lib/oj.rb:13:in `<top (required)>'
#25 36.44 <internal:core> core/kernel.rb:234:in `gem_original_require'
#25 36.44 /app/config/application.rb:10:in `<top (required)>'
#25 36.44 <internal:core> core/kernel.rb:234:in `gem_original_require'
#25 36.44 /app/Rakefile:7:in `<top (required)>'
#25 36.44 <internal:core> core/kernel.rb:376:in `load'
#25 36.44 <internal:core> core/kernel.rb:376:in `load'
#25 36.44 (See full trace by running task with --trace)
@aardvark179
Copy link
Contributor

This is likely a C extension defining something as a long double which is a 128 floating point number on systems which use the Arm Architecture Procedure Call Standard, as Aarch64 Linux does. oj appears to use long double as a simple way to reduce their error when parsing numbers, we might be able to patch it to avoid this problem. I'm not entirely sure why they seem to have written their own float parser, I'll take a look at the history and see if I can figure it out.

@eregon
Copy link
Member

eregon commented Jan 20, 2022

I'll take a look at the history and see if I can figure it out.

Maybe it's the famous dtoa() DoS because it's not linear and creates arbitrarily big integers when parsing long floats (IIRC)? I think an usual fix is to just limit the length of the float to parse and if it's just between 2 floats then whatever cut at a reasonable length.

@eregon
Copy link
Member

eregon commented Jan 21, 2022

Sulong/GraalVM LLVM does not support fp128 yet, which is what long double resolves to on linux-aarch64.
Internal Sulong issue about fp128: GR-36514

@eregon eregon removed the aarch64 label May 5, 2025
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

4 participants