Copilot commented on code in PR #13767:
URL: https://github.com/apache/trafficserver/pull/13767#discussion_r4152735266
##########
src/iocore/cache/StripeSM.cc:
##########
@@ -1338,19 +1338,16 @@ StripeSM::add_writer(CacheVC *vc)
void
StripeSM::shutdown(EThread *shutdown_thread)
{
- // the process is going down, do a blocking call
- // dont release the volume's lock, there could
- // be another aggWrite in progress
- SCOPED_MUTEX_LOCK(lock, this->mutex, shutdown_thread);
+ // Never released, so no writer can add Dir entries after this sync.
+ MUTEX_TAKE_LOCK(this->mutex, shutdown_thread);
Review Comment:
This can deadlock shutdown if another SIGTERM/SIGINT schedules a second
`AutoStopCont`: the first pass permanently holds every stripe mutex, so the
second pass blocks its worker threads here and then waits forever while joining
them. The current `SignalContinuation` still schedules one shutdown per
observed signal, and the linked #13766 fix is still open/unmerged. Please
ensure #13766 lands first (and make that dependency explicit), or include
equivalent single-scheduling/idempotence protection in this PR.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]