-
Notifications
You must be signed in to change notification settings - Fork 34
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
Threading issues #7815
Labels
Comments
for instance TaskManagerImplTest fails every now and when |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some OSGi services create executors (or other threads) which are never shut down. This leaks threads when configuration of such services changes. Solution is to call shutdown/shutdownNow in deactivate methods.
Some Executors are constructed with ThreadFactory which specifies UncoughtExceptionHandler, which is never called because all exceptions are actually caught by executor itself. Solution is to catch exceptions/throwables for correct processing directly inside Runnables.
Similar but worse issue is in use of ScheduledExecutors as they stop repeating tasks in case of exceptions thrown inside tasks.
Attempts to solve this were made, but they didn't account Errors which were silently swallowed.
Solution is to catch all exceptions so repeating stays alive. And log Errors before rethrowing them.
Some long-lived Threads have no names which makes them harder to identify. Give them appropriate names.
The text was updated successfully, but these errors were encountered: