-
Notifications
You must be signed in to change notification settings - Fork 578
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
Please handle InterruptedExceptions correctly #52
Comments
@vfelberg yes, you are absolutely correct. By the way, you can submit a pull request that does the changes (against the stable branch), we will evaluate and merge it :) |
Ok, I'll make the fix; it's an easy one :-) |
I'd like to get this into |
Unfortunately, it's not so easy to fix as I thought. I found in total 14 places catching InterruptedException; some of them trivial, most of them not. I guess, some of the core developers need to have a look at those places. |
@vfelberg I will. |
@vfelberg can you please reproduce the case when you have your app hanging on shutdown and post a thread dump here? |
@vfelberg can you please build from source on the |
Class com.rabbitmq.utility.BlockingCell has several while loops catching InterruptedExceptions and ignoring them. This makes it impossible to shutdown the app correctly; you have to kill it brutally. The correct handling of an InterruptedException in a while loop would be:
There are probably other classes swallowing InterruptedExceptions as well; I'm just reporting the one I found while analyzing what causes our app to hang.
For background info on thread interruption, see e.g.: http://www.ibm.com/developerworks/library/j-jtp05236/
The text was updated successfully, but these errors were encountered: