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

JRuby fails to load on ppc64le #10755

Open
mew2057 opened this issue May 3, 2019 · 8 comments
Open

JRuby fails to load on ppc64le #10755

mew2057 opened this issue May 3, 2019 · 8 comments

Comments

@mew2057
Copy link

mew2057 commented May 3, 2019

The following is a reproduction of the issue on the jruby issue tracker

I wrote a patch script to repair the jar for our environment.

Environment

  • JRuby bundled in logstash 7.0.0 ( jar is jruby-complete-9.2.7.0.jar)
  • Linux h1 4.14.0-29.el7a.ppc64le Minor web form change #1 SMP Mon Jan 22 16:26:32 EST 2018 ppc64le ppc64le ppc64le GNU/Linux

Other relevant info you may wish to add:

  • Application : Logstash

Expected Behavior

  • When running the environment.rb JRuby should load all modules without exiting execution.

Actual Behavior

  • When the JRuby Application (logstash) is loaded a LoadError is thrown by ffi/ffi. The bubbled error message is somewhat vague (to a user ignorant to JRuby).
[2019-05-03T10:41:38,701][ERROR][org.logstash.Logstash    ] 
java.lang.IllegalStateException: Logstash stopped processing because of an error: 
(LoadError) load error: ffi/ffi -- java.lang.NullPointerException: null

Resolution

I was able to trace the bug to jruby/lib/ruby/stdlib/ffi/platform/powerpc64-linux/. It looks
as though the platform.conf file was not created for this platform. Copying the types.conf file to platform.conf appears to resolve the problem.

@scprek
Copy link

scprek commented May 3, 2019

@mew2057 have you seen this on logstash 6.x.x versions too? I see it on 6.7 at least
There are containers out there that are on logstash 5.x.x https://hub.docker.com/r/ibmcom/logstash. It's multi-arch, even though it says amd64

@mew2057
Copy link
Author

mew2057 commented May 3, 2019

The last level we worked with on our ppc64le machines was 6.3.1, which didn't present the error. We were waiting for the 7.0.0 version before updating for the feature add.

@yaauie
Copy link
Member

yaauie commented May 3, 2019

@scprek Logstash 6.7.x is likely affected, as it bundles the same jruby as 7.x (unverified).

@mew2057 thanks for the clear description here and for filing the bug upstream. We will work to get the upstream fix included in a future distribution of Logstash.

@headius
Copy link

headius commented Jun 24, 2019

JRuby folks are willing to help figure this out, but without access to a PPC environment it's very difficult for us to investigate. Perhaps you can suggest a PPC cloud or similar environment we could use?

@nasica88
Copy link

nasica88 commented Nov 13, 2019

I had the same error with jruby-complete-9.2.8.0.jar on Redhat 8.0 ppc64le (IBM POWER9). It was fixed by copying the missing platform.conf from types.conf, as suggested above. Thanks.

For the folks new to this, I summarized what I tested here.

@goferito
Copy link

I've just fixed the issue with this script:
https://gist.github.com/alexalouit/a857a6de10dfdaf7485f7c0cccadb98c

I have now logstash 7.3.2 in a Raspberry Pi 4 with Buster 🎉

@robbavey
Copy link
Member

robbavey commented Sep 3, 2020

With the 7.9.0 release of Logstash, we believe this class of error should have been fixed. We have not tested on this particular hardware, and would appreciate any updates to the status of this issue and whether the issue is still present.

This appeared to have been caused by jruby/jruby#6219, where during ffi loading platform configuration files, an unhandled NPE would be thrown, rather than the handled file NotFound when attempting to load platform.conf, resulting in the error shown here.

This was fixed by this commit, included in the version of jruby shipped with logstash 7.9.0

@AlbertoGP
Copy link

Hi, just hit this issue with 7.8.0 and I can confirm that upgrading to 7.17.16 (latest 7.x as of writing this) solves it.

Machine is ppc64le, IBM Power9 CPU, on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants