You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "masaori335 (via GitHub)" <gi...@apache.org> on 2026/06/03 08:05:39 UTC
[PR] Sync CacheDir on shutdown [trafficserver]
masaori335 opened a new pull request, #13232:
URL: https://github.com/apache/trafficserver/pull/13232
In the past, it's used be called by `traffic_manager`, but it's gone.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync CacheDir on shutdown [trafficserver]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13232:
URL: https://github.com/apache/trafficserver/pull/13232#discussion_r3346931288
##########
src/traffic_server/traffic_server.cc:
##########
@@ -287,6 +288,11 @@ struct AutoStopCont : public Continuation {
jsonrpcServer->stop_thread();
}
+ // Flush the in-memory cache directory to disk
+ if (cacheProcessor.IsCacheEnabled() == CacheInitState::INITIALIZED) {
+ sync_cache_dir_on_shutdown();
+ }
+
Review Comment:
`sync_cache_dir_on_shutdown()` is effectively non-reentrant: it eventually calls `StripeSM::shutdown()`, which takes the stripe mutex via `MUTEX_TAKE_LOCK()` and intentionally never releases it (see `src/iocore/cache/StripeSM.cc:1321-1337`). If `AutoStopCont` runs more than once (e.g., multiple SIGTERM/SIGINT deliveries scheduling multiple stop events), the second invocation can deadlock while trying to acquire already-held stripe locks, potentially hanging shutdown.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync CacheDir on shutdown [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #13232:
URL: https://github.com/apache/trafficserver/pull/13232#issuecomment-4713950327
Cherry-picked to 10.2.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Sync CacheDir on shutdown [trafficserver]
Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 merged PR #13232:
URL: https://github.com/apache/trafficserver/pull/13232
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org