yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.17k stars 589 forks source link

Picom (with experimental backend) crashes when reloading i3 #390

Open TheConfuZzledDude opened 4 years ago

TheConfuZzledDude commented 4 years ago

Platform

Arch Linux 5.6.6-13-tkg-pds

GPU, drivers, and screen setup

AMD RX 5700XT and AMD R9 290 (the 5700XT is the one doing all the rendering), dual monitors. mesa-aco-git 20.1.0_devel.20200424.961f041f957-1, and xf86-video-amdgpu 19.1.0-1

Environment

i3-gaps-next-git 4.18.r19.g15fef832-1

picom version

Version: vgit-0b377

Extensions:

Misc:

Drivers (inaccurate):

AMDGPU, Radeon

Configuration:


backend = "glx";

glx-no-stencil = true;

glx-copy-from-front = false;

shadow = true;

shadow-radius = 7;

shadow-offset-x = -5;

shadow-offset-y = -5;

shadow-opacity = 0.7;

shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'picom'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "class_g = 'Firefox' && argb",
    "class_g = 'Conky'",
    "class_g = 'Kupfer'",
    "class_g = 'Synapse'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'Cairo-dock'",
    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'",
    "class_g ?= 'Peek'",
    "_GTK_FRAME_EXTENTS@:c",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

shadow-ignore-shaped = false;

inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;

blur-background = true;

blur-background-frame = true;

blur-background-fixed = true;

blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'",
    "class_g = 'Peek'"
];
blur:
{
      method = "gaussian";
        size = 10;
          deviation = 10.0;
};

opacity-rule = [ "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", "100:_NET_WM_STATE@:32a !*= '_NET_WM_STATE_HIDDEN'" ];

fading = true;

fade-delta = 4;

fade-in-step = 0.03;

fade-out-step = 0.03;

fade-exclude = [ ];

mark-wmwin-focused = true;

mark-ovredir-focused = true;

use-ewmh-active-win = true;

detect-rounded-corners = true;

detect-client-opacity = true;

refresh-rate = 0;

vsync = true;

dbe = false;

unredir-if-possible = false;

focus-exclude = [ ];

detect-transient = true;

detect-client-leader = true;

wintypes:
{
    tooltip =
    {

        fade = true;

        shadow = false;

        opacity = 0.85;

        focus = true;
    };
    dock = {
        shadow = false;
    };
    dnd = {
        shadow = false;
    };
};

xrender-sync-fence = true;

Steps of reproduction

  1. Run picom --experimental-backends
  2. Press Mod4+Shift+R to reload i3
  3. Repeat

Expected behavior

Picom reloads without any issues

Current Behavior

Picom segfaults

Stack trace

Error on crash is picom: ../src/backend/backend.c:270: paint_all_new: Assertion `!(w->flags & WIN_FLAGS_SHADOW_NONE)' failed. [1] 86842 abort (core dumped) picom --experimental-backends

          PID: 107676 (picom)
           UID: 1000 (zuzi)
           GID: 1000 (zuzi)
        Signal: 6 (ABRT)
     Timestamp: Mon 2020-04-27 14:27:54 BST (7min ago)
  Command Line: picom --experimental-backends
    Executable: /usr/bin/picom
 Control Group: /user.slice/user-1000.slice/session-2.scope
          Unit: session-2.scope
         Slice: user-1000.slice
       Session: 2
     Owner UID: 1000 (zuzi)
       Boot ID: 15e4c78464a04a8e865b094f7a977628
    Machine ID: 146ebba9b2454ab487faebf3cc32877a
      Hostname: ZacharyArchDesktop
       Storage: /var/lib/systemd/coredump/core.picom.1000.15e4c78464a04a8e865b094f7a977628.107676.1587994074000000000000.lz4
       Message: Process 107676 (picom) of user 1000 dumped core.

                Stack trace of thread 107676:
                #0  0x00007ff02626cce5 raise (libc.so.6 + 0x3bce5)
                #1  0x00007ff026256857 abort (libc.so.6 + 0x25857)
                #2  0x00007ff026256727 __assert_fail_base.cold (libc.so.6 + 0x25727)
                #3  0x00007ff026265426 __assert_fail (libc.so.6 + 0x34426)
                #4  0x000055b38a13b80b n/a (picom + 0x3580b)
                #5  0x000055b38a114c09 n/a (picom + 0xec09)
                #6  0x000055b38a115989 n/a (picom + 0xf989)
                #7  0x00007ff026bdf033 ev_invoke_pending (libev.so.4 + 0x5033)
                #8  0x00007ff026be2902 ev_run (libev.so.4 + 0x8902)
                #9  0x000055b38a11182b n/a (picom + 0xb82b)
                #10 0x00007ff026258023 __libc_start_main (libc.so.6 + 0x27023)
                #11 0x000055b38a112c0e n/a (picom + 0xcc0e)

                Stack trace of thread 107707:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107692:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107698:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107689:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107691:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107696:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107697:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107694:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107704:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107690:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107693:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107695:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107699:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107705:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107702:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107701:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107700:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107706:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

                Stack trace of thread 107703:
                #0  0x00007ff025fffcf5 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfcf5)
                #1  0x00007ff0243c2f2c n/a (radeonsi_dri.so + 0x4cdf2c)
                #2  0x00007ff0243c2b28 n/a (radeonsi_dri.so + 0x4cdb28)
                #3  0x00007ff025ff946f start_thread (libpthread.so.0 + 0x946f)
                #4  0x00007ff0263303d3 __clone (libc.so.6 + 0xff3d3)

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 /usr/bin/picom...
(No debugging symbols found in /usr/bin/picom)
[New LWP 107676]
[New LWP 107707]
[New LWP 107692]
[New LWP 107698]
[New LWP 107689]
[New LWP 107691]
[New LWP 107696]
[New LWP 107697]
[New LWP 107694]
[New LWP 107704]
[New LWP 107690]
[New LWP 107693]
[New LWP 107695]
[New LWP 107699]
[New LWP 107705]
[New LWP 107702]
[New LWP 107701]
[New LWP 107700]
[New LWP 107706]
[New LWP 107703]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `picom --experimental-backends'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007ff02626cce5 in raise () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7ff025cbaa40 (LWP 107676))]
(gdb) bt
#0  0x00007ff02626cce5 in raise () from /usr/lib/libc.so.6
#1  0x00007ff026256857 in abort () from /usr/lib/libc.so.6
#2  0x00007ff026256727 in __assert_fail_base.cold () from /usr/lib/libc.so.6
#3  0x00007ff026265426 in __assert_fail () from /usr/lib/libc.so.6
#4  0x000055b38a13b80b in ?? ()
#5  0x000055b38a114c09 in ?? ()
#6  0x000055b38a115989 in ?? ()
#7  0x00007ff026bdf033 in ev_invoke_pending () from /usr/lib/libev.so.4
#8  0x00007ff026be2902 in ev_run () from /usr/lib/libev.so.4
#9  0x000055b38a11182b in ?? ()
#10 0x00007ff026258023 in __libc_start_main () from /usr/lib/libc.so.6
#11 0x000055b38a112c0e in ?? ()
(gdb) 

Other details

yshui commented 4 years ago

Can you set --log-level=debug and upload the log file here?

TheConfuZzledDude commented 4 years ago

picom.log

Also, it doesn't seem to crash when --experimental-backends isn't specified, but it does still break the compositing, and produces a weird ghosting effect, which may be related?

picom-ghosting

yshui commented 4 years ago

Ah, sorry, I need a little bit more information. Can you do these:

  1. Compile picom with debug info (meson configure --buildtype=debug)
  2. Run with --log-level=debug, and trigger the crash again (sorry)
  3. Upload: picom executable, the log file, and the coredump (you can find where the coredump is by using coredumpctl)
TheConfuZzledDude commented 4 years ago

Hopefully this is good, I meant to upload the core dump initially but I got sidetracked haha picom-debugging.zip

viini42 commented 4 years ago

I was with this problem too, so I've installed picom-ibhagwan-git to use dual kawase blur and I notice that after reloading i3, the blur crashes (but picom keep running). To do a workaround for this, I made a script to execute always in reloading i3

#!/usr/bin/env bash

killall -e picom

while pgrep -u $UID -x picom > /dev/null; do sleep 1; done

picom --experimental-backends -b
tryone144 commented 4 years ago

I think I've found a fix/workaround for a possibly duplicate issue https://github.com/yshui/picom/issues/394.

Can you try if this PR https://github.com/yshui/picom/pull/479 also fixes the assertion failure for you?