DynamoRIO / DynamoRIO/dynamorio

raw2trace ERROR while processing trace collected with -trace_after_instrs and -max_global_trace_refs

Open
#5,808 4 comments 0 reactions 0 assignees View on GitHub
Bug-ToolFail Component-DrMemtrace Status-NeedInfo
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

**Describe the bug**
I am tracing threadsig.cpp (from https://raw.githubusercontent.com/DynamoRIO/drmemtrace_samples/master/threadsig.x86_64/threadsig.cpp). I am seeing the error shown below while running raw2trace. The failing file is only 10 bytes long.

```
$ build/clients/bin64/drraw2trace -jobs 1 -indir drmemtrace.threadsig.200629.0229.dir/
ERROR: Directory parsing failed: Failed sanity checks for thread log file drmemtrace.threadsig.200629.0229.dir/raw/drmemtrace.threadsig.200629.6467.raw.sz: Unable to read thread log file

$ ls -l drmemtrace.threadsig.200629.0229.dir/raw/
total 32
-rw-r----- 1 prasun sudo 10 Jan 3 14:45 drmemtrace.threadsig.200629.6467.raw.sz
-rw-r----- 1 prasun sudo 2246 Jan 3 14:45 drmemtrace.threadsig.200630.2191.raw.sz
-rw-r----- 1 prasun sudo 4433 Jan 3 14:45 drmemtrace.threadsig.200631.2154.raw.sz
-rw-r----- 1 prasun sudo 8 Jan 3 14:45 encodings.bin
-rw-r----- 1 prasun sudo 0 Jan 3 14:45 funclist.log
-rw-r----- 1 prasun sudo 11445 Jan 3 14:45 modules.log

```

This is how the trace was collected
```
$ build/bin64/drrun -t drcachesim -trace_after_instrs 2000M -max_global_trace_refs 10K -verbose 0 --offline -- ./threadsig 2 20000000

<(1+x) Handling our fault in a TRY at 0x00007fa20be05199>
Hit delay threshold: enabling tracing.
Hit -max_global_trace_refs: disabling tracing.

Estimation of pi is 3.141592653589820
Received 1726 alarms

```

**To Reproduce**
See above

Please also answer these questions:
- What happens when you run without any client?
- Not applicable since the issue is with the drcachesim client, but the program runs fine without any client
- What happens when you run with debug build ("-debug" flag to drrun/drconfig/drinject)?
- This was run with debug build. I didn't try the release build.

**Expected behavior**
No error during raw2trace

**Screenshots or Pasted Text**

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