Closed omid closed 2 years ago
Could you give bit more info, like what screen you were on and what you were doing? Also could attach the crash log file created. Path should be printed on your console during crash
I just run the command, and wait some seconds.
Sometimes it crashes, sometimes not!
I think it crashes when loading the Namespace
block, or whatever is in the queue after that.
I cannot attach the crash log file, since we cannot attach toml files in github. But what you see above is the crash file content. Just tried it again and here is a new one:
name = 'kdash'
operating_system = 'unix:Manjaro'
crate_version = '0.2.6'
explanation = '''
Panic occurred in file '~/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.16.0/src/widgets/gauge.rs' at line 204
'''
cause = 'Ratio should be between 0 and 1 inclusively.'
method = 'Panic'
backtrace = '''
0: 0x55e75ba480f2 - kdash::main::hbb7d0b00cd09bc2d
1: 0x55e75b90b0b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h37718759770cb226
2: 0x55e75ba53eb7 - main
3: 0x7f959c8edb25 - __libc_start_main
4: 0x55e75b88425e - _start
5: 0x0 - <unresolved>'''
What terminal do you use and what is size when the error happens? can you try another terminal and a different terminal size? also can you copy-paste the content of crash log here
What you see here is the copy/paste of the crash log, whole of it.
Terminal is gnome-terminal, and the window is full screen. By size you mean pixels/resolution or lines and chars of the terminal. Anyway, it's not small!
Honestly I dont have enough info here to troubleshoot. There was some issue with tui-rs lib tables in small terminals, but that was fixed some time ago so I have no idea whats going on here. Do you have rust installed if not will you be willing to run the main branch locally?
Thanks & Regards, Deepu
On Thu, Jan 20, 2022 at 9:52 AM Omid Rad @.***> wrote:
What you see here is the copy/paste of the crash log, whole of it.
Terminal is gnome-terminal, and the window is full screen. By size you mean pixels/resolution or lines and chars of the terminal. Anyway, it's not small!
— Reply to this email directly, view it on GitHub https://github.com/kdash-rs/kdash/issues/151#issuecomment-1017246650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIOKF3GBPSLRZUZSJKY2HLUW7ENLANCNFSM5MKBMO4Q . You are receiving this because you commented.Message ID: @.***>
yes, I have Rust installed. Will try to debug it now.
Now I have more info:
thread '<unnamed>' panicked at 'Ratio should be between 0 and 1 inclusively.', /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.16.0/src/widgets/gauge.rs:204:9
0: kdash::panic_hook
at src/main.rs:236:44
1: kdash::main::{{closure}}::{{closure}}
at src/main.rs:40:5
2: std::panicking::rust_panic_with_hook
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:610:17
3: std::panicking::begin_panic::{{closure}}
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:526:9
4: std::sys_common::backtrace::__rust_end_short_backtrace
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:139:18
5: std::panicking::begin_panic
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:525:12
6: tui::widgets::gauge::LineGauge::ratio
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.16.0/src/widgets/gauge.rs:204:9
7: kdash::ui::overview::draw_context_info_block
at src/ui/overview.rs:144:19
8: kdash::ui::overview::draw_status_block
at src/ui/overview.rs:45:3
9: kdash::ui::overview::draw_overview
at src/ui/overview.rs:26:5
10: kdash::ui::draw
at src/ui/mod.rs:64:7
11: kdash::start_ui::{{closure}}::{{closure}}
at src/main.rs:180:23
12: tui::terminal::Terminal<B>::draw
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.16.0/src/terminal.rs:267:9
13: kdash::start_ui::{{closure}}
at src/main.rs:180:5
14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/future/mod.rs:80:19
15: kdash::main::{{closure}}
at src/main.rs:103:3
16: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/future/mod.rs:80:19
17: tokio::park::thread::CachedParkThread::block_on::{{closure}}
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/park/thread.rs:263:54
18: tokio::coop::with_budget::{{closure}}
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/coop.rs:102:9
19: std::thread::local::LocalKey<T>::try_with
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/thread/local.rs:399:16
20: std::thread::local::LocalKey<T>::with
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/thread/local.rs:375:9
21: tokio::coop::with_budget
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/coop.rs:95:5
tokio::coop::budget
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/coop.rs:72:5
tokio::park::thread::CachedParkThread::block_on
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/park/thread.rs:263:31
22: tokio::runtime::enter::Enter::block_on
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/enter.rs:151:13
23: tokio::runtime::thread_pool::ThreadPool::block_on
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/thread_pool/mod.rs:77:9
24: tokio::runtime::Runtime::block_on
at /home/omid/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/mod.rs:463:43
25: kdash::main
at src/main.rs:105:3
26: core::ops::function::FnOnce::call_once
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/ops/function.rs:227:5
27: std::sys_common::backtrace::__rust_begin_short_backtrace
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:123:18
28: std::rt::lang_start::{{closure}}
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/rt.rs:145:18
29: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/ops/function.rs:259:13
std::panicking::try::do_call
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:406:40
std::panicking::try
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:370:19
std::panic::catch_unwind
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panic.rs:133:14
std::rt::lang_start_internal::{{closure}}
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/rt.rs:128:48
std::panicking::try::do_call
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:406:40
std::panicking::try
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:370:19
std::panic::catch_unwind
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panic.rs:133:14
std::rt::lang_start_internal
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/rt.rs:128:20
30: std::rt::lang_start
at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/rt.rs:144:17
31: main
32: __libc_start_main
33: _start
this
get_nm_ratio(app.data.node_metrics.as_ref(), |acc, nm| {
acc + nm.mem_percent
})
returns a number like 1.167
I'm going deeper
Now I see the error rarely! So, it is slow to debug. Anyway, I had 335% memory usage for 3 nodes!
Thank you, so seems like an edge case. So need to put an upper limit value. Would you like to contribute else I can do the fix later
nm.mem
shows something like 2575Mi
But kubectl shows, 813Mi
requests and 3634Mi
limit for allocated resources and 2157Mi
allocatable and 3931Mi
capacity, for the same node!
So I think it's more than an edge case, it's like wrong calculation of memory usage.
I'm still investigating :)
Ideally the calculation should match what is shown by kubectl top
On Thu, 20 Jan 2022, 5:26 pm Omid Rad, @.***> wrote:
nm.mem shows something like 2575Mi But kubectl shows, 813Mi requests and 3634Mi limit for allocated resources and 2157Mi allocatable and 3931Mi capacity, for the same node!
So I think it's more than an edge case, it's like wrong calculation of memory usage.
I'm still investigating :)
— Reply to this email directly, view it on GitHub https://github.com/kdash-rs/kdash/issues/151#issuecomment-1017423263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIOKF4ZKDX7O47PMWXBTZ3UW7Z53ANCNFSM5MKBMO4Q . You are receiving this because you commented.Message ID: @.***>
You are right, I see these:
MEMORY(bytes) MEMORY%
2599Mi 120%
So, percentage can be more than 100.
Do you think we should show 120% |=============|
or 100% |=============|
in these cases or something else? (50% will be 50% |=======-------|
)
???
Since its a guage widget I think we should limit to 100, so anything above 100 we can cut off at 100, the accurate values can be seen in the utilization tab anyway. What do you think?
I implemented it like 120% |=============|
(in the PR)
I like the result, but anyway, as you wish.
I have created a new release. Should be out in 10-15 mins
Thanks & Regards, Deepu
On Thu, Jan 20, 2022 at 1:57 PM Omid Rad @.***> wrote:
I implemented it like 120% |=============| (in the PR) I like the result, but anyway, as you wish.
— Reply to this email directly, view it on GitHub https://github.com/kdash-rs/kdash/issues/151#issuecomment-1017480875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIOKF2OX4JMVEYHUFLEHS3UXABENANCNFSM5MKBMO4Q . You are receiving this because you commented.Message ID: @.***>
Thanks @deepu105 I think adding the version and date to the changlog file is forgotten.
Oh ya forgot to update that I'll do that in a bit
@omid feel free to make feature requests or even better contribute features that you think would make Kdash more useful :)
@deepu105 sure, thanks