openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
897 stars 415 forks source link

Single JSR223 script can permanently lock up all other scripts from loading #3179

Open ccutrer opened 1 year ago

ccutrer commented 1 year ago

Say you have a super simple script (simplified for illustration purposes; a real world example could involve an accidental deadlock, or waiting indefinitely for an external service the script calls), like this:

loop { sleep 1 }

(Yes, I shot myself in the foot doing something kind of like this trying to debug something! Luckily my condition eventually happened, so I didn't have to restart, but I realized my mistake as soon as I saved the file.)

ScriptFileWatcher loads scripts serially, so that will permanently lock up any other scripts from loading, and the only way to recover is to restart openHAB.

cweitkamp commented 1 year ago

Let's reopen this to track the issue again.

jlaur commented 1 year ago

For reference: #3227