Unhandled exceptions in TunnelThread abort the root service #17

Closed
opened 2026-08-17 16:57:01 -04:00 by mysticalsoap · 0 comments
Owner

TunnelThread.run (aqomui/tunnel.py:34-47) catches only KeyError, and
that except is a fallback for a server dict without a tunnel key -- not an
error guard. Anything raised by openvpn() or wireguard() reaches the top of
the 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.run was guarded for exactly this in 14dd13a, but the fix was applied
to 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 escaped
exception into a failure signal.

Related: the broad swallows that hide failure rather than report it --
firewall.py:165 (except BaseException) and tunnel.py:489 (bare except:).

`TunnelThread.run` (`aqomui/tunnel.py:34-47`) catches only `KeyError`, and that `except` is a *fallback* for a server dict without a `tunnel` key -- not an error guard. Anything raised by `openvpn()` or `wireguard()` reaches the top of the 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.run` was guarded for exactly this in 14dd13a, but the fix was applied to 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 escaped exception into a failure signal. Related: the broad swallows that hide failure rather than report it -- `firewall.py:165` (`except BaseException`) and `tunnel.py:489` (bare `except:`).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mysticalsoap/aqomui#17
No description provided.