Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unexpected event type when parsing perf output" with sampling mode #311

Open
Xyene opened this issue Oct 30, 2024 · 1 comment
Open

"Unexpected event type when parsing perf output" with sampling mode #311

Xyene opened this issue Oct 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Xyene
Copy link
Member

Xyene commented Oct 30, 2024

VM tracing seems broken at least in some circumstances on newer perfs.

$ magic-trace attach -p 647317
Intel PT support not found. magic-trace will continue and use sampling instead.
Warning: [-callgraph-mode] is defaulting to [Dwarf] which may have high overhead and decoding time. For more info: https://magic-trace.org/w/b
[ Attached. Press Ctrl-C to stop recording. ]
^C[ Got signal, detaching... ]
[ Snapshot taken. ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.570 MB /tmp/magic_trace.tmp.5d6b24/perf.data (82 samples) ]
[ Finished recording. ]
[ Decoding, this takes a while... ]
(monitor.ml.Error
 ("BUG: exception raised while parsing perf output. Please report this to https://github.com/janestreet/magic-trace/issues/"
  (exn
   ("Unexpected event type when parsing perf output" (event_name cpu-clock)))
  (perf_output
   ("647317/647317 529215.810279538:     100000 cpu-clock:uH: "
    "\t         687bd57 check_action_pending+0x7 (redacted)"
    "\t         684ddfd caml_thread_restore_runtime_state+0x151 (redacted)"
    "\t         684de81 caml_thread_leave_blocking_section+0xd (redacted)")))
 ("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"))
@Xyene Xyene added the bug Something isn't working label Oct 30, 2024
@tmm1
Copy link

tmm1 commented Nov 15, 2024

Same thing here:

❯ magic-trace attach 
Intel PT support not found. magic-trace will continue and use sampling instead.
Warning: [-callgraph-mode] is defaulting to [Dwarf] which may have high overhead and decoding time. For more info: https://magic-trace.org/w/b
[ Attached. Press Ctrl-C to stop recording. ]
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.008 MB /tmp/magic_trace.tmp.67107a/perf.data (1 samples) ]
^C[ Got signal, detaching... ]
[ Snapshot taken. ]
[ Finished recording. ]
[ Decoding, this takes a while... ]
(monitor.ml.Error
 ("BUG: exception raised while parsing perf output. Please report this to https://github.com/janestreet/magic-trace/issues/"
  (exn
   ("Unexpected event type when parsing perf output" (event_name cpu-clock)))
  (perf_output ("225303/225303 66761.600443943:     100000 cpu-clock:uH: ")))
 ("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"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants