jnr / jnr-ffi

Java Abstracted Foreign Function Layer
Other
1.26k stars 157 forks source link

SIGSEGV on Java 11 #194

Open mike-bourgeous opened 5 years ago

mike-bourgeous commented 5 years ago

I'm having a SIGSEGV crash of the JVM with a JRuby app using native I/O (through jnr-posix and jnr-enxio by way of jnr-ffi). This crash happens almost every time JRuby launches, with Java 11 on CentOS.

Based on my experimentation and this JRuby issue, it seems like FFI is dlopening libc, and somehow that is getting dlclosed or otherwise unloaded while JRuby is still running, causing the crash.

Although the crash happens in jnr-posix or jnr-enxio, both show a native method call from jnr-ffi at the top of the stack, so I'm opening this issue here on the jnr-ffi repo.

Here are some of the locations of the crash (full logs at https://gist.github.com/mike-bourgeous/c24c225d86eb26db629e8fb09f57d6a2):

headius commented 4 years ago

Likely the same issue as in jruby/jruby#4506.