Closed
Description
What happened + What you expected to happen
The error message when flamegraph is not available is confusing.
- Create some actors
import ray
@ray.remote
class Foo:
def ping(self):
return 1
f = Foo.remote()
pings = [f.ping.remote() for _ in range(100)]
Failed to execute `sudo -n $(which py-spy) record -o /tmp/ray/session_2022-12-13_23-03-10_714589_166/logs/flamegraph_6483_cpu_profiling.svg -p 6483 -d 5 -f flamegraph`.
Note that this command requires `py-spy` to be installed with root permissions. You
can install `py-spy` and give it root permissions as follows:
$ pip install py-spy
$ sudo chown root:root `which py-spy`
$ sudo chmod u+s `which py-spy`
Alternatively, you can start Ray with passwordless sudo / root permissions.
=== stdout ===
py-spy> Sampling process 100 times a second for 5 seconds. Press Control-C to exit.
=== stderr ===
[2022-12-14T07:27:26.459031825Z ERROR inferno::flamegraph] No stack counts found
Error: Failed to write flamegraph: I/O error: No stack counts found
Versions / Dependencies
Ray 2.2
Reproduction script
See above
Issue Severity
Low: It annoys or frustrates me.