From 4ce091068ca8c9d914b97ff6b5bbd74864f2372d Mon Sep 17 00:00:00 2001 From: Mikhail Dmitrichenko Date: Wed, 27 May 2026 15:33:30 +0300 Subject: [PATCH] dispatcher: guard against missing volumes in assignments stream Assignments handles EventUpdateVolume by looking up the current volume from the store before updating the node assignment set. The lookup may return nil if the volume was removed after the event was queued but before it was processed. In that case, the code currently dereferences the nil volume while iterating over PublishStatus, which can panic and terminate the assignments stream handler. Skip processing when the volume is no longer present in the store. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Mikhail Dmitrichenko --- manager/dispatcher/dispatcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manager/dispatcher/dispatcher.go b/manager/dispatcher/dispatcher.go index 41b9ba73fe..5bc230fec3 100644 --- a/manager/dispatcher/dispatcher.go +++ b/manager/dispatcher/dispatcher.go @@ -1174,6 +1174,9 @@ func (d *Dispatcher) Assignments(r *api.AssignmentsRequest, stream api.Dispatche case api.EventUpdateVolume: d.store.View(func(readTx store.ReadTx) { vol := store.GetVolume(readTx, v.Volume.ID) + if vol == nil { + return + } // check through the PublishStatus to see if there is // one for this node. for _, status := range vol.PublishStatus {