brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Crash if i8k kernel module is not loaded #945

Closed hexchain closed 1 year ago

hexchain commented 4 years ago

Issue

Conky crashes if i8k variables are used but the kernel module is not loaded.

Information

OS: Arch Linux Conky: git master

conky.config = {
    no_buffers = true,
    out_to_x = false,
    out_to_console = true,
};

conky.text = [[ ${i8k_right_fan_status} ${i8k_right_fan_rpm} ]];
% gdb ./build/src/conky
GNU gdb (GDB) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./build/src/conky...
(gdb) r -c conky.conf
Starting program: /home/hexchain/tmp/repo/conky/build/src/conky -c conky.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff63e5700 (LWP 1197905)]
conky: /proc/i8k doesn't exist! use insmod to make sure the kernel driver is loaded...

Thread 1 "conky" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f5dd24 in pthread_mutex_lock () from /usr/lib/libpthread.so.0
(gdb) bt full
#0  0x00007ffff7f5dd24 in pthread_mutex_lock () from /usr/lib/libpthread.so.0
No symbol table info available.
#1  0x000055555556fa81 in __gthread_mutex_lock (__mutex=0x0) at /usr/include/c++/9.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:749
No locals.
#2  0x000055555556fc7c in std::mutex::lock (this=0x0) at /usr/include/c++/9.2.1/bits/std_mutex.h:100
        __e = 21845
#3  0x0000555555573444 in std::lock_guard<lua::state>::lock_guard (this=0x7fffffffd4d8, __m=...) at /usr/include/c++/9.2.1/bits/std_mutex.h:159
No locals.
#4  0x0000555555571fbf in conky::config_setting_template<unsigned int>::get (this=0x55555563fd00 <max_user_text>, l=...) at ../src/setting.hh:214
        guard = {_M_device = @0x0}
        s = {L = 0x5555557c2990, n = 1432616328}
#5  0x0000555555567de3 in generate_text () at ../src/conky.cc:765
        p = 0x0
        i = 0
        j = 4151927205
        k = 32767
        mw = 4294956368
        tbs = 32767
        ui = 0
        time = 0
#6  0x000055555556b8f3 in update_text () at ../src/conky.cc:1853
No locals.
#7  0x000055555556ca64 in main_loop () at ../src/conky.cc:2264
        time_to_sleep = -1.046427869994659
        seconds = -2
        nanos = 953572130.00534105
        req = {tv_sec = -2, tv_nsec = 953572130}
        rem = {tv_sec = 0, tv_nsec = 0}
        terminate = 0
        t = 0
        inotify_config_wd = -1
        inotify_buff = '\000' <repeats 104 times>, "c4WUUU", '\000' <repeats 34 times>, " \330\377\377\377\177\000\000\000\000\000\000\000\000\b@p\275{UUU\000\000\300\365cUUU\000\000@\330\377\377\377\177\000\000p\275{UUU\000\000p\275{UUU\000\000\000\000\000\000"...
#8  0x00005555555665a6 in main (argc=3, argv=0x7fffffffdb78) at ../src/main.cc:354
        curl_global = {<No data fields>}
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.

bi4k8 commented 1 year ago

I can confirm on current main.