compton icon indicating copy to clipboard operation
compton copied to clipboard

Compton freezing desktop (seemingly not "-b" related)

Open ljrk0 opened this issue 9 years ago • 37 comments

Hello, I first posted this on the i3wm issue tracker https://github.com/i3/i3/issues/1720 but it seems to be a compton issue.

i3 version: i3 version 4.10.2-171-ga4fab76 (2015-05-25, branch "makepkg") chromium version: tested dev, continuous and stable OS: Arch Compton: latest git i3 Debug log: http://logs.i3wm.org/logs/5700239927279616.bz2 GPU: nVidia G105M with proprietary drivers

How to reproduce:

On i3wm open a terminal on one workspace (say 1), Chromium (it only seems to happen with Chromium) in another (say 2). Switch forth and back rapidly:

for i in $(seq 1 15000); do i3-msg "workspace back_and_forth" ; done
Description:

There's no graphical reaction (except changing mousepointer) but one can still blindly interact.

I ran compton without "-b" for tests but the same thing happened.

The backtrace I could get is this one:

GNU gdb (GDB) 7.9.1
Copyright (C) 2015 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-unknown-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".
Attaching to process 15976
Reading symbols from /usr/bin/compton...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXcomposite.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXdamage.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXrender.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXrandr.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXinerama.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libconfig.so.9...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdbus-1.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnvidia-tls.so.340.76...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnvidia-glcore.so.340.76...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdl.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/libxcb.so.1...(no debugging symbols found)...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done.
0x00007fb1e7b4be70 in __poll_nocancel () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007fb1e7b4be70 in __poll_nocancel () from /usr/lib/libc.so.6
#1  0x00007fb1e461d9f2 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007fb1e461f2ff in ?? () from /usr/lib/libxcb.so.1
#3  0x00007fb1e461f411 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#4  0x00007fb1e88c6727 in _XReply () from /usr/lib/libX11.so.6
#5  0x00007fb1e867bc17 in XSyncQueryFence () from /usr/lib/libXext.so.6
#6  0x00000000004142ad in ?? ()
#7  0x00000000004080f5 in ?? ()
#8  0x00007fb1e7a8d790 in __libc_start_main () from /usr/lib/libc.so.6
#9  0x0000000000408a39 in ?? ()
(gdb) quit
A debugging session is active.

    Inferior 1 [process 15976] will be detached.

Quit anyway? (y or n) y
Detaching from program: /usr/bin/compton, process 15976

What's a bit strange is that when I kill compton it sometimes seems to crash the whole X instance. Xorg.log:

[ 42681.045] (EE) 
[ 42681.045] (EE) Backtrace:
[ 42681.079] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x119) [0x594a29]
[ 42681.080] (EE) 1: /usr/lib/libc.so.6 (__restore_rt+0x0) [0x7fb1c5c575af]
[ 42681.080] (EE) 2: /usr/lib/xorg-server/Xorg (AttendClient+0x8) [0x592948]
[ 42681.080] (EE) 3: /usr/lib/xorg-server/Xorg (SendShapeNotify+0x1ff8) [0x4d3a98]
[ 42681.081] (EE) 4: /usr/lib/xorg-server/Xorg (miSyncDestroyFence+0x59) [0x565e09]
[ 42681.081] (EE) 5: /usr/lib/xorg-server/Xorg (SendShapeNotify+0x2549) [0x4d4619]
[ 42681.081] (EE) 6: /usr/lib/xorg-server/Xorg (RegisterResourceName+0x232) [0x45bc12]
[ 42681.082] (EE) 7: /usr/lib/xorg-server/Xorg (FreeClientResources+0x6c) [0x45cafc]
[ 42681.082] (EE) 8: /usr/lib/xorg-server/Xorg (CloseDownClient+0x70) [0x437ee0]
[ 42681.083] (EE) 9: /usr/lib/xorg-server/Xorg (EstablishNewConnections+0xcd) [0x591e1d]
[ 42681.083] (EE) 10: /usr/lib/xorg-server/Xorg (ProcessWorkQueue+0x21) [0x43d9b1]
[ 42681.083] (EE) 11: /usr/lib/xorg-server/Xorg (WaitForSomething+0x88) [0x58d848]
[ 42681.084] (EE) 12: /usr/lib/xorg-server/Xorg (SendErrorToClient+0x111) [0x4388b1]
[ 42681.084] (EE) 13: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x41b) [0x43cbcb]
[ 42681.085] (EE) 14: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7fb1c5c44790]
[ 42681.086] (EE) 15: /usr/lib/xorg-server/Xorg (_start+0x29) [0x427039]
[ 42681.087] (EE) 16: ? (?+0x29) [0x29]
[ 42681.087] (EE) 
[ 42681.087] (EE) Segmentation fault at address 0x0
[ 42681.087] (EE) 
Fatal server error:
[ 42681.087] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 42681.087] (EE) 
[ 42681.087] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[ 42681.087] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 42681.087] (EE) 
[ 42682.822] (EE) Server terminated with error (1). Closing log file.

Is there anything else I can provide?

ljrk0 avatar May 26 '15 12:05 ljrk0

Your backtrace would be much more useful if you had debugging symbols for Compton. (Notice how the only frames that have names are from the various X libraries.) Is there any chance of your getting them and translating those frame addresses for us?

kelleyk avatar May 26 '15 13:05 kelleyk

Yep, I currently keep trying to reproduce but it the error is rather rare. I once could do it but made the mistake of running gdb via the same X that would froze if reproducing was successfull. It seems that the missing "-b" does not fully prevent the problem but at least makes it more rare.

ljrk0 avatar May 26 '15 15:05 ljrk0

If you can get the debugging symbols that correspond to the exact binary that you used to produce that stacktrace, we can fill in the missing addresses without you managing to catch the bug again!

This is done using the info symbol command in gdb; or, all wrapped up, from your shell:

gdb /path/to/compton -ex "i sy 0x414727" -ex "quit" | tail -n 1

(If you have binutils installed, there is also the addr2line utility, which is probably the best solution.)

Debugging problems with your X environment is always a special sort of frustrating, so thank you for taking the time to report this bug. You might try SSHing in and then using sudo gcore $(pidof compton) (or something similar) to dump a core when you provoke the bug.

Also, you very nicely gave versions for most parts of your environment, but what version/commit of compton are you using?

kelleyk avatar May 26 '15 15:05 kelleyk

Finally got it anyway ;-) I this time did not run compton through gdb but just attached gdb to it after it crashed (but still the process not being dead). This is the backtrace:

GNU gdb (GDB) 7.9.1
Copyright (C) 2015 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-unknown-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".
Attaching to process 1401
Reading symbols from /home/leonard/Git/compton/compton...done.
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXcomposite.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXdamage.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXrender.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXrandr.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXinerama.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libconfig.so.9...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdbus-1.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnvidia-tls.so.340.76...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnvidia-glcore.so.340.76...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdl.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/libxcb.so.1...(no debugging symbols found)...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done.
0x00007f56d888ee70 in __poll_nocancel () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007f56d888ee70 in __poll_nocancel () from /usr/lib/libc.so.6
#1  0x00007f56d53609f2 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007f56d53622ff in ?? () from /usr/lib/libxcb.so.1
#3  0x00007f56d5362411 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#4  0x00007f56d9609727 in _XReply () from /usr/lib/libX11.so.6
#5  0x00007f56d93bec17 in XSyncQueryFence () from /usr/lib/libXext.so.6
#6  0x00000000004083b5 in xr_sync_ (ps=0x2512820, d=12582984, pfence=0x25128a8)
    at src/common.h:2394
#7  0x000000000040f225 in paint_all (ps=0x2512820, region=12661453, 
    region_real=12661453, t=0x27427d0) at src/compton.c:2009
#8  0x000000000041a30c in session_run (ps=0x2512820) at src/compton.c:7711
#9  0x000000000041a576 in main (argc=1, argv=0x7fff74d90638)
    at src/compton.c:7767
(gdb) quit
A debugging session is active.

    Inferior 1 [process 1401] will be detached.

Quit anyway? (y or n) y
Detaching from program: /home/leonard/Git/compton/compton, process 1401

Using the latest git version (with another commit on my fork but only for the manpage).

ljrk0 avatar May 26 '15 15:05 ljrk0

Awesome! Two more little favors:

  • Can you install debugging symbols for libxcb? (Might be easiest to just do it for all of the libx* components.)
  • Is there any chance of getting a core from your X server at the same moment?

libxcb implements the low-level protocol that an application (e.g. compton) uses, though libX11, to speak with the X server. It seems like compton is waiting for a sync fence and never gets the reply that it expects, so it'd be helpful to know how the X server feels about that.

kelleyk avatar May 26 '15 15:05 kelleyk

Also, would you mind posting your configuration file and/or command-line options?

kelleyk avatar May 26 '15 15:05 kelleyk

Hm, I can try to do so. I'm not that advanced but I will try to figure it out. For the time being, my config:

# terminal opacity
opacity-rule = [
"50: class_g = 'qterminal'  && !focused && window_type = 'normal'"
#, "70: class_g = 'URxvt'       && !focused"
, "70: class_g = 'qterminal'    && focused  && window_type = 'normal'"
#, "90: class_g = 'URxvt'       && focused"
#, "50: class_g = 'i3bar'"
]

# Shadow
# shadow = false;
# no-dnd-shadow = true;
# no-dock-shadow = true;
# clear-shadow = true;
# shadow-radius = 14;
# shadow-offset-x = -7;
# shadow-offset-y = -7;
# shadow-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
# shadow-exclude = [
#   "name       =  'Notification'",
#   "class_g    =  'Conky'",
#   "class_g    ?= 'Notify-osd'",
#   "class_g    =  'Cairo-clock'",
#   "_GTK_FRAME_EXTENTS@:c",
#   "class_g    =  'Lazarus'",
#   "name       ^=  '[i3 con]'"
# ];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;

# Opacity
menu-opacity = 1;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
alpha-step = 0.06;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
# blur-background = true;
# blur-background-frame = true;
blur-kern = "3x3box"
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
# blur-background-fixed = true;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'",
    "_GTK_FRAME_EXTENTS@:c"
];

# Fading

# do not use fading; we want fast workspace switches
fading = false;
# fade-delta = 30;
fade-in-step = 0.03;
fade-out-step = 0.03;
# no-fading-openclose = true;
# no-fading-destroyed-argb = true;
fade-exclude = [ ];

# Other

# use glx as backend instead of xrender (get rid of weird xft-font-lag)
backend = "xr_glx_hybird"
mark-wmwin-focused = false;
mark-ovredir-focused = true;

# use i3's active/inactive
use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
vsync = "none";
dbe = false;
paint-on-overlay = true;
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ "class_g = 'Cairo-clock'" ];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];
# resize-damage = 1;

# GLX backend
glx-no-stencil = false;
glx-copy-from-front = true;
# glx-use-copysubbuffermesa = true;
glx-no-rebind-pixmap = true;
# glx-swap-method = "undefined";
glx-swap-method = "exchange";
glx-use-gpushader4 = true;
xrender-sync = true;
xrender-sync-fence = true;

# Window type settings
wintypes:
{
# use no opacity on tooltips
  tooltip = { fade = true; shadow = true; opacity = 1; focus = true; };
  dialog = { fade = false; shadow = true; opacity = 1; focus = true; };
};

Additionaly arguments are not used. I will try to get the debugging symbols installed (if you coincidentally use Arch and know how to do that in a short way, perhaps you can save me some time?).

Thanks for looking into this.

EDIT: Seems that there are no debug packages but one needs to recompile them with makepkg options. Will report back after this is done and I could successfully crash it again :P

EDIT2: For all those maybe running into this later on, too: Ok, got the list. The best way to get all those installed is configuring makepkg to use debug flags and then doing

yaourt -Sb $(pacman -Qsq "libx.*" X11 | grep -v lib32)

which will fetch and build all packages that are not lib32 but match libx* and are from X11 that are installed.

ljrk0 avatar May 26 '15 16:05 ljrk0

Here you go:

GNU gdb (GDB) 7.9.1
Copyright (C) 2015 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-unknown-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".
Attaching to process 19856
Reading symbols from /home/leonard/Git/compton/compton...done.
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXcomposite.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXdamage.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXfixes.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXrender.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libX11.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXext.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXrandr.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXinerama.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libconfig.so.9...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdbus-1.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnvidia-tls.so.340.76...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnvidia-glcore.so.340.76...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdl.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/libxcb.so.1...done.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXau.so.6...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libXdmcp.so.6...(no debugging symbols found)...done.
0x00007f59c3129e70 in __poll_nocancel () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007f59c3129e70 in __poll_nocancel () from /usr/lib/libc.so.6
#1  0x00007f59bfbf22a5 in _xcb_conn_wait (c=0x1921200, cond=0x7ffd373cf720, 
    vector=0x0, count=0x0) at xcb_conn.c:459
#2  0x00007f59bfbf40a6 in wait_for_reply (c=0x1921200, request=974762, 
    e=0x7ffd373cf7d0) at xcb_in.c:491
#3  0x00007f59bfbf41d7 in xcb_wait_for_reply (c=0x1921200, request=974762, 
    e=0x7ffd373cf7d0) at xcb_in.c:521
#4  0x00007f59c3ea4727 in _XReply () from /usr/lib/libX11.so.6
#5  0x00007f59c3c59c17 in XSyncQueryFence () from /usr/lib/libXext.so.6
#6  0x00000000004083b5 in xr_sync_ (ps=0x191f820, d=33554506, pfence=0x191f8a8)
    at src/common.h:2394
#7  0x000000000040f225 in paint_all (ps=0x191f820, region=33648950, 
    region_real=33648950, t=0x1b4f830) at src/compton.c:2009
#8  0x000000000041a30c in session_run (ps=0x191f820) at src/compton.c:7711
#9  0x000000000041a576 in main (argc=1, argv=0x7ffd373cfbc8)
    at src/compton.c:7767
(gdb) quit
A debugging session is active.

    Inferior 1 [process 19856] will be detached.

Quit anyway? (y or n) y
Detaching from program: /home/leonard/Git/compton/compton, process 19856

EDIT: Seems that I forgot some, will rebuild those too but they do not occure in the BT, so I hope that's of no issue for now.

ljrk0 avatar May 26 '15 17:05 ljrk0

Now rebuilt all needed packages but the BT itself ofcourse is not different.

On a side note: Does compton crash for you too when you pkill it via tty2 when it's running on tty1?

ljrk0 avatar May 26 '15 17:05 ljrk0

This isn't the primary issue we're investigating, but I believe that you may have meant to set the backend to "xr_glx_hybrid" instead of "xr_glx_hybird".

kelleyk avatar May 27 '15 05:05 kelleyk

I remember there was a typo so it was hybird instead of hybrid, yes. It is fixed now but compatibility is still kept:

 // Keep compatibility with an old revision containing a spelling mistake...
  if (!strcasecmp(str, "xr_glx_hybird")) {
    ps->o.backend = BKEND_XR_GLX_HYBRID;
    return true;
  }

https://github.com/chjj/compton/blob/master/src/common.h

ljrk0 avatar May 27 '15 07:05 ljrk0

Aha; thanks for the snippet.

Compton exits normally in response to SIGTERM for me; I tried with my configuration and with a null configuration and the backend set to xr_glx_hybrid.

kelleyk avatar May 27 '15 21:05 kelleyk

Like I mentioned, I think the logical next step is to take a look around inside both compton, the X libraries, and the X server.

Most of my systems are Debian-based, so it might be fastest for you to send me the relevant binaries, debugging symbols, and core files; if you have strong objections, you're also welcome to help me reproduce the issue on one of my systems.

kelleyk avatar May 27 '15 21:05 kelleyk

I've rebuilt all libX stuff related to X11 and compton using -O0 and some debugging parameters. The thing is that I automated this via the abs (a (BDS)Ports-like system) where you can rebuild the packages from source – but all packaged up and "properly installed" – not binaries flying around. So it would be most convenient for me to just hand you over those pkg.tar.xz-files but they can just easily be extracted so this should be of no issue, I hope. The debugging symbols are not stripped from the binaries. Which core dumps do you need?

And ofcourse I have no objections assisting anyone on trying out Arch to reproduce something (even without the reproducing part) ;-)

The list of libX libraries I've rebuilt:

  • libx11
  • libxau
  • libxaw
  • libxcb
  • libxcomposite
  • libxdamage
  • libxdmcp
  • libxext
  • libxfixes
  • libxfont
  • libxi
  • libxinerama
  • libxkbcommon-x11
  • libxkbfile
  • libxmu
  • libxp
  • libxpm
  • libxrandr
  • libxres
  • libxss
  • libxt
  • libxtst
  • libxv
  • libxvmc
  • libxxf86dga
  • libxxf86vm

Probably not all relevant. compton is just built using the standard debugging parameters but I can supply you with the binary too, if you want.

ljrk0 avatar May 27 '15 21:05 ljrk0

rebuilt packages: https://drive.google.com/file/d/0B2gXBp6AAG7fdEF6UXV4NjhZTzg/view?usp=sharing

ljrk0 avatar May 27 '15 21:05 ljrk0

compton + core: https://drive.google.com/file/d/0B2gXBp6AAG7fQVJqSGpORVVPaEE/view?usp=sharing If you don't want to use GDrive, just ping me.

ljrk0 avatar May 27 '15 21:05 ljrk0

Thanks! There isn't any chance, is there, that you also have the core from the X server (e.g. /usr/bin/Xorg) at the same moment? It might be useful (or necessary) to see what the X server thinks the situation is when compton hangs.

kelleyk avatar May 28 '15 16:05 kelleyk

Hm, I don't have yet but I can try to capture it next time when it hangs.

ljrk0 avatar May 28 '15 17:05 ljrk0

Okay, thanks! If I have some time this evening I'll take a look at what you uploaded and see if anything jumps out at me.

kelleyk avatar May 28 '15 17:05 kelleyk

Here are the coredumps plus gdb backtrace and a log that I created when I captured the dump because there are many "Memory read failed for ..." lines. X had the pid 412, compton 2520 https://drive.google.com/file/d/0B2gXBp6AAG7fSTdXb0FFVGNHLTg/view?usp=sharing I hope you can find something in there but I'm oblivious. Thanks for any effort.

ljrk0 avatar May 28 '15 17:05 ljrk0

Hey -- I'm sorry that I've left this so long.

Thanks for being so helpful; I hate to ask for more, but I'm going to need the binaries and debugging symbols that match your coredumps; otherwise the coredumps are hard to inspect!

kelleyk avatar Jun 11 '15 01:06 kelleyk

I thank you for looking into this!

Actually I would wonder if the binaries would not match the coredumps. These are the exact packages I installed. Or did I miss a binary?

ljrk0 avatar Jun 11 '15 08:06 ljrk0

Oops; I spaced on the second download link. Thanks for the gentle reminder.

kelleyk avatar Jun 11 '15 20:06 kelleyk

No problem, thanks for any help :D

ljrk0 avatar Jun 11 '15 20:06 ljrk0

Is there any progress on this issue? I'm getting a similar bug, where sometimes the screen will just freeze, but I can still see the cursor reacting, and can issue commands. Adding --no-fading-openclose to my config fixes this, but then I don't get the nice effects.

ShirajG avatar Jul 02 '16 16:07 ShirajG

@ShirajG Same here. I get random crashes of compton with i3. :( What's the current status of this bug?

pmatos avatar Oct 12 '16 11:10 pmatos

Same here.

grepsuzette avatar Oct 15 '16 11:10 grepsuzette

Would all of you mind sharing your compton configuration files?

kelleyk avatar Oct 15 '16 19:10 kelleyk

And: I've taken another look at the coredumps that @LeonardKoening shared, but I can't seem to load them. Are we sure that they match the compton binary and libraries in those archives?

$ gdb ./compton ./core.29366
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
[...]
Reading symbols from ./compton...done.
[New LWP 29366]

warning: Unexpected size of section `.reg-xstate/29366' in core file.

warning: .dynamic section for "compton-288/LeonardKoenig/usr/lib/libX11.so.6.3.0" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "compton-288/LeonardKoenig/usr/lib/libXext.so.6.4.0" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "/lib64/ld-linux-x86-64.so.2" is not at the expected address (wrong library or version mismatch?)

warning: .dynamic section for "compton-288/LeonardKoenig/usr/lib/libXdmcp.so.6.0.0" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for 13 libraries, e.g. /usr/lib/libGL.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `./compton'.

warning: Unexpected size of section `.reg-xstate/29366' in core file.
#0  0x00007fa3ffccae70 in ?? ()
gdb$ info share
From                To                  Syms Read   Shared Object Library
                                        No          linux-vdso.so.1
                                        No          /usr/lib/libGL.so.1
                                        No          /usr/lib/libm.so.6
                                        No          /usr/lib/libpcre.so.1
0x00007fa401392d00  0x00007fa401393715  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXcomposite.so.1.0.0
0x00007fa40118ec90  0x00007fa40118f5bb  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXdamage.so.1.1.0
0x00007fa400f885d0  0x00007fa400f8a828  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXfixes.so.3.1.0
                                        No          /usr/lib/libXrender.so.1
0x00007fa400a57de8  0x00007fa400adf7c4  Yes (*)     compton-288/LeonardKoenig/usr/lib/libX11.so.6.3.0
0x00007fa4007fb978  0x00007fa400805757  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXext.so.6.4.0
0x00007fa4005eae30  0x00007fa4005f0c52  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXrandr.so.2.2.0
0x00007fa4003e3ba0  0x00007fa4003e4494  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXinerama.so.1.0.0
                                        No          /usr/lib/libconfig.so.9
                                        No          /usr/lib/libdbus-1.so.3
                                        No          /usr/lib/libc.so.6
                                        No          /usr/lib/libnvidia-tls.so.340.76
                                        No          /usr/lib/libnvidia-glcore.so.340.76
                                        No          /usr/lib/libdl.so.2
                                        No          /usr/lib/libpthread.so.0
0x00007fa3fc79c440  0x00007fa3fc7aac45  Yes (*)     compton-288/LeonardKoenig/usr/lib/libxcb.so.1.1.0
0x00007fa401e51a60  0x00007fa401e6f5e0  Yes         /lib64/ld-linux-x86-64.so.2
                                        No          /usr/lib/libXau.so.6
0x00007fa3fc37f510  0x00007fa3fc380ea8  Yes (*)     compton-288/LeonardKoenig/usr/lib/libXdmcp.so.6.0.0
                                        No          /usr/lib/libbsd.so.0
(*): Shared library is missing debugging information.

The other compton core (core.2520) seems just not to match at all.

kelleyk avatar Oct 15 '16 19:10 kelleyk

Apologies for the delay. My config file:

$ cat .config/compton.conf
# GLX backend
backend = "glx";
glx-no-stencil = true;

# Shadows
shadow = false;
no-dnd-shadow = true;
no-dock-shadow = true;

# Fading
fading = false;
no-fading-openclose = true;
no-fading-destroyed-argb = true;

# When the layout is stacked/tabbed, this enable true transparency
opacity-rule = [
   "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

Crashing was getting pretty bad so I had to disable compton and now I am not loading it anymore.

pmatos avatar Apr 20 '17 10:04 pmatos

I'm still having the same issues here. Has anyone come up with a workaround?

ghost avatar Jun 03 '17 18:06 ghost

Huh, is that a coincidence that I came here having the same issue 4 hours after you? Well, I can confirm. It happens after I bring up the system after a suspend. It seems to be related to pinentry-gtk which also freezes some functions and hangs the desktop in a similar way when it's window is being displayed somewhere in the background (I use a wm) or a different workspace. Last time (which was like yesterday) I think I fixed the same issue by killing pinentry on a different tty, not sure tho. I don't use compton all the time, I'll run it with debugging when I have some time spare to investigate this issue further.

MarcinWieczorek avatar Jun 03 '17 22:06 MarcinWieczorek

It seems to be a problem with Firefox for me, at least. I haven't had any issues when it's not open (yet)

Hardware acceleration is on, I'm going to try running Firefox without it and see if it helps.

ghost avatar Jun 04 '17 00:06 ghost

Yesteday I started compton again and it hung immediately.

MarcinWieczorek avatar Jun 04 '17 15:06 MarcinWieczorek

Everything worked fine until i messed with Xorg

I've got 2 monitors and i was using one xorg-screen and this command to start compton before: compton --config ~/.config/compton/.compton.conf -b

Then did some changes to my xorg config to set 2 xorg-screens for each monitors, because i was using two graphics cards: seq 0 1 | xargs -l1 -I@ compton --config ~/.config/compton/.compton.conf -b -d :0.@

Now i'm only using 1 xorg-screen for my monitors, but i wasn't able to put back the first command without getting the freeze issues.

But i fixed the issue by cutting the background flag: seq 0 1 | xargs -l1 -I@ compton --config ~/.config/compton/.compton.conf -d :0.@

i hope it'll help

ghost avatar Jul 25 '17 20:07 ghost

Hey my compton config is

 basic configuration
backend = "glx";
vsync = "opengl-swc";

glx-copy-from-front = true;
glx-swap-method = 2;
xrender-sync = true;
xrender-sync-fence = true;

# transparancy settings for i3
opacity-rule = [
    "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

but i am still facing the issue that when i change workspaces compton draws them over and hangs

Shubhaankar-Sharma avatar Oct 06 '21 10:10 Shubhaankar-Sharma

Hey my compton config is

 basic configuration
backend = "glx";
vsync = "opengl-swc";

glx-copy-from-front = true;
glx-swap-method = 2;
xrender-sync = true;
xrender-sync-fence = true;

# transparancy settings for i3
opacity-rule = [
    "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

but i am still facing the issue that when i change workspaces compton draws them over and hangs

I don't think this is being updated anymore. Take a look at https://github.com/yshui/picom

pmatos avatar Oct 13 '21 14:10 pmatos