Open bmulholland opened 2 years ago
Hi bmulholland I couldn't reproduce it on my X64 Linux. I suppose it causes JVM implementation for ARM. Any other Java application runs fine ? By the way, thank you for giving me the reproducable project. It' very helpful (sorry not for this case).
We have reproduced this crash (or at least, one very similar) on an Intel Mac as well. A workaround for us is to run the Rjb.load on every HTTP request, inside the worker. That workaround runs on all our machines, so there's no problem with JVM or anything. We do, however, need to use OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
for it to work, which seems dangerous, but at least it's only necessary on our development machines.
To add to @bmulholland 's comment, here's the configuration added to puma.rb
:
before_fork do
Rjb.load # Remove all the Rjb.load calls in the app
end
I posted a repro here: https://github.com/bmulholland/rjb-fork-crash
Short version is that, when trying to use puma workers, Rjb.load crashes. Output is: