dynamorio icon indicating copy to clipboard operation
dynamorio copied to clipboard

TEST HANG(10.0.19732 client.attach_blocking): Test hangs if yama.ptrace_scope != 0

Open xdje42 opened this issue 1 year ago • 3 comments

Describe the bug

The client.attach_blocking test hangs if yama.ptrace_scope != 0.

To Reproduce

$ ctest -R client.attach_blocking
<hang>
Ctrl-Z
$ ps
    PID TTY          TIME CMD
3715888 pts/12   00:00:00 bash
3748099 pts/12   00:00:00 ctest
3748101 pts/12   00:00:00 cmake
3748103 pts/12   00:00:00 linux.infloop
3748479 pts/12   00:00:00 sleep
3748480 pts/12   00:00:00 ps
$ kill %1
$ sudo sysctl -w kernel.yama.ptrace_scope=0
$ ctest -R client.attach_blocking
<no hang>

Versions

  • What version of DynamoRIO are you using? HEAD as of 1/11/2024 (commit d28ac5bb1bed9283d0cfeea4c904644878ca3f1c)
  • Does the latest build from https://github.com/DynamoRIO/dynamorio/releases solve the problem? No
  • What operating system version are you running on? ("Windows 10" is not sufficient: give the release number.) Linux, amd64 and aarch64
  • Is your application 32-bit or 64-bit? 64-bit

Additional context

Related issue: #37 Related issue: #38

xdje42 avatar Jan 12 '24 00:01 xdje42

The action item would be for the test config to look at the procfs setting and gate it -- like we do for sudo tests but automated or sthg. Or better for drrun (or drinjectlib) to try to check privs -- but that may not be easy to check all cases of missing privs.

derekbruening avatar Jan 12 '24 00:01 derekbruening

Another action item is to shrink the timeout which is excessive.

derekbruening avatar Jan 12 '24 00:01 derekbruening

I am fixing the timeout issue in #6563

derekbruening avatar Jan 12 '24 20:01 derekbruening