-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MiniSSL.java - set serialVersionUID, fix RaiseException deprecation #3270
MiniSSL.java - set serialVersionUID, fix RaiseException deprecation #3270
Conversation
Hey, the The JRuby diff --git ext/puma_http11/org/jruby/puma/MiniSSL.java ext/puma_http11/org/jruby/puma/MiniSSL.java
index 1b9ab433..87e9e27e 100644
--- ext/puma_http11/org/jruby/puma/MiniSSL.java
+++ ext/puma_http11/org/jruby/puma/MiniSSL.java
@@ -500,7 +500,7 @@ public class MiniSSL extends RubyObject { // MiniSSL::Engine
}
private static RaiseException newError(Ruby runtime, RubyClass errorClass, String message, Throwable cause) {
- RaiseException ex = new RaiseException(runtime, errorClass, message, true);
+ RaiseException ex = RaiseException.from(runtime, errorClass, message);
ex.initCause(cause);
return ex;
}
... but unfortunately I do not think the patch will have any effect for what you mentioned:
|
Thank you for the response and the patch. I've got JRuby running on WSL2/Ubuntu 20.04 & 22.04, and also macOS. If a CI run succeeds but freezes, I can repo locally using the seed from the CI run. The only process running is the test process. Any suggestions as to how to find the issue? I have pretty much zero knowledge re java... |
Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
5729d03
to
d125925
Compare
if you can reproduce than take a thread dump (also possible on CI but a bit involves a bit more clever code to be added) either using UI tools such as VisualVM or the command line using |
Thanks. I'll see if I can get that to work. One thing I haven't mentioned, we run a JRuby job without SSL, and I've never seen that freeze... |
maybe some kind of buffering issue, would mean we should see smt of MiniSSL.doOp near the top of the trace... |
Thanks. Many seem to indicate a server isn't shutting down properly, as there are a lot of ThreadPool threads. I'm working on it today, more tonite... BTW, the same test code is not interfering with the MRI CI jobs. Not sure about that, hopefully more later. |
It seems that running the (new) test suite with JRuby intermittently has hung Reactor & ThreadPool threads. Same thing may exist with the current test suite, haven't tested it. Kind of frustrating, as MRI Rubys don't have the problem. Regardless, started with 150 or so threads, now it's down to a handful... |
what do you mean by "(new) test suite"? maybe, let's open a ticket with all the details you have (e.g. jstack details) about what is hanging... |
I'm working on an update to the test suite used by Puma. Puma uses NIO/nio4r for its 'reactor'. I'll post a thread dump in a new issue. One thing I haven't tried is simply spinning up a Puma server and seeing if threads are cleaned up. So, I don't know if it's due to Puma, or due to the test quite spinning up a lot of servers in a short time. Some of servers are 'in-process' servers ( |
on the JRuby side do not worry too much about a "lot of threads" unless you can confirm they're executing some Ruby code that should have been done by now... and yes, indeed things could be tricky, MRI due GIL does not have true concurrency so you might have code that works there but breaks under JRuby... |
…3270) * MiniSSL.java - fix compile warning - serialVersionUID * MiniSSL.java - fix 'warning: [deprecation] RaiseException' Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
…3270) * MiniSSL.java - fix compile warning - serialVersionUID * MiniSSL.java - fix 'warning: [deprecation] RaiseException' Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
…3270) * MiniSSL.java - fix compile warning - serialVersionUID * MiniSSL.java - fix 'warning: [deprecation] RaiseException' Co-authored-by: Karol Bucek <kares@users.noreply.github.com>
Description
While working on the test framework, there have been consistent intermittent failures with JRuby, but never with the job that did not use SSL. The failures were much more consistent in CI, but much less common locally. But, I've got a lot of RAM.
The failures showed that all tests passed, but the test process freezes, and the CI step times out.
For quite a while, the following has been logged in the JRuby compile step. There are also case fall-thru warnings, but the case statements have integer switches, so multiple matches cannot happen:
Not being a java type, I googled and also looked at
nio4r
. Innio4r
,serialVersionUID
is set to what appears to be random long values. So, I added a similar statement to our java code, and the tests are completing. Or, no more frozen test processes.@kares - sorry for the ping. Does this look okay to you? Is the
RaiseException
warning easy to fix? TIA...Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.