You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The panic hook is nice in that it might allow for a log entry on panic. The problem is that the reliability of this is unpredictable, because panic hooks in general are hard to make safe/sound.
It's very unsafe/unsound in almost all cases for the process to keep going after a panic, as it's possible that a panic happening can allow objects to be in a state that violates safety rules, at which point we're working from some kind of corrupt state.
In the somewhat more common case, panics will abort threads, as an example I just caught such a case which terminates the command processing thread:
2024-04-14T04:20:00.276914Z ERROR process_command{ToggleMonocle}:toggle_monocle:monocle_off: komorebi: panicked at komorebi\src\workspace.rs:998:26:
attempt to subtract with overflow panic.file="komorebi\\src\\workspace.rs" panic.line=998 panic.column=26
We should ensure that the process exits after a panic happens. We could choose to restart the process in some way, or not to, but continuing is likely to perpetuate some really tricky to track down issues.
The text was updated successfully, but these errors were encountered:
The panic hook is nice in that it might allow for a log entry on panic. The problem is that the reliability of this is unpredictable, because panic hooks in general are hard to make safe/sound.
It's very unsafe/unsound in almost all cases for the process to keep going after a panic, as it's possible that a panic happening can allow objects to be in a state that violates safety rules, at which point we're working from some kind of corrupt state.
In the somewhat more common case, panics will abort threads, as an example I just caught such a case which terminates the command processing thread:
We should ensure that the process exits after a panic happens. We could choose to restart the process in some way, or not to, but continuing is likely to perpetuate some really tricky to track down issues.
The text was updated successfully, but these errors were encountered: