geommer / yabar

A modern and lightweight status bar for X window managers.
MIT License
680 stars 49 forks source link

Random frequent crashes : malloc(): mismatching next->prev_size (unsorted) #210

Open ilan-deepreach opened 4 years ago

ilan-deepreach commented 4 years ago

Multiple times per hour my yabar crashes :

ilan@ilan-thinkpad ~> yabar
INH ya_ws
INH ya_title
INH ya_memory
INH ya_battery
E: ya_ws
INH ya_ws
E: ya_title
INH ya_title
E: ya_date
E: ya_diskusage
E: ya_memory
INH ya_memory
E: ya_volume
E: ya_uptime
E: ya_cpu
E: ya_thermal
E: ya_brightness
E: ya_battery
INH ya_battery
malloc(): mismatching next->prev_size (unsorted)
fish: “yabar” terminated by signal SIGABRT (Abort)
jmvalenciz commented 4 years ago

I had the same error. Yabar uses a lot of cpu and crashes with:

malloc(): mismatching next->prev_size (unsorted)
[1]    2622 abort (core dumped)  yabar

I tried disabling blocks and I noticed that the error disappear when I disable the volume block:

volume:{
        exec: "YABAR_VOLUME";
        align: "right";
        type: "persist";
        interval: 0.5;
        internal-option1 : "default Master 0";
        internal-option3 : " ";
        internal-suffix: "%";
        underline-color-rgb:0xF51818;
        command-button1: "pavucontrol || alsamixer";
        command-button4: "pactl set-sink-volume 1 +5%";
        command-button5: "pactl set-sink-volume 1 -5%";
    };

and i tried changing interval: 0.5 to interval: 1; and that works for me. You should try something similar to solve your problem.

mbrgm commented 4 years ago

It appears to me that the crash occurs every time the current minute changes. This is my block configuration:

  time: {
    exec: "YABAR_DATE";
    align: "right";
    justify: "center";
    foreground-color-rgb: 0x2AA198;
    internal-option1: " %H:%M";
    interval: 1;
    fixed-size: 65;
  }
JaimeLanders commented 4 years ago

Is there a fix for this yet? I just found this issue but have been having it for a while. Here is what I see when Yabar crashes:

malloc(): mismatching next->prev_size (unsorted)
Aborted (core dumped)

Here is my dotfile (hasn't changed in a long time), I made sure I don't have any decimals in my intervals as @jmvalenciz replied above:

https://github.com/jland13/Dotfiles/blob/master/yabar/yabar.conf

CircleShift commented 4 years ago

I don't know if this helps anyone, but I get the same error from time to time running on Void Linux.

I used GDB and got this backtrace.

malloc(): mismatching next->prev_size (unsorted)

Thread 2 "yabar" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff61e1700 (LWP 4238)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff749a55b in __GI_abort () at abort.c:79
#2  0x00007ffff74f2df8 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff75fef3e "%s\n") 
#3  0x00007ffff74fa16a in malloc_printerr (str=str@entry=0x7ffff7601060 "malloc(): mismatching next->prev_siz
#4  0x00007ffff74fd42c in _int_malloc (av=av@entry=0x7ffff0000020, bytes=bytes@entry=1048) at malloc.c:3741
#5  0x00007ffff74fe929 in __GI___libc_malloc (bytes=1048) at malloc.c:3066
#6  0x00007ffff78f1694 in ?? () from /usr/lib/libcairo.so.2
#7  0x00007ffff78f1c6f in cairo_xcb_surface_create () from /usr/lib/libcairo.so.2
#8  0x0000555555559b34 in ?? ()
#9  0x000055555555a2ed in ?? ()
#10 0x0000555555558c96 in ?? ()
#11 0x00007ffff7f7af27 in start_thread (arg=<optimized out>) at pthread_create.c:479
#12 0x00007ffff7571e0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
krysopath commented 4 years ago

I have the same issue.

Frequently crashes with:

[...]
malloc(): mismatching next->prev_size (unsorted)
Aborted (core dumped)

its libs:

$ ldd $(which yabar)
    linux-vdso.so.1 (0x00007ffcb37fd000)
    libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1fba100000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1fba0dd000)
    libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f1fba0cb000)
    libxcb-ewmh.so.2 => /lib/x86_64-linux-gnu/libxcb-ewmh.so.2 (0x00007f1fba0bc000)
    libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f1fba0ab000)
    libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f1fba05f000)
    libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f1fba000000)
    libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f1fb9ee0000)
    libconfig.so.9 => /lib/x86_64-linux-gnu/libconfig.so.9 (0x00007f1fb9cd4000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1fb9ae3000)
    libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1fb9add000)
    libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1fb9ad5000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1fba151000)
    libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f1fb9ab9000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1fb996a000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1fb9842000)
    libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f1fb97fc000)
    libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f1fb9741000)
    libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007f1fb9736000)
    libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007f1fb9717000)
    libffi.so.6 => /lib/x86_64-linux-gnu/libffi.so.6 (0x00007f1fb970d000)
    libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f1fb9666000)
    libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f1fb962e000)
    libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f1fb9629000)
    libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f1fb961a000)
    libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f1fb940e000)
    libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1fb92d0000)
    libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1fb92bb000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1fb929f000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1fb9294000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f1fb927a000)
    libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f1fb9181000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1fb910d000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f1fb90df000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f1fb90d6000)
    libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f1fb90cc000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1fb90c4000)
    libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f1fb9097000)
$ yabar -v
yabar v0.4.0-1ubuntu1
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan
$ uname -a
Linux stateless 5.3.0-46-generic #38-Ubuntu SMP Fri Mar 27 17:37:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

This makes it unusable to me. I would help debugging the cause.