DynamoRIO / DynamoRIO/dynamorio

seeing more than one cpu id on one output stream with MAP_TO_RECORDED_OUTPUT

Open
#6,354 13 comments 0 reactions 1 assignee Claimed by @derekbruening View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

**Describe the bug**

See https://groups.google.com/g/DynamoRIO-Users/c/Dsf4As64r7o

In some of my tests, I am seeing more than one cpu id on one output stream with MAP_TO_RECORDED_OUTPUT.

The value returned by stream->get_output_cpuid matches the initial CPU_ID marker values, but at some point on some streams, we see other CPU_ID values as shown below.

Example:

```
Output #5 processing CPU #7 (from get_stream_cpuid)
Output #5 saw CPU_ID marker: 7
Output #5 saw CPU_ID marker: 7
Output #5 saw CPU_ID marker: 7
...
Output #5 saw CPU_ID marker: 7
Output #5 saw CPU_ID marker: 7
Output #5 saw CPU_ID marker: 5
```

**To Reproduce**
Steps to reproduce the behavior:
1. Collect a trace with `drrun -t drcachesim -offline`
2. Use the scheduler infrastructure with the MAP_TO_RECORDED_OUTPUT option
3. We see multiple CPU IDs on the same output stream which is not expected

Please also answer these questions:
- What happens when you run without any client?
- Not applicable
- What happens when you run with debug build ("-debug" flag to drrun/drconfig/drinject)?
- No difference

**Expected behavior**
With the MAP_TO_RECORDED_OUTPUT option, each output stream maps to exactly one CPU

**Screenshots or Pasted Text**

**Versions**
- What version of DynamoRIO are you using?
- Commit 910ccb25a66175bcba3f349cb7a43c8da7d9f7c3
- 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.)
- Ubuntu 18
- Is your application 32-bit or 64-bit?
- 64-bit

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.