-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Foreman dies during web app boot on Java 9 #5082
Comments
Are you using |
FWIW before release I confirmed that JRuby 9.1.16.0 is able to generate a Rails app and boot it (with Puma) on Java 9. We may have regressed, but this should be working. |
@headius I believe I just used "--illegal-access=debug" because it led to a longer stack-trace. I also had been having illegal-access issues (with Sequel) when I was running Java "9-internal" (installed with apt-get). These vanished when I switched to Java 9.0.4. See #4834 (comment) and #4834 (comment). |
@greghuc Yeah I noticed the 9.0.4 update helped. That's interesting. The illegal access warnings are an ongoing issue. I wonder if 9.0.4 "fixed" some of them by just being quieter. Here's my session running a Rails app using Puma. This is on OS X, but I'll try Ubuntu tomorrow (unless @enebo tests Fedora and is able to reproduce first).
|
Same output using
|
@headius and @enebo so I did some digging, and it turns out that puma is starting just fine in JRuby 1.9.16 and Java 9.0.4. The issue is with the foreman gem I use to start puma:
I created a minimal test case at: https://github.com/greghuc/jruby-java9-puma-foreman. In short, this project is a vagrant box that installs Ubuntu 16.04 + Java 8, Java 9, JRuby 9.1.16, Puma and Foreman. In ./bin, there's a few test scripts for running a tiny rack app via Puma/Foreman/Java8/Java9. The project readme covers it. Hope this helps, and my bad for thinking the issue was with puma. Oh, and the Foreman procfile is:
|
Ok I've managed to reproduce several errors using your example. Thanks! I've seen three different errors:
I think there's more than one thing at play here.. |
Ok, the additional exception in select logic is because the selector has been closed by the time we reach this point in the code.
|
Ok, I guess that selector thing isn't coming through as a fatal error; it is happening during shutdown of the listener thread. I have attempted to reproduce on OS X with JRuby 9.1 HEAD...and so far I cannot. The server starts fine. So that's another clue. |
It also works properly with JRuby 9.1.16.0 on OS X. |
I have not had a chance to look into this further. @enebo I do not believe this is a regression...it's likely always been broken on Windows + Java 9 (if we even ran at all on 9 before my recent fixes). |
Just noting that "foreman not starting" behaviour is still present on java 10.0.1 (as well as 9).
|
Does foreman use SSL? |
I'm not 100% sure, but I don't believe foreman uses SSL. The ruby version code is at: https://github.com/ddollar/foreman Foreman is a process runner, which runs a process as specified in a "Procfile". Unclear why it would need ssl to do that. |
I'm back! This one was forgotten but somehow worked its way into my queue again. Managed to repro using your example:
|
Time marches on, and it looks like this no longer reproduces on JRuby 9.2.11.1. We'll mark it fixed there and call it a day.
|
@headius thanks for investigating this. Also thanks in general for all your hard work on JRuby. I really appreciate there being a solid Ruby implementation that enables true multi-threading on web servers. |
Environment
Expected Behavior
I'm exploring upgrading an API to JRuby 9.1.16.0 + Java 9.0.4
The API currently runs under the puma 3.11.3 webserver for JRuby 9.1.16.0 + Java 8.
Actual Behavior
The Puma 3.11.3 web server is failing to start under this combo of JRuby + Java 9, and blows up with the stacktrace below.
I'm opening this issue with jruby, as the stacktrace is all jruby references, not puma. I'm sure you're aware of various Java 9 issues, but I thought I'd submit this one, as running (puma) web servers seems like a common JRuby usage :-)
The text was updated successfully, but these errors were encountered: