-
Notifications
You must be signed in to change notification settings - Fork 24
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
100% load in POAImpl.acquireLock #11
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glassfish threads can hang in an endless loop. This is cause by a bogus exit condition:
{{
// in acquireLock:
do
{
...
try
{ ... // invokation of a function which detects thread interruption and throws InterruptedException }
catch(InterruptedException exc)
{ interrupted = true; }
if(interrupted)
Thread.currentThread().interrupt();
} while(true);
}}
If the current thread the InterruptedException is caught but does not break the loop.
=> 100% load for the thread. You can end up with many threads and thus all CPUs at 100%.
suggested fix: don't catch the InterruptedException. Only catch an Exception if you can handle it properly. (here it's not handly properly, catching an InterruptedException to interrupt() again is simply nonsens.)
Environment
any
Affected Versions
[current]
The text was updated successfully, but these errors were encountered: