-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Include full exception when WatchQueueReader thread dies #2538
Conversation
Hi @ccutre, One question: when logging this error message will a user be able to fix the cause? How? |
No. The only possible way to fix is restarting openHAB. |
The reason why I am asking - In case this exception leads to an unusable system e.g. because if a blocked rule engine we should give an advise how to solve the situation (e.g. by changing the logged message). This would be much better user experience. |
IMO this should fix itself. The exception should not stop the WatchQueueReader. Maybe the try-catch-Block should be moved inside the for-loop, not around it. |
+1, I'll move the catch inside the loop. I'm just completely in the dark as to what's causing the problem, so am a little afraid it's something that will constantly cause it to crash and restart. For me, the crash is happening every time OpenHAB starts. Is there any documentation anywhere on how to put a locally compiled core bundle into an otherwise-running snapshot? That's the only place I can reproduce my error. I tried to replace the jar file that apt installs, but it didn't do anything, and if I put it in the addons folder karaf shows it sees the bundle, but it's inactive (presumably because some built-in one has already been loaded). |
See openhab#2537 Signed-off-by: Cody Cutrer <cody@cutrer.us>
54f09ff
to
dded8cf
Compare
It looks like the build failed, but I'm not familiar enough with how it should look to know if it's related. There is a separate exception handling block to exit the thread gracefully on interrupt, but I could see it being a possibility that it just hangs when it tries to shut down now. |
Note without this PR, the file watcher completely stopped when an exception occurred, and thus broke OpenHAB. Because this PR moved the try-catch inside the loop and not #2563 fixed the problem that was discovered thanks to the stacktrace reported by this PR. |
bundles/org.openhab.core/src/main/java/org/openhab/core/service/WatchQueueReader.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/service/WatchQueueReader.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Wouter Born <github@maindrain.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes!
See openhab#2537 Signed-off-by: Cody Cutrer <cody@cutrer.us> GitOrigin-RevId: 57ed7ef
See #2537
Signed-off-by: Cody Cutrer cody@cutrer.us