Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: allow to run criu under strace #2273

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

avagin
Copy link
Member

@avagin avagin commented Sep 28, 2023

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

@avagin avagin marked this pull request as draft September 28, 2023 21:43
@avagin avagin marked this pull request as ready for review October 2, 2023 16:17
criu/util.c Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

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.

❗ 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
@@             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 Coverage Δ
criu/util.c 63.10% <14.28%> (-0.19%) ⬇️

... and 16 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Signed-off-by: Andrei Vagin <avagin@gmail.com>
@rst0git
Copy link
Member

rst0git commented Oct 6, 2023

LGTM, but I was not able to replicate the problem in #2269 (comment).

@avagin
Copy link
Member Author

avagin commented Oct 6, 2023

@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.

pid = fork_and_ptrace_attach(NULL);

@rst0git
Copy link
Member

rst0git commented Oct 7, 2023

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

@avagin avagin merged commit 24e2492 into checkpoint-restore:criu-dev Oct 7, 2023
36 of 39 checks passed
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.

3 participants