Open Anto79-ops opened 1 year ago
Same here
The problem is with parsing the process maps - probably of the PID you're trying to profile.
Please attach:
/proc/pid/maps
outputs for the process you tried to profile / top
, i.e cat /proc/60/maps
RUST_BACKTRACE=1
so we get full stack trace (so we know which field specifically failed to parse). From the line number I suppose it's range_start: usize::from_str_radix(range_start, 16).unwrap()
but let's be sure.@Jongy thank you very much for these instructions.
just a couple mentions
cat /proc/66/maps
(PID is now 66), there is a quite a bit of lines coming out, not sure how write to file so that I can share that with youbash-5.1# ./py-spy top --pid 66 RUST_BACKTRACE=1
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-maps-0.2.1/src/linux_maps.rs:81:65
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: receiving on a closed channel
bash-5.1#
thanks for your time
RUST_BACKTRACE=1 ./py-spy top --pid 66
thanks @bdraco!
here's what that command outputs (word wrapping might be weird so you'll have to scroll all the way right) :
py-spy
bash-5.1# RUST_BACKTRACE=1 ./py-spy top --pid 67
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Par seIntError { kind: PosOverflow }', /root/.cargo/registry/src/github.com-1ecc6299 db9ec823/proc-maps-0.2.1/src/linux_maps.rs:81:65
stack backtrace:
0: rust_begin_unwind
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/ panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src /panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src /result.rs:1785:5
3: proc_maps::linux_maps::get_process_maps
4: py_spy::python_spy::PythonSpy::new
5: py_spy::python_spy::PythonSpy::retry_new
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose bac ktrace.
Error: receiving on a closed channel
and just to confirm the PID of interest is now 67
Thanks @Anto79-ops . Getting the contents of /proc/pid/maps
will help as the some "protocol" between the file and the parser is broken and having the raw contents will help understanding exactly which.
when I tried cat /proc/66/maps (PID is now 66), there is a quite a bit of lines coming out, not sure how write to file so that I can share that with you
It can be quite long indeed (depending on the amount of libraries your process has loaded), but since any of those lines can be the problematic line, we'll need the full one. You can attach it as a message in GitHub (copy the file aside, then drag and drop it to the textbox)
Hi,
as mentioned above I have the same problems (and the same output for RUST_BACKTRACE=1 ./py-spy top --pid 66 as above). Here is the content of my /proc/66/maps.
@BrainInSight could you please tell me how you wrote your maps to a file? Thanks
ok, was able to get the maps file thanks @Jongy
and just to be consistent, here's the RUST_BACKTRACE for the same session
bash-5.1# RUST_BACKTRACE=1 ./py-spy top --pid 68
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-maps-0.2.1/src/linux_maps.rs:81:65
stack backtrace:
0: rust_begin_unwind
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1785:5
3: proc_maps::linux_maps::get_process_maps
4: py_spy::python_spy::PythonSpy::new
5: py_spy::python_spy::PythonSpy::retry_new
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Error: receiving on a closed channel
bash-5.1#
Hi @Jongy wondering if you had a chance to look the logs, and perhaps see a resolution. Thanks for your help and time.
Hi @Anto79-ops haven't had the chance yet, I'll update once I do :)
I did try meanwhile to run proc-maps crate on v0.2.1 (used by py-spy) and on master with your file from here and @BrainInSight 's file from here. Both manage to parse correctly so I might be doing something wrong :/ will continue testing it thoroughly once I find the time.
Thank you @Jongy anytime you put to this issue is greatly appreciated.
Hi, i'm facing the same issue. See below the ouput of backtrace=1 . I hope this might help to find the issue.
bash-5.1# RUST_BACKTRACE=1 ./py-spy top --pid 66
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-maps-0.2.1/src/linux_maps.rs:81:65
stack backtrace:
0: rust_begin_unwind
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1785:5
3: proc_maps::linux_maps::get_process_maps
4: py_spy::python_spy::PythonSpy::new
5: py_spy::python_spy::PythonSpy::retry_new
any luck on a solution for this issue? thank you
Hello all,
Not sure if this is an issue or usage problem, so I wanted to reach out.
I'm trying to install and run py-spy on Home Assistant OS in the container by these commands from these instructions:
However, when I to run the py-spy on the PID of interest, i get these errors:
Does anyone know what these means and how to solve the problem?
thank you