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
{{ message }}
Repository navigation
Sender thread in _drain has no outer guard around _send #5
TraceClient._drain (trace_client/trace_client.py:174-181) calls self._send(body) with no surrounding try. Only the try blocks inside _send keep the sender thread alive.
On main, _send builds the urllib.request.Request outside its try, so a base URL with no scheme kills the thread (#3). PR #4 moves that construction inside the try. After that change, no statement known to raise is left outside a guard. The thread's survival still depends on every future edit to _send keeping all raising code inside that try, though. If one slips through, the thread dies and a traceback goes to the host program's stderr. After that, report() keeps filling the queue up to QUEUE_CAPACITY with nothing draining it.
Suggested hardening (defense in depth, no behavior change today): wrap the self._send(body) call in _drain in try / except Exception: # noqa: BLE001. The handler logs _LOG.debug("[trace] ...") and continues the loop. A regression test can patch _send to raise once. It then asserts that threading.excepthook is not called and that a later report is still delivered.
Activity
Tag every event with the program's version; version is now required (…