Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

"Cannot allocate memory" #75

Open
jsatk opened this issue Apr 27, 2020 · 9 comments
Open

"Cannot allocate memory" #75

jsatk opened this issue Apr 27, 2020 · 9 comments

Comments

@jsatk
Copy link

jsatk commented Apr 27, 2020

Required information:

  • ytop version (ytop -V): 0.6.0
  • The output of uname -a: Darwin C02ZH2XRLVDR 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

Include any of the following information if relevant:

  • Terminal emulator (e.g. iTerm or gnome terminal): iTerm 3.3.9
  • tmux version (tmux -V): 3.1

Error:

$ ytop

Backtrace omitted. Run with RUST_BACKTRACE=1 to display it.
Run with RUST_BACKTRACE=full to include source snippets.

The application panicked (crashed).
  called `Result::unwrap()` on an `Err` value: OsError { source: Os { code: 12, kind: Other, message: "Cannot allocate memory" } }
in src/widgets/proc.rs, line 217
thread: main

image

Was a gotop user. Saw it was no longer maintained. Decided to try this. Crashes within three seconds or so.

@sudopseudocode
Copy link

sudopseudocode commented May 11, 2020

I can confirm I am also having this issue, it crashes after 10-30 seconds for me.

Also using iTerm and tmux. macOS Catalina 10.15.4. Using ytop version 0.6.1.

@hiepd
Copy link

hiepd commented Jul 13, 2020

I am having this issue with Alacritty and tmux. macOS Catalina 10.15. ytop version 0.6.2.

@CosmicHorrorDev
Copy link

I just got ahold of a mac to try and reproduce this and didn't have any luck. If any of you all can still consistently reproduce this could you build with debug info and run with RUST_BACKTRACE=full that would really help out for trying to track it down.

@hiepd
Copy link

hiepd commented Jul 25, 2020

❯ RUST_BACKTRACE=full ytop
Backtrace (most recent call first):
  File "<unknown>", line 0, in <ytop::widgets::proc::ProcWidget as ytop::update::UpdatableWidget>::update
  File "<unknown>", line 0, in ytop::update::update_widgets
  File "<unknown>", line 0, in ytop::main
  File "<unknown>", line 0, in std::rt::lang_start::{{closure}}
  File "<unknown>", line 0, in std::panicking::try::do_call
  File "<unknown>", line 0, in __rust_maybe_catch_panic
  File "<unknown>", line 0, in std::rt::lang_start_internal
  File "<unknown>", line 0, in main

The application panicked (crashed).
  called `Result::unwrap()` on an `Err` value: OsError { source: Os { code: 12, kind: Other, message: "Cannot allocate memory" } }
in src/widgets/proc.rs, line 217
thread: main

Alacritty and tmux. macOS Catalina 10.15. ytop version 0.6.2.

@CosmicHorrorDev
Copy link

Thanks for the backtrace, but the debug info has been stripped. If someone wouldn't mind rebuilding the program with debug info then that would really help. It would require cargo to build and will require adding

[profile.release]
debug = true

To the bottom of Cargo.toml. From there you can run it with RUST_BACKTRACE=full cargo run --release

@CosmicHorrorDev
Copy link

I was able to find the source of the problem and reproduce it on a friends mac. Ill be opening a pull request later today to fix it, so no need for debug information.

@CosmicHorrorDev
Copy link

I've opened rust-psutil/rust-psutil#80 to address this issue, but we have to:

  1. Wait for the PR to get merged
  2. Wait for a new release of psutil
  3. Update the psutil and Cargo.lock file here

So it'll still be a while before this is fully fixed.

@hiepd
Copy link

hiepd commented Jul 26, 2020

Thanks @LovecraftianHorror !

@jsatk
Copy link
Author

jsatk commented Jul 27, 2020

Thanks @LovecraftianHorror. This is also affecting htop as well it seems.

What are y'all using in the meantime?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants