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
Closed

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

jussimarttila opened this issue Aug 7, 2015 · 4 comments

Comments

@jussimarttila
Copy link

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
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
Copy link

rtyler commented Aug 7, 2015

This looks like it might be related to #1183

@jussimarttila
Copy link
Author

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
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
Projects
None yet
Development

No branches or pull requests

3 participants