BenoitDel opened Issue #1441:
Try to reproduce the perf example in the wasmtime guide (section 3.2)
The following perf command line failed:
sudo perf record -k mono wasmtime --jitdump fib.wasm
with the following error message:
Workload failed: No such file or directoryEnvironnement infos:
OS linux 5.3.0-42-generic
wasmtime 0.14.0
perf version 5.3.18
rustc 1.44.0-nightlyI am completely new to wasmtime and perf so it is possible that the result is an error on my part.
But since a guide is made for beginner...:)
BenoitDel labeled Issue #1441:
Try to reproduce the perf example in the wasmtime guide (section 3.2)
The following perf command line failed:
sudo perf record -k mono wasmtime --jitdump fib.wasm
with the following error message:
Workload failed: No such file or directoryEnvironnement infos:
OS linux 5.3.0-42-generic
wasmtime 0.14.0
perf version 5.3.18
rustc 1.44.0-nightlyI am completely new to wasmtime and perf so it is possible that the result is an error on my part.
But since a guide is made for beginner...:)
bjorn3 commented on Issue #1441:
You are running perf using sudo, which means that
PATH
will get set to the default forroot
. ThisPATH
doesn't contain the directory you have installed wasmtime to if you didn't install is a root. There are two ways to fix the problem:
- Use
/path/to/wasmtime
instead of plainwasmtime
. This may not be the best idea as this will runwasmtime
as root, meaning that the wasm module will access any paths you allowed asroot
, with write permission.- Run the command perf suggests when you don't run it as root. (you can replace the
-1
with2
to give only the perf permissions that you need in this case to normal users) Then you can run perf as normal user withoutsudo
. This is the safest way aswasmtime
doesn't get any extra privileges.
BenoitDel commented on Issue #1441:
Thanks for the help. Problem solved.
For those like me who are unable to read the prompt message correctly, the same thing is written in larger font size here:
https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html
BenoitDel closed Issue #1441:
Try to reproduce the perf example in the wasmtime guide (section 3.2)
The following perf command line failed:
sudo perf record -k mono wasmtime --jitdump fib.wasm
with the following error message:
Workload failed: No such file or directoryEnvironnement infos:
OS linux 5.3.0-42-generic
wasmtime 0.14.0
perf version 5.3.18
rustc 1.44.0-nightlyI am completely new to wasmtime and perf so it is possible that the result is an error on my part.
But since a guide is made for beginner...:)
Last updated: Dec 23 2024 at 12:05 UTC