Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Fix notification manager deadlock in Stop()
rcourtman8d320ef56bde
diff --git a/internal/notifications/notifications.go b/internal/notifications/notifications.goindex 0f3e389288..26e54a3a90 100644--- a/internal/notifications/notifications.go+++ b/internal/notifications/notifications.go@@ -2537,16 +2537,26 @@ func (n *NotificationManager) cleanupOldNotificationRecords() {// Stop gracefully stops the notification managerfunc (n *NotificationManager) Stop() {n.mu.Lock()- defer n.mu.Unlock()// Stop cleanup goroutineclose(n.stopCleanup)+ // Get queue reference before unlocking+ queue := n.queue++ // Unlock before stopping queue to avoid deadlock with queue workers+ // that may need to acquire n.mu during ProcessQueuedNotification+ n.mu.Unlock()+// Stop the notification queue if it exists- if n.queue != nil {- n.queue.Stop()+ if queue != nil {+ queue.Stop()}+ // Relock for remaining cleanup+ n.mu.Lock()+ defer n.mu.Unlock()+// Cancel any pending group timerif n.groupTimer != nil {n.groupTimer.Stop()