[2.5] Race condition during reconnect can cause websocket to crash and repeatedly disconnect

Bug #1802390 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Mike Pontillo

Bug Description

After supending and resuming my laptop while it was connected to MAAS, I noticed a problem that caused the websocket to repeatedly attempt to reconnect. Each time it reconnected, the following exception was raised on the server:

https://paste.ubuntu.com/p/4SqVvZFgkR/

This is a race condition in WebSocketProtocol.authenticated(). Before creating the `self.request`, authenticated() calls processMessages(). The processMessages() method calls handleRequest() -> buildHandler(), which requires the `self.request` (which was not created in __init__() and does not exist yet).

Related branches

Changed in maas:
status: Confirmed → Triaged
Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.