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.27k stars 620 forks source link

SIGSEV on ubuntu 16.04 LTS #435

Closed progserega closed 6 years ago

progserega commented 6 years ago
  1. start conky
  2. sigsev:

    gdb conky GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 Copyright (C) 2016 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-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 conky...Reading symbols from /usr/lib/debug/.build-id/f9/f6daa40c07df53dffc4f157b084c5c8844e9f8.debug...done. done. (gdb) r Starting program: /usr/bin/conky [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". conky: Syntax error (/home/Serega/.conkyrc:2: unexpected symbol near '#') while reading config file. conky: Assuming it's in old syntax and attempting conversion. conky: Invalid value 'no' for setting 'use_spacer'. Valid values are: 'none', 'left', 'right'. conky: desktop window (4b1) is root window conky: window type - override conky: drawing to created window (0x2800001) conky: drawing to double buffer [New Thread 0x7ffff40c1700 (LWP 7948)] [New Thread 0x7ffff38c0700 (LWP 7949)] [New Thread 0x7ffff30bf700 (LWP 7950)] [New Thread 0x7ffff28be700 (LWP 7951)] [New Thread 0x7ffff20bd700 (LWP 7952)] [New Thread 0x7ffff18bc700 (LWP 7953)] [New Thread 0x7ffff10bb700 (LWP 7954)] [New Thread 0x7ffff08ba700 (LWP 7955)] [New Thread 0x7fffd3fff700 (LWP 7956)] [New Thread 0x7fffd37fe700 (LWP 7957)] [New Thread 0x7fffd2ffd700 (LWP 7958)] [New Thread 0x7fffd27fc700 (LWP 7964)] [New Thread 0x7fffd1ffb700 (LWP 7969)] [New Thread 0x7fffd15e8700 (LWP 7971)] [New Thread 0x7fffd0de7700 (LWP 7973)] [New Thread 0x7fffc7fff700 (LWP 7976)] [New Thread 0x7fffc77fe700 (LWP 7993)] [New Thread 0x7fffc6ffd700 (LWP 7999)] [New Thread 0x7fffc67fc700 (LWP 8005)] [New Thread 0x7fffc5ffb700 (LWP 8007)] [New Thread 0x7fffc57fa700 (LWP 8014)]

Thread 1 "conky" received signal SIGSEGV, Segmentation fault. 0x00007ffff574266c in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1 (gdb) bt

0 0x00007ffff574266c in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1

1 0x00007ffff72690e8 in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6

2 0x00007ffff726924b in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6

3 0x00007ffff726955d in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6

4 0x00007ffff725af47 in XPending () from /usr/lib/x86_64-linux-gnu/libX11.so.6

5 0x000000000043428c in main_loop () at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:2227

6 0x000000000042726a in main (argc=1, argv=0x7fffffffda98) at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:3153

(gdb)

progserega commented 6 years ago

ii conky-std 1.10.1-3 amd64 highly configurable system monitor (default version)

progserega commented 6 years ago

.conkyrc on link: https://pastebin.com/ZhybsTjN

lasers commented 6 years ago

Can you still reproduce this? And do you have a new syntax conky.conf?

progserega commented 6 years ago

I convert to new syntax: https://pastebin.com/pLpyCms0 Now conky work more stable. But time to time it is sigfault. I will try send backtrace when it is down.

lasers commented 6 years ago

Run (gdb) bt full instead of (gdb) bt. Thanks. Are you still on 1.10.1-3 ?

progserega commented 6 years ago

Yes:

ii  conky                                       1.10.1-3                                                 all          highly configurable system monitor (transitional package)
ii  conky-std                                   1.10.1-3                                                 amd64        highly configurable system monitor (default version)
ii  conky-std-dbg                               1.10.1-3                                                 amd64        highly configurable system monitor (default version - debug)
 gdb /usr/bin/conky
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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-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 /usr/bin/conky...Reading symbols from /usr/lib/debug/.build-id/f9/f6daa40c07df53dffc4f157b084c5c8844e9f8.debug...done.
done.
(gdb) r
Starting program: /usr/bin/conky 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
conky: desktop window (4b1) is root window
conky: window type - override
conky: drawing to created window (0x3200001)
conky: drawing to double buffer
[New Thread 0x7ffff40c1700 (LWP 6726)]
[New Thread 0x7ffff38c0700 (LWP 6727)]
[New Thread 0x7ffff30bf700 (LWP 6728)]
[New Thread 0x7ffff28be700 (LWP 6729)]
[New Thread 0x7ffff20bd700 (LWP 6730)]
[New Thread 0x7ffff18bc700 (LWP 6731)]
[New Thread 0x7ffff10bb700 (LWP 6732)]
[New Thread 0x7ffff08ba700 (LWP 6733)]
[New Thread 0x7fffd3fff700 (LWP 6734)]
[New Thread 0x7fffd37fe700 (LWP 6735)]
[New Thread 0x7fffd2ffd700 (LWP 6738)]
[New Thread 0x7fffd27fc700 (LWP 6744)]
[New Thread 0x7fffd1ffb700 (LWP 6746)]
[New Thread 0x7fffd17fa700 (LWP 6751)]
[New Thread 0x7fffd0de7700 (LWP 6753)]
[New Thread 0x7fffbffff700 (LWP 6758)]
[New Thread 0x7fffbf7fe700 (LWP 6776)]
[New Thread 0x7fffbeffd700 (LWP 6781)]
[New Thread 0x7fffbe7fc700 (LWP 6783)]
[New Thread 0x7fffbdffb700 (LWP 6789)]
[New Thread 0x7fffbd7fa700 (LWP 6798)]
[New Thread 0x7fffbcff9700 (LWP 6804)]
conky: malloc.c:3722: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.

Thread 1 "conky" received signal SIGABRT, Aborted.
0x00007ffff5b91428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: Нет такого файла или каталога.
(gdb) bt full
#0  0x00007ffff5b91428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
        resultvar = 0
        pid = 6722
        selftid = 6722
#1  0x00007ffff5b9302a in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x100000000, sa_sigaction = 0x100000000}, sa_mask = {__val = {0, 4294954912, 4294967295, 6946816, 7222800, 7223792, 0, 1, 0, 7223424, 140737328817972, 140737488343040, 140737319668512, 140737319668600, 140737319668600, 5808}}, sa_flags = -172125488, 
          sa_restorer = 0x7ffff5f21540 <_IO_2_1_stderr_>}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff5bd92e8 in __malloc_assert (assertion=assertion@entry=0x7ffff5ced3d8 "(unsigned long) (size) >= (unsigned long) (nb)", file=file@entry=0x7ffff5ce9bc5 "malloc.c", line=line@entry=3722, function=function@entry=0x7ffff5ced9e8 <__func__.11733> "_int_malloc") at malloc.c:301
No locals.
#3  0x00007ffff5bde9b3 in _int_malloc (av=av@entry=0x7ffff5f20b20 <main_arena>, bytes=bytes@entry=5793) at malloc.c:3722
        p = <optimized out>
        iters = <optimized out>
        nb = 5808
        idx = 103
        bin = <optimized out>
        victim = 0x77f960
        size = <optimized out>
        victim_index = <optimized out>
        remainder = <optimized out>
        remainder_size = <optimized out>
        block = <optimized out>
        bit = <optimized out>
        map = <optimized out>
        fwd = <optimized out>
        bck = <optimized out>
        errstr = 0x0
        __func__ = "_int_malloc"
#4  0x00007ffff5bdf2b0 in _int_realloc (av=av@entry=0x7ffff5f20b20 <main_arena>, oldp=oldp@entry=0x77e2b0, oldsize=oldsize@entry=3888, nb=nb@entry=5808) at malloc.c:4304
        newp = <optimized out>
        newsize = <optimized out>
        newmem = <optimized out>
        next = 0x77f1e0
        remainder = <optimized out>
        remainder_size = <optimized out>
        bck = <optimized out>
        fwd = <optimized out>
        copysize = <optimized out>
        ncopies = <optimized out>
        s = <optimized out>
        d = <optimized out>
        errstr = 0x0
        __func__ = "_int_realloc"
        nextsize = <optimized out>
#5  0x00007ffff5be0839 in __GI___libc_realloc (oldmem=0x77e2c0, bytes=5800) at malloc.c:3045
        ar_ptr = <optimized out>
        nb = 5808
        newp = <optimized out>
        hook = <optimized out>
        oldp = 0x77e2b0
        oldsize = 3888
#6  0x000000000044ea72 in new_graph (obj=obj@entry=0x71e070, buf=buf@entry=0x721111 "\001", buf_max_size=buf_max_size@entry=15231, val=2192) at /build/conky-bbQ61s/conky-1.10.1/src/specials.cc:506
        graph = <optimized out>
        s = 0x7762d0
#7  0x000000000042fd4d in generate_text_internal (p=0x721111 "\001", 
    p@entry=0x720c90 "\001\062\060:17:25 07 Август 2018       load:\001 0.39 0.50 0.48 \n\001ОЗУ Использование:\001 2.21GiB/5.82GiB - 37% \001\n\001Использование файла подкачки:\001 0B  /6.00GiB - 0% \001\n\001"..., p_max_size=15231, root=...)
    at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:871
        obj = 0x71e070
        a = <optimized out>
#8  0x00000000004324ea in generate_text () at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:927
        i = <optimized out>
        k = <optimized out>
        mw = <optimized out>
        tbs = <optimized out>
        ui = <optimized out>
        p = 0x720c90 "\001\062\060:17:25 07 Август 2018       load:\001 0.39 0.50 0.48 \n\001ОЗУ Использование:\001 2.21GiB/5.82GiB - 37% \001\n\001Использование файла подкачки:\001 0B  /6.00GiB - 0% \001\n\001"...
        j = <optimized out>
#9  update_text () at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:2024
No locals.
#10 0x0000000000434cfc in main_loop () at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:2106
        fdsr = {fds_bits = {0 <repeats 16 times>}}
        tv = {tv_sec = 0, tv_usec = 0}
        s = <optimized out>
        terminate = 0
        t = <optimized out>
        inotify_config_wd = 1
        inotify_buff = "(\331\377\377\377\177\000\000\306j\336\367\377\177\000\000P\361B\000\000\000\000\000\000\000\000\024\000\000\000\000\220\263\274\367\377\177", '\000' <repeats 170 times>...
#11 0x000000000042726a in main (argc=1, argv=0x7fffffffd928) at /build/conky-bbQ61s/conky-1.10.1/src/conky.cc:3153
No locals.
(gdb) 
su8 commented 6 years ago

@lasers same malloc.c file that doesn't exists anymore in the current master branch.

conky: malloc.c:3722: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.

@progserega can you test the current master branch ?

git clone https://github.com/brndnmtthws/conky
cd conky
mkdir -p build
cd build
cmake ../
make -j4
# to execute the binary type:
src/conky
lasers commented 6 years ago

@su8 Duplicate https://github.com/brndnmtthws/conky/issues/77? He have teh mpd variables too.

@progserega Do what @su8 asked. Test it again on 1.10.8 or preferably 1.10.9_pre (git). The older versions are not trustworthy due to too many changes which can be hard to track. Thank you.

su8 commented 6 years ago

@lasers #77 is different, as lua failed there.

progserega commented 6 years ago

Hmm... ubuntu 16.04...

CMake Error at CMakeLists.txt:22 (cmake_minimum_required): CMake 3.6 or higher is required. You are running version 3.5.1

-- Configuring incomplete, errors occurred!

lasers commented 6 years ago

Upgrade to Ubuntu 18.04 LTS, then upgrade to Conky 1.10.9_pre. :smile: Otherwise, don't worry about it. We'll leave this open for a while then. :+1:

progserega commented 6 years ago

:laughing: Okey. I will update in future... And then return to this thread.

lasers commented 6 years ago

@su8 Close this because the code no longer exist? :eagle:

su8 commented 6 years ago

Yes :rabbit:

lasers commented 6 years ago

More than 2 years, 9 months passed between 1.10.1 and current 1.11_pre (git). Code no longer exist. Closing this. Thank you for the report. :rabbit2: