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

Usage of deprecated and unimplemented Thread.stop(Throwable) #3232

Closed
jussimarttila opened this Issue Aug 7, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@jussimarttila
Copy link

jussimarttila commented Aug 7, 2015

JRuby seems to use the above mentioned method in code, which will break at least on any remotely modern Oracle JDKs (as well as hide the original exception).

Originally encountered here http://stackoverflow.com/questions/31870750/logstash-unexpectedly-stopped/31872698

The current version of RubyThread still seems to call it in certain circumstances.

@rtyler

This comment has been minimized.

Copy link

rtyler commented Aug 7, 2015

@jussimarttila Can you list which JDK you've observed the problem from the linked SO thread?

I don't know logstash well enough to tell what kind of JRuby version is being used, so if you know that, it is also useful

@rtyler

This comment has been minimized.

Copy link

rtyler commented Aug 7, 2015

This looks like it might be related to #1183

@jussimarttila

This comment has been minimized.

Copy link
Author

jussimarttila commented Aug 10, 2015

I don't have the JRuby version used in the original problem, but it doesn't matter. Even the current codebase contains a call to Thread.stop(Throwable). While Thread.stop() has been deprecated, it still works, whereas Thread.stop(Throwable) throws an UnsupportedOperationException starting from JDK 1.8.

@headius

This comment has been minimized.

Copy link
Member

headius commented Aug 19, 2015

Ahh, nice find. I didn't realize they'd finally started to make this really deprecated.

The only instance I could find was for propagating a Thread.abort_on_exception to the main thread. I'm testing a change to just use the existing thread event logic for that. It will be less guaranteed to fire, but no more so than for other cross-thread exception raises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.