magic-trace icon indicating copy to clipboard operation
magic-trace copied to clipboard

Failure to remove perf.data is fatal

Open gfaster opened this issue 7 months ago • 0 comments

On NixOS, Shell.rm fails to remove the perf.data file because it cannot find /bin/rm, which is a fatal error. This issue really lies with shell, but I don't know enough OCaml to make an issue on a library. Regardless, failing to remove the tmp file should probably be non-fatal.

This is on version 1.2.1

errors:

(monitor.ml.Error (Failure "fork_exec: Process not found /bin/rm")
 ("Raised at Stdlib.failwith in file \"stdlib.ml\", line 29, characters 17-33"
  "Called from Unix_extended.fork_exec in file \"unix_extended/src/unix_extended.ml\", line 164, characters 16-67"
  "Called from Low_level_process.internal_create_process in file \"low_level_process/src/low_level_process.ml\", line 43, characters 14-276"
  "Re-raised at Low_level_process.internal_create_process in file \"low_level_process/src/low_level_process.ml\", line 67, characters 4-11"
  "Called from Low_level_process.create in file \"low_level_process/src/low_level_process.ml\", line 342, characters 4-98"
  "Called from Low_level_process.run in file \"low_level_process/src/low_level_process.ml\", line 422, characters 14-301"
  "Called from Shell.Process.run_k.(fun) in file \"src/shell.ml\", line 181, characters 16-37"
  "Called from Magic_trace_lib__Trace.Make_commands.record_flags.(fun) in file \"src/trace.ml\", line 553, characters 26-57"
  "Called from Async_kernel__Monitor.Exported_for_scheduler.schedule'.upon_work_fill_i in file \"src/monitor.ml\", line 293, characters 42-51"
  "Called from Async_kernel__Job_queue.run_jobs in file \"src/job_queue.ml\", line 180, characters 6-47"
  "Caught by monitor finally"))

gfaster avatar Jul 25 '24 03:07 gfaster