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
Static route operator periodically crashes with panic: panic called with nil argument #130
The static route operator periodically terminates with:
panic: panic called with nil argument
The failure appears to be related to the route manager goroutine.
Suspected cause
main.go starts the route manager with:
go func() {
panic(routeManager.Run(stopChan))
}()
However, RouteManager.Run() can return nil.
In pkg/routemanager/routemanager.go:
case update, ok := <-updateChan:
if !ok {
return nil
}
case <-stopChan:
return nil
The updateChan is supplied by netlink.RouteSubscribe(). If the netlink subscription terminates, the channel can be closed and Run() consequently returns nil.
The caller then effectively executes:
panic(nil) that leads to ---> panic: panic called with nil argument
Related issue
There is another instance where panic(nil) can be called, but it's less probable issue:
if !crdFound {
params.logger.Info("CRD not found: staticroutes.static-route.ibm.com")
panic(err)
}
At this point err can be nil, because the preceding discovery call has already checked err != nil.
Expected behavior
The operator should never execute panic(nil).
For the route manager, an unexpected termination of the netlink subscription should either:
return a meaningful error and let the existing process-restart mechanism handle it,
or preferably reconnect/restart the netlink subscription without terminating the whole operator.
For the missing CRD case, the operator should panic/return a meaningful error such as:
CRD not found: staticroutes.static-route.ibm.com
rather than panic(nil).
Activity
Tamas-Biro1 commentedon Oct 10, 2026
@FilatovM thanks for this issue. I took a look at it and did a draft PR to fix: #133 I am still testing it. Thanks!
Tamas-Biro1 commentedon Oct 12, 2026
Closing this issue, as the mentioned PR has been merged.