Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #5808
Closed
Open
Issue created Jan 03, 2023 by prasun3@prasun3Contributor

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

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
<Starting application /home/prasun/dynamorio-latest/threadsig (200629)>
<Initial options = -no_dynamic_options -client_lib '/home/prasun/dynamorio-latest/build/bin64/../clients/lib64/debug/libdrmemtrace.so;0;-trace_after_instrs 2000M -max_global_trace_refs 10K -verbose 0 --offline' -client_lib64 '/home/prasun/dynamorio-latest/build/bin64/../clients/lib64/debug/libdrmemtrace.so;0;-trace_after_instrs 2000M -max_global_trace_refs 10K -verbose 0 --offline' -code_api -stack_size 56K -signal_stack_size 32K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct >
<Paste into GDB to debug DynamoRIO clients:
set confirm off
add-symbol-file '/home/prasun/dynamorio-latest/build/bin64/../clients/lib64/debug/libdrmemtrace.so' 0x00007fa1c79683c0
add-symbol-file '/home/prasun/dynamorio-latest/build/lib64/debug/libdynamorio.so' 0x00007fa20bb9e780
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrsyms.so' 0x00007fa1c7bf6260
add-symbol-file '/lib/x86_64-linux-gnu/libc.so.6' 0x00007fa20b555360
add-symbol-file '/lib64/ld-linux-x86-64.so.2' 0x00007fa20b307f10
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrwrap.so' 0x00007fa1c7e3e6d0
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrmgr.so' 0x00007fa1c804f090
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrutil.so' 0x00007fa1c825e850
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrstatecmp.so' 0x00007fa1c84647b0
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrcovlib.so' 0x00007fa1c866ae60
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrx.so' 0x00007fa1c8877350
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrreg.so' 0x00007fa1c8a8a010
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrbbdup.so' 0x00007fa1c8c99330
add-symbol-file '/home/prasun/dynamorio-latest/build/ext/lib64/debug/libdrpttracer.so' 0x00007fa1c8ea6130
add-symbol-file '/usr/lib/x86_64-linux-gnu/libsnappy.so.1' 0x00007fa20b1001b0
add-symbol-file '/usr/lib/x86_64-linux-gnu/libstdc++.so.6' 0x00007fa20ad8c9c0
add-symbol-file '/lib/x86_64-linux-gnu/libm.so.6' 0x00007fa20a95ca80
add-symbol-file '/lib/libgcc_s.so.1' 0x00007fa20a73ab50
add-symbol-file '/lib/x86_64-linux-gnu/libz.so.1' 0x00007fa20a51bf90
>
<curiosity: rex.w on OPSZ_6_irex10_short4!>
<(1+x) Handling our fault in a TRY at 0x00007fa20be05199>
Hit delay threshold: enabling tracing.
Hit -max_global_trace_refs: disabling tracing.
<dropping 3rd pending alarm signal>
Estimation of pi is 3.141592653589820
Received 1726 alarms
<Stopping application /home/prasun/dynamorio-latest/threadsig (200629)>

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

Assignee
Assign to
Time tracking