Skip to content

Fix LogsCheckpoint thread interrupt race condition#6939

Open
pditommaso wants to merge 1 commit intomasterfrom
fix/logs-checkpoint-interrupt-race
Open

Fix LogsCheckpoint thread interrupt race condition#6939
pditommaso wants to merge 1 commit intomasterfrom
fix/logs-checkpoint-interrupt-race

Conversation

@pditommaso
Copy link
Member

Summary

  • Fix race condition in LogsCheckpoint.run() where saveFiles() was called with the thread interrupt flag already set after await() caught an InterruptedException
  • This caused the AWS SDK to throw AbortedException ("Thread was interrupted") during S3 uploads at workflow shutdown
  • Move the interrupt check to after await() returns and before saveFiles(), so the loop exits cleanly on shutdown

Test plan

  • Verify no AbortedException warnings in logs when running workflows with Tower/Seqera platform integration and remote work directory

🤖 Generated with Claude Code

Check interrupt flag after await() returns and before calling
saveFiles(), preventing the AWS SDK from seeing the interrupt
flag and throwing AbortedException during S3 uploads at shutdown.

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@netlify
Copy link

netlify bot commented Mar 18, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 7b78831
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/69ba8a90c38d1d00084ef485

@bentsherman
Copy link
Member

I feel like we have iterated on this code a dozen times trying to find the right logic 😅

@bentsherman bentsherman requested a review from jorgee March 20, 2026 15:05
@bentsherman
Copy link
Member

@jorgee requesting your review since you are looking into #6885 (not exactly the same but seems related)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants