Stream: git-wasmtime

Topic: wasmtime / Issue #1441 Wasmtime guide example: Perf error...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2020 at 10:07):

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 directory

Environnement infos:
OS linux 5.3.0-42-generic
wasmtime 0.14.0
perf version 5.3.18
rustc 1.44.0-nightly

I 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...:)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2020 at 10:07):

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 directory

Environnement infos:
OS linux 5.3.0-42-generic
wasmtime 0.14.0
perf version 5.3.18
rustc 1.44.0-nightly

I 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...:)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2020 at 10:21):

bjorn3 commented on Issue #1441:

You are running perf using sudo, which means that PATH will get set to the default for root. This PATH 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:

  1. Use /path/to/wasmtime instead of plain wasmtime. This may not be the best idea as this will run wasmtime as root, meaning that the wasm module will access any paths you allowed as root, with write permission.
  2. Run the command perf suggests when you don't run it as root. (you can replace the -1 with 2 to give only the perf permissions that you need in this case to normal users) Then you can run perf as normal user without sudo. This is the safest way as wasmtime doesn't get any extra privileges.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2020 at 12:16):

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2020 at 12:16):

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 directory

Environnement infos:
OS linux 5.3.0-42-generic
wasmtime 0.14.0
perf version 5.3.18
rustc 1.44.0-nightly

I 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: Nov 22 2024 at 17:03 UTC