diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc index 1f174fb1810..ac9029594e8 100644 --- a/src/traffic_server/traffic_server.cc +++ b/src/traffic_server/traffic_server.cc @@ -309,9 +309,13 @@ struct AutoStopCont : public Continuation { CacheShm::mark_clean_shutdown(); } - // Wake preproc threads to drain remaining log buffers before exit. - for (int i = 0; i < Log::preproc_threads; i++) { - Log::preproc_notify[i].signal(); + // Wake preproc threads to drain remaining log buffers before exit. The notify array is allocated only once the log + // threads are spawned, which has not happened yet this early in startup and never happens at all for the log-only + // tools, so a null array means there is no preproc thread in existence and nothing to wake. + if (Log::preproc_notify != nullptr) { + for (int i = 0; i < Log::preproc_threads; i++) { + Log::preproc_notify[i].signal(); + } } delete this; return EVENT_CONT;