@cryptotaxi247 / netdata-1 / commits / cca892a99

Skip adding Sentry breadcrumb during shutdown timeout (#21150)

Skip adding Sentry breadcrumb during shutdown timeout to prevent crashes

Stelios Fragkakis committed Oct 15, 2025 at 16:06 UTC cca892a99d6e1439db011b369bd2a0f251c074f8
1 file changed +6 -3
src/daemon/daemon-shutdown-watcher.c
+6 -3
@@ -19,9 +19,12 @@ NEVER_INLINE
19 static void shutdown_timed_out(void) {
20 // keep this as a separate function, to have it logged like this in sentry
21 daemon_status_file_shutdown_timeout(steps_timings);
22 -#ifdef ENABLE_SENTRY
23 - nd_sentry_add_shutdown_timeout_as_breadcrumb();
24 -#endif
22 +
23 + // NOTE: We intentionally skip adding a Sentry breadcrumb here because:
24 + // 1. During shutdown timeout, the status file has already been saved with timeout info
25 + // 2. Sentry may crash trying to access potentially freed/corrupted strings from session_status
26 + // 3. The abort() below will trigger a signal that Sentry will catch anyway
27 +
28 abort();
29 }
30