Skip to content

"exception raised while parsing perf output" with "branches:u: tr strt" #323

@ednolan

Description

@ednolan

With Ubuntu 24.04, magic-trace 1.2.4 fails to parse the perf data it records for /bin/true:

root@eddie-beman-server:~# /home/eddie/magic-trace --version
v1.2.4
root@eddie-beman-server:~# perf --version
perf version 6.8.12
root@eddie-beman-server:~# head -n 1 /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
root@eddie-beman-server:~# head -n 5 /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 190
model name      : Intel(R) N150
root@eddie-beman-server:~# MAGIC_TRACE_DEBUG=1 /home/eddie/magic-trace run -z-print-perf-commands /bin/true
perf record -o /tmp/magic_trace.tmp.2d760e/perf.data --timestamp --event=intel_pt/cyc=1,cyc_thresh=1,mtc_period=0/u --per-thread -t 377283 --snapshot=e
[ Snapshot taken. ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.070 MB /tmp/magic_trace.tmp.2d760e/perf.data ]
[ Finished recording. ]
[ Decoding, this takes a while... ]
Warning: Debug info is unavailable, so filenames and line numbers will not be available in the trace.
See https://github.com/janestreet/magic-trace/wiki/Compiling-code-for-maximum-compatibility-with-magic-trace for more info.
perf script -i /tmp/magic_trace.tmp.2d760e/perf.data --ns --itrace=bep -F pid,tid,time,flags,ip,addr,sym,symoff,synth,dso,event,period --dlfilter /tmp/magic_trace.tmp.2d760e/perf_dlfilter.so
(monitor.ml.Error
 ("BUG: exception raised while parsing perf output. Please report this to https://github.com/janestreet/magic-trace/issues/"
  (exn Not_found)
  (perf_output
   (" 377283/377283  1693318.312267580:          1                                 branches:u:   tr strt           (D)                 0 [unknown] ([unknown]) =>     73e8caac0540 [unknown] (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2)")))
 ("Raised at Base__Error.raise in file \"src/error.ml\" (inlined), line 9, characters 14-30"
  "Called from Base__Error.raise_s in file \"src/error.ml\", line 10, characters 19-40"
  "Called from Async_kernel__Pipe.map.(fun) in file \"src/pipe.ml\", line 1066, characters 65-70"
  "Called from Async_kernel__Job_queue.run_jobs in file \"src/job_queue.ml\", line 180, characters 6-47"
  "Caught by monitor Monitor.protect"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions