Unhandled exceptions in TunnelThread abort the root service #17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
TunnelThread.run(aqomui/tunnel.py:34-47) catches onlyKeyError, andthat
exceptis a fallback for a server dict without atunnelkey -- not anerror guard. Anything raised by
openvpn()orwireguard()reaches the top ofthe QThread.
PyQt5 aborts the process when an exception escapes a QThread, and this thread
runs inside the root D-Bus service, so one unexpected error kills the service
and every active tunnel with it.
AddServers.runwas guarded for exactly this in14dd13a, but the fix was appliedto the importer only -- the more central thread was left unguarded. Bug #2 was
reported as solved and is still live in the place that matters more.
Treat it as one pattern rather than two instances: a single decorator or base
run()wrapper applied to every QThread the service owns, turning an escapedexception into a failure signal.
Related: the broad swallows that hide failure rather than report it --
firewall.py:165(except BaseException) andtunnel.py:489(bareexcept:).