Summary: | ksysguardd crashed on kernel 4.9 | ||
---|---|---|---|
Product: | [Applications] ksysguard | Reporter: | boestari.riko |
Component: | ksysguardd | Assignee: | KSysGuard Developers <ksysguard-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | samrog131 |
Priority: | NOR | ||
Version: | 5.9.2 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/ksysguard/e4c58c2f6ef74bad065f7327c19c02a3dac88883 | Version Fixed In: | 5.8.6 |
Attachments: |
Proposed patch
ksysguard output journal ctl output screenshot valgrind ksysguard |
Description
boestari.riko
2017-02-16 09:00:35 UTC
i believe it also related to these bugs report: https://bugs.kde.org/show_bug.cgi?id=374944 https://bugs.kde.org/show_bug.cgi?id=371942 Created attachment 104068 [details]
Proposed patch
Indeed. It counts the number of "cpu<n>" lines, and only allocates that number of entries. But then, it uses the <n> number to index into the allocated array.
Could you test attached patch?
i'll try it tonight. currently at work now. Created attachment 104075 [details]
ksysguard output
Created attachment 104076 [details]
journal ctl output
this is the journalctl output when running ksysguard
Created attachment 104077 [details]
screenshot
so, i built the latest ksysguard from github and include your changes.
running ksysguard, well, nothing changes, it's still running with errors. i include the screenshot. you can see at the bottom, ksysguard only shows number of processes, and missing average cpu usage, memory usage, etc. and in system load tab, the graph is not drawing at all. on previous comment, i also include output of ksysguard and journalctl. sorry for triple post, i have no idea how to attach multiple files here
and btw on my amd fx-6100, kernel 4.9.8 /sys/devices/system/cpu folder contains cpu0, cpu3-cpu7 just like in /proc/stat, and files /sys/devices/system/cpu/cpuX/cpufreq/stats/time_in_state is empty. hope this helps (In reply to boestari.riko from comment #6) > Created attachment 104077 [details] > screenshot > > so, i built the latest ksysguard from github and include your changes. > running ksysguard, well, nothing changes, it's still running with errors. i > include the screenshot. you can see at the bottom, ksysguard only shows > number of processes, and missing average cpu usage, memory usage, etc. and > in system load tab, the graph is not drawing at all. on previous comment, i > also include output of ksysguard and journalctl. sorry for triple post, i > have no idea how to attach multiple files here Did you clean the $HOME/.local/share/ksysguard/ directory ? At here: AMD FX-6100 (six core) & Arch Linux. With the Kernel 4.9.8 the core numbering is 0,3,4,5,6,7 -> The Ksysguard is crashing.... Downloading the Arch Ksysguard PKGBUILD: https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/ksysguard Applying the patch: patch -p1 -i /path/to/counter.diff Wrapping the package: makepkg -e Installing the package: pacman -U ksysguard-5.9.2-1-x86_64.pkg.tar.xz Restarting the plasmashell: kquitapp5 plasmashell and then plasmashell Testing the ksysguard -> The CPU History and the Network History are blank. Cleaning (removing files from) the $HOME/.local/share/ksysguard/ Restarting the plasmashell and testing again - working - the core numbering is a bit strange 1,4,5,6,7,8 : http://imgur.com/ys2ADg9 If it still crashes with the patch applied, please add a backtrace with full debug symbols, and ideally also a valgrind log (with debug symbols). Note that default packages in Arch do not have debug information, so you need to compile yourself, or test with a different distribution. (In reply to Rog131 from comment #8) > (In reply to boestari.riko from comment #6) > > Created attachment 104077 [details] > > screenshot > > > > so, i built the latest ksysguard from github and include your changes. > > running ksysguard, well, nothing changes, it's still running with errors. i > > include the screenshot. you can see at the bottom, ksysguard only shows > > number of processes, and missing average cpu usage, memory usage, etc. and > > in system load tab, the graph is not drawing at all. on previous comment, i > > also include output of ksysguard and journalctl. sorry for triple post, i > > have no idea how to attach multiple files here > > Did you clean the $HOME/.local/share/ksysguard/ directory ? cleaning that directory gave the same result. (In reply to Christoph Feck from comment #10) > If it still crashes with the patch applied, please add a backtrace with full > debug symbols, and ideally also a valgrind log (with debug symbols). Note > that default packages in Arch do not have debug information, so you need to > compile yourself, or test with a different distribution. i know how to use valgrind, but how do i enable debug symbols? at compile time or at running time? At cmake time, with -DCMAKE_BUILD_TYPE=Debug Created attachment 104087 [details]
valgrind ksysguard
here's the valgrind ksysguard output. i'm using flag --leak-check=full
The valgrind memcheck log does not show any reason for a crash. The 'invalid reads' and 'invalid writes' seem to be gone, so I am wondering if it crashes at all. (In reply to Christoph Feck from comment #15) > The valgrind memcheck log does not show any reason for a crash. The 'invalid > reads' and 'invalid writes' seem to be gone, so I am wondering if it crashes > at all. well, ksysguard itself is not crashing, but avrage cpu load, memory load, and graphs in system load not drawing at all. and on the process list, systemd-coredump keep surfacing continuously. after checking journalctl, it is related to ksysguardd like in attachment 104076 [details] Yes, but that backtrace has no debug symbols... (In reply to Christoph Feck from comment #17) > Yes, but that backtrace has no debug symbols... i built it using following commands within build directory inside ksysguard project [boes@ARCHHOME build]$cmake -DCMAKE_BUILD_TYPE=Debug .. [boes@ARCHHOME build]$make am i missing something here? I was referring to the attachment from comment #5. It clearly shows a crash, but the symbols are 'n/a' there. Also, make sure ksysguard actually connects to your compiled version of ksysguardd, instead of the one from distribution packages. (In reply to Christoph Feck from comment #19) > I was referring to the attachment from comment #5. It clearly shows a crash, > but the symbols are 'n/a' there. > > Also, make sure ksysguard actually connects to your compiled version of > ksysguardd, instead of the one from distribution packages. how do i make sure compiled ksysguard connects to compiled ksysguardd? i have google this, but no manual or explanation on this topic. If everything else fails, install it to /usr and reboot. cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .. make sudo make install (In reply to Christoph Feck from comment #21) > If everything else fails, install it to /usr and reboot. > > cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .. > make > sudo make install omg, yes this solve the problem. ksysguard behaves normally again, and no more error message on journalctl. also, many monitoring widgets (thermal monitor, cpu load) is functional again, guess it depends on ksysguard. but system load tab still not drawing cpu history & network history, only memory & swap history functioning. but this issue happened long before kernel 4.9. i guess i'll search google first. thanks dude, now should i change the status to resolved? Git commit e4c58c2f6ef74bad065f7327c19c02a3dac88883 by Christoph Feck. Committed on 19/02/2017 at 04:15. Pushed by cfeck into branch 'Plasma/5.8'. Fix array allocation for non-continuous cpu numbers FIXED-IN: 5.8.6 Differential Revision: https://phabricator.kde.org/D4640 M +2 -1 ksysguardd/Linux/stat.c https://commits.kde.org/ksysguard/e4c58c2f6ef74bad065f7327c19c02a3dac88883 |