dump: skip POSIX timers targeting dead threads#2996
Open
pojntfx wants to merge 4 commits intocheckpoint-restore:criu-devfrom
Open
dump: skip POSIX timers targeting dead threads#2996pojntfx wants to merge 4 commits intocheckpoint-restore:criu-devfrom
pojntfx wants to merge 4 commits intocheckpoint-restore:criu-devfrom
Conversation
…eting a dead thread Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
… timer Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
pojntfx
referenced
this pull request
in loopholelabs/criu
Apr 7, 2026
…t/dead threads from checkpoint Signed-off-by: Felicitas Pojtinger <felicitas@pojtinger.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
When a POSIX timer uses SIGEV_THREAD_ID and the target thread has exited, dump fails in PID namespaces (
Unable to convert the notify thread id) and restore fails without PID namespaces (EINVALfrom timer_create()). We noticed this when an application switched from Java 8 to Java 21.How:
To fix this, this PR detects dead notify threads during dump and skips the timer instead of failing. The kernel already silently drops signals from these timers, so skipping them during dump is safe.
Tests:
zdtm/static/dead_thread_posix_timerzdtm/static/dead_thread_posix_timer_hI added
dead_thread_posix_timer_hsince I wanted to specifically trigger the restore failure case, which needs host mode. I followed the convention thatpthread_timers.candpthread_timers_h.cuses.