https://bugs.kde.org/show_bug.cgi?id=437523

            Bug ID: 437523
           Summary: ksystemstats segfaults on start
           Product: plasma-systemmonitor
           Version: unspecified
          Platform: Kubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: ksysguard-b...@kde.org
          Reporter: maxibe...@gmail.com
                CC: ahiems...@heimr.nl, plasma-b...@kde.org
  Target Milestone: ---

SUMMARY
ksystemstats always crashes with segmentation fault on start.

STEPS TO REPRODUCE
1. Run ksystemstats.
2. Run plasma-systemmonitor.
3. Run kstatsviewer --list.

OBSERVED RESULT

ksystemstats immediately crashes with sigsegv on start, every time.

plasma-systemmonitor shows all empty charts in its default overview dashboard
(but applications and processes do show up).

`kstatsviewer --list` just hangs with no output.


$ ksystemstats
[1] 136376 segmentation fault (core dumped)  ksystemstats

$ sudo dmesg | grep ksystemstats | tail -1
[10634.070037] ksystemstats[136376]: segfault at 5567d285e976 ip
00007f7586c907f1 sp 00007ffc74e328b8 error 4 in
libc-2.33.so[7f7586b3b000+16b000]

$ sudo dmesg | grep ksystemstats | wc -l
118

$ gdb ksystemstats
GNU gdb (Ubuntu 10.1-2ubuntu2) 10.1.90.20210411-git
...
Reading symbols from ksystemstats...
Reading symbols from
/usr/lib/debug/.build-id/8f/5f3fbc89118665671a2e4c7bad1caba0d97066.debug...
(gdb) r
Starting program: /usr/bin/ksystemstats 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3923640 (LWP 139026)]
[New Thread 0x7ffff1cff640 (LWP 139027)]
[Detaching after fork from child process 139029]

Thread 1 "ksystemstats" received signal SIGSEGV, Segmentation fault.
__strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:102
102     ../sysdeps/x86_64/multiarch/strcmp-avx2.S: No such file or directory.
(gdb) bt
#0  __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:102
#1  0x00007ffff1d033f9 in sensors_match_chip (chip2=0x5555557ca9a0,
chip1=0x55555580d7b0) at lib/access.c:46
#2  sensors_lookup_chip (name=name@entry=0x5555557ca9a0) at lib/access.c:102
#3  0x00007ffff1d0350f in __sensors_get_value (name=0x5555557ca9a0,
subfeat_nr=0, depth=depth@entry=0, result=result@entry=0x7fffffffd3e8) at
lib/access.c:240
#4  0x00007ffff1d03a9e in sensors_get_value (name=<optimized out>,
subfeat_nr=<optimized out>, result=result@entry=0x7fffffffd3e8) at
lib/access.c:282
#5  0x00007ffff1d2cdd8 in SensorsFeatureSensor::update (this=0x5555557bf180) at
./plugins/lmsensors/SensorsFeatureSensor.cpp:142
#6  0x00007ffff1d2b97d in LmSensorsPlugin::update (this=<optimized out>) at
./plugins/lmsensors/lmsensors.cpp:65
#7  0x000055555556277d in Daemon::sendFrame (this=0x7fffffffda20) at
./src/daemon.cpp:236
#8  0x00007ffff7beab0e in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd5d0,
r=0x7fffffffda20, this=0x5555555939c0) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#9  doActivate<false> (sender=0x555555593930, signal_index=3,
argv=argv@entry=0x7fffffffd5d0) at kernel/qobject.cpp:3886
#10 0x00007ffff7be3cb8 in QMetaObject::activate (sender=<optimized out>,
m=m@entry=0x7ffff7e4d2a0 <QTimer::staticMetaObject>,
local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffd5d0)
at kernel/qobject.cpp:3946
#11 0x00007ffff7beebfe in QTimer::timeout (this=<optimized out>, _t1=...) at
.moc/moc_qtimer.cpp:205
#12 0x00007ffff7be01df in QObject::event (this=0x555555593930,
e=0x7fffffffd710) at kernel/qobject.cpp:1336
#13 0x00007ffff7bb31ff in doNotify (event=0x7fffffffd710,
receiver=0x555555593930) at kernel/qcoreapplication.cpp:1153
#14 QCoreApplication::notify (event=<optimized out>, receiver=<optimized out>,
this=<optimized out>) at kernel/qcoreapplication.cpp:1139
#15 QCoreApplication::notifyInternal2 (receiver=0x555555593930,
event=0x7fffffffd710) at kernel/qcoreapplication.cpp:1063
#16 0x00007ffff7c0b8c3 in QTimerInfoList::activateTimers (this=0x555555589380)
at kernel/qtimerinfo_unix.cpp:643
#17 0x00007ffff7c0c1bc in timerSourceDispatch (source=<optimized out>) at
kernel/qeventdispatcher_glib.cpp:183
#18 0x00007ffff6b9f84b in g_main_dispatch (context=0x555555586f20) at
../../../glib/gmain.c:3337
#19 g_main_context_dispatch (context=0x555555586f20) at
../../../glib/gmain.c:4055
#20 0x00007ffff6bf2c68 in g_main_context_iterate.constprop.0
(context=context@entry=0x555555586f20, block=block@entry=1,
dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4131
#21 0x00007ffff6b9cf83 in g_main_context_iteration (context=0x555555586f20,
may_block=may_block@entry=1) at ../../../glib/gmain.c:4196
#22 0x00007ffff7c0c594 in QEventDispatcherGlib::processEvents
(this=0x5555555865a0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#23 0x00007ffff7bb1b8b in QEventLoop::exec (this=this@entry=0x7fffffffd950,
flags=..., flags@entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#24 0x00007ffff7bba024 in QCoreApplication::exec () at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#25 0x000055555555a8b7 in main (argc=<optimized out>, argv=<optimized out>) at
./src/main.cpp:29
(gdb) c
Continuing.
Couldn't get registers: No such process.
Couldn't get registers: No such process.
(gdb) [Thread 0x7ffff1cff640 (LWP 139027) exited]
[Thread 0x7ffff3923640 (LWP 139026) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
q

$ systemctl --user status plasma-ksystemstats.service
● plasma-ksystemstats.service - Track hardware statistics
     Loaded: loaded (/usr/lib/systemd/user/plasma-ksystemstats.service; static)
     Active: failed (Result: core-dump) since Sat 2021-05-22 21:43:38 -03; 2min
1s ago
    Process: 141936 ExecStart=/usr/bin/ksystemstats (code=dumped, signal=SEGV)
   Main PID: 141936 (code=dumped, signal=SEGV)

may 22 21:43:37 max6 systemd[4477]: Starting Track hardware statistics...
may 22 21:43:38 max6 systemd[4477]: Started Track hardware statistics.
may 22 21:43:38 max6 systemd[4477]: plasma-ksystemstats.service: Main process
exited, code=dumped, status=11/SEGV
may 22 21:43:38 max6 systemd[4477]: plasma-ksystemstats.service: Failed with
result 'core-dump'.
may 22 21:43:38 max6 systemd[4477]: plasma-ksystemstats.service: Start request
repeated too quickly.
may 22 21:43:38 max6 systemd[4477]: plasma-ksystemstats.service: Failed with
result 'core-dump'.
may 22 21:43:38 max6 systemd[4477]: Failed to start Track hardware statistics.

$ systemctl --user status plasma-plasmashell.service | head -3 
● plasma-plasmashell.service - KDE Plasma Workspace
     Loaded: loaded (/usr/lib/systemd/user/plasma-plasmashell.service; enabled;
vendor preset: enabled)
     Active: active (running) since Sat 2021-05-22 13:11:20 -03; 8h ago


EXPECTED RESULT
No crashes. System monitor and kstatsviewer should show metrics and sensors.

SOFTWARE/OS VERSIONS
Operating System: Ubuntu 21.04
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-17-generic (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31,1 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1650 with Max-Q Design/PCIe/SSE2

ADDITIONAL INFORMATION
ksysguardd is running, fwiw.
`sensors` working as expected, shows a long list of sensors with their current
values.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to