Commit 6dc5925
authored
[FIX] Fix IllegalThreadStateException in ComponentStarter shutdown hook (#4733)
The UncaughtExceptionHandler in ComponentStarter calls
shutdownHookThread.start(), but this can throw IllegalThreadStateException
if the thread was already started by a prior exception or by the JVM
shutdown sequence. This exception propagates out of the handler, causing
the JVM to print "Exception thrown from the UncaughtExceptionHandler"
on the BookieDeathWatcher thread.
Catch IllegalThreadStateException since it simply means shutdown is
already in progress.1 parent 8a8f4d6 commit 6dc5925
1 file changed
Lines changed: 6 additions & 1 deletion
File tree
- bookkeeper-common/src/main/java/org/apache/bookkeeper/common/component
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
0 commit comments