checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.79k stars 565 forks source link

util: allow to run criu under strace #2273

Closed avagin closed 9 months ago

avagin commented 10 months ago

fork_and_ptrace_attach has to fork a child with CLONE_UNTRACED, so that strace doesn't trace it.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (c20fb83) 70.55% compared to head (c3890aa) 70.53%. Report is 1 commits behind head on criu-dev.

:exclamation: Current head c3890aa differs from pull request most recent head af919e8. Consider uploading reports for the commit af919e8 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## criu-dev #2273 +/- ## ============================================ - Coverage 70.55% 70.53% -0.03% ============================================ Files 132 135 +3 Lines 33511 33526 +15 ============================================ + Hits 23643 23646 +3 - Misses 9868 9880 +12 ``` | [Files](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore) | Coverage Δ | | |---|---|---| | [criu/util.c](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore#diff-Y3JpdS91dGlsLmM=) | `63.10% <14.28%> (-0.19%)` | :arrow_down: | ... and [16 files with indirect coverage changes](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2273/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rst0git commented 9 months ago

LGTM, but I was not able to replicate the problem in https://github.com/checkpoint-restore/criu/issues/2269#issuecomment-1739927149.

avagin commented 9 months ago

@rst0git it is triggered each time when kerndat_has_ptrace_get_rseq_conf is called. If you can't reproduce it, you need to find out why kerndat_has_ptrace_get_rseq_conf isn't executed in your case.

https://github.com/checkpoint-restore/criu/blob/5bf7652504530b9baa04f411052f9c079c7f14eb/criu/kerndat.c#L978

rst0git commented 9 months ago

@avagin Thanks! I was able to reproduce the problem and confirm that the patch works.