[Bug] Any DB error on getting node during serving stream updates leads to panic and further delays #1066

Closed
opened 2025-12-29 02:28:03 +01:00 by adam · 2 comments
Owner

Originally created by @vaskravchuk on GitHub (Jul 19, 2025).

if it's not possible to get node: 7fce5065c4/hscontrol/poll.go (L260C4-L265C5)
m.node will be nil.
which leads to panic in defer function:
7fce5065c4/hscontrol/poll.go (L182C34-L182C45)
as not possible to get ID from nil node

panic is recovered by http2 code but it leads to the state that node is not removed from notifier. So each call to "notifyall" brings delays, and performance degradation

Originally created by @vaskravchuk on GitHub (Jul 19, 2025). if it's not possible to get node: https://github.com/juanfont/headscale/blob/7fce5065c45dc233240bd334d12999bbd7c50488/hscontrol/poll.go#L260C4-L265C5 m.node will be nil. which leads to panic in defer function: https://github.com/juanfont/headscale/blob/7fce5065c45dc233240bd334d12999bbd7c50488/hscontrol/poll.go#L182C34-L182C45 as not possible to get ID from nil node panic is recovered by http2 code but it leads to the state that node is not removed from notifier. So each call to "notifyall" brings delays, and performance degradation
adam closed this issue 2025-12-29 02:28:04 +01:00
Author
Owner

@vaskravchuk commented on GitHub (Jul 19, 2025):

possible the reason(partially) of next bug #2192
and #2597

@vaskravchuk commented on GitHub (Jul 19, 2025): possible the reason(partially) of next bug #2192 and #2597
Author
Owner

@kradalby commented on GitHub (Sep 10, 2025):

This got moved around and should not happen after #2670

@kradalby commented on GitHub (Sep 10, 2025): This got moved around and should not happen after #2670
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1066