DynamoRIO / DynamoRIO/dynamorio

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

Open
#6,558 3 comments 0 reactions 0 assignees View on GitHub
Component-Tests
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

**Describe the bug**

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

**To Reproduce**

```
$ ctest -R client.attach_blocking

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

```

**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

Contributor guide

Open the contributing guide

Research direction

Start by running `ctest -R client.attach_blocking` with `kernel.yama.ptrace_scope` nonzero and inspect the `client.attach_blocking` test and its related issue history (#37 and #38). Trace the processes shown in the report to determine where the hang occurs. Done means the test completes without hanging under the reported Linux configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.