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

InterruptedException: sleep interrupted during KPL shutdown #34

Closed
abbyssoul opened this issue Nov 26, 2015 · 7 comments
Closed

InterruptedException: sleep interrupted during KPL shutdown #34

abbyssoul opened this issue Nov 26, 2015 · 7 comments
Labels
Milestone

Comments

@abbyssoul
Copy link

We have noticed that in out CI and sometimes even in PROD we see InterruptedException being logged by KPL during shutdown:

[pool-6-thread-6] WARN com.amazonaws.services.kinesis.producer.Daemon - Exception during updateCredentials
java.lang.InterruptedException: sleep interrupted
    at java.lang.Thread.sleep(Native Method)
    at com.amazonaws.services.kinesis.producer.Daemon$5.run(Daemon.java:316)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

As I understand that is because we use updateCredentials which sleeps for a number of milliseconds before trying to update credentials. And during shutdown this InterruptedException is raised.
It is not an error but it does pollute logs with stack traces which gets especially noisy in CI.
I have raised a PR to fix that issue by not logging an InterruptedException during normal shutdown process.
Can we please get some attention to this PR?

@cch1
Copy link

cch1 commented Feb 10, 2017

Same problem here. Really annoying when running tests that requires frequent startup/shutdown.

@cch1
Copy link

cch1 commented Feb 10, 2017

At a minimum, can the level of this log message be downgraded to something more appropriate, like DEBUG? It seems that it is a "normal" situation not worthy of a warning.

@pfifer pfifer added the bug label Feb 15, 2017
@pfifer
Copy link
Contributor

pfifer commented Feb 15, 2017

This appears to be related to #10. We are looking at making the change, and will prioritize it with other customer requests.

I can see some users have already posted reactions, can everyone else who's interested post reactions to assist us in prioritizing the change.

Thanks

@cch1
Copy link

cch1 commented Apr 10, 2018

Any idea when this will make it into a release?

@ObviousDWest
Copy link

I'm on 0.12.8. This is still happening. Seems like an incorrect shutdown of an executor service, or the catch of the InterruptedExeception is not re-setting Thread.currentThread().interrupt(); to indicate to the executor that the thread is being destroyed.

@pfifer
Copy link
Contributor

pfifer commented May 11, 2018

This was fixed in 0.12.9.

InterruptExceptions occur whenever a thread pool is shutdown via shutdownNow(). The interrupt status of a thread doesn't need to be cleared in this case as no one upstream does anything with the interrupt. The change simply doesn't do anything expecting that the shutdown flag will be set to true causing the loop to exit.

@ObviousDWest
Copy link

Confirmed. With 0.12.9, the error on shutdown is fixed. (Sorry, I should have read the notes on the "closed" comment of this thread).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants