GDK/GTK app crash in XFCE when performing drag operation (in gdk_window_cache_new <- gdk_window_cache_get <- drag_context_find_window_cache <- gdk_x11_drag_context_find_window)

Bug #1911036 reported by XXX
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Unknown
gtk+3.0 (Ubuntu)
Fix Released
Medium
Unassigned
gtk4 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

For many months now, whenever any mouse drag is attempted in an application using the gtk tool kit, the application immediately crashes. I've noticed this at least in Firefox and thunar. It also occurs when displaying these applications from a Virtualbox machine or from another server running something other than Ubuntu. The VM was running CentOS 8 and the remote server was running Mageia. Both Firefox and thunar run fine with Mageia's Xorg. It seems like the issue may be with the Xorg server on Ubuntu.

I tried setting the GDK_SYNCHRONIZE variable to various settings but was unable to produce further debug output. The only other debug output I was able to gather is when running thunar with the --gtk-debug parameter (attached). I also tried running thunar with GDB but without recompiling it, it doesn't produce much information other than it's stopping in glib.

Let me know what other information I can provide.

(firefox:110380): Gdk-ERROR **: 13:47:04.663: The program 'firefox' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 8405 error_code 3 request_code 141 (Composite) minor_code 8)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
ExceptionHandler::GenerateDump cloned child 110611
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
[1]+ Trace/breakpoint trap (core dumped) firefox

(Thunar:2961220): Gdk-ERROR **: 13:55:39.621: The program 'Thunar' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 64804 error_code 3 request_code 141 (Composite) minor_code 8)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)

$ ldd /bin/thunar
        linux-vdso.so.1 (0x00007ffc0c8cc000)
        libthunarx-3.so.0 => /lib/x86_64-linux-gnu/libthunarx-3.so.0 (0x00007fdbb548c000)
        libexo-2.so.0 => /lib/x86_64-linux-gnu/libexo-2.so.0 (0x00007fdbb544f000)
        libgudev-1.0.so.0 => /lib/x86_64-linux-gnu/libgudev-1.0.so.0 (0x00007fdbb5442000)
        libnotify.so.4 => /lib/x86_64-linux-gnu/libnotify.so.4 (0x00007fdbb5437000)
        libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007fdbb542c000)
        libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007fdbb540e000)
        libxfce4ui-2.so.0 => /lib/x86_64-linux-gnu/libxfce4ui-2.so.0 (0x00007fdbb53f3000)
        libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fdbb4c42000)
        libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fdbb4b3d000)
        libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fdbb4b13000)
        libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fdbb49f0000)
        libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fdbb49c8000)
        libxfce4util.so.7 => /lib/x86_64-linux-gnu/libxfce4util.so.7 (0x00007fdbb49b4000)
        libxfconf-0.so.3 => /lib/x86_64-linux-gnu/libxfconf-0.so.3 (0x00007fdbb4996000)
        libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fdbb4947000)
        libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fdbb4766000)
        libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fdbb4706000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fdbb45dd000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdbb43e9000)
        libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fdbb43e3000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdbb4294000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdbb4271000)
        libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fdbb4244000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fdbb4239000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fdbb421f000)
        libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fdbb40e2000)
        libstartup-notification-1.so.0 => /lib/x86_64-linux-gnu/libstartup-notification-1.so.0 (0x00007fdbb40d7000)
        libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fdbb40c5000)
        libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007fdbb40b3000)
        libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fdbb40a9000)
        libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fdbb409d000)
        libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fdbb4066000)
        libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fdbb3f33000)
        libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007fdbb3f16000)
        libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fdbb3efd000)
        libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fdbb3df6000)
        libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fdbb3daf000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fdbb3cf0000)
        libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fdbb3ceb000)
        libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fdbb3cde000)
        libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fdbb3ccf000)
        libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fdbb3cca000)
        libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fdbb3cc5000)
        libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fdbb3c83000)
        libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fdbb3c78000)
        libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fdbb3c73000)
        libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fdbb3c62000)
        libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fdbb3c4b000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdbb3c40000)
        libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fdbb3b99000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fdbb3b61000)
        libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fdbb3b5c000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fdbb3b30000)
        libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fdbb3b21000)
        libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fdbb3917000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdbb38fb000)
        libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007fdbb38f0000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdbb38e8000)
        libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fdbb3888000)
        libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fdbb385d000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fdbb3841000)
        libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007fdbb3835000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fdbb37c2000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fdbb559d000)
        libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007fdbb35ba000)
        libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fdbb35b5000)
        libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fdbb3564000)
        libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fdbb352d000)
        libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fdbb3500000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fdbb34d0000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fdbb34ca000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fdbb34c2000)
        libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fdbb34b8000)
        libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fdbb3461000)
        libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fdbb33cf000)
        libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fdbb3320000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fdbb32f7000)
        liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fdbb32d6000)
        libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fdbb31b8000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fdbb3193000)

$ gdb thunar
(gdb) run
Starting program: /usr/bin/thunar
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5c97700 (LWP 2463163)]
[New Thread 0x7ffff57b4700 (LWP 2463164)]
[New Thread 0x7ffff5257700 (LWP 2463165)]
[New Thread 0x7ffff4d74700 (LWP 2463166)]
[Thread 0x7ffff5257700 (LWP 2463165) exited]

(thunar:2463155): Gdk-ERROR **: 09:40:34.956: The program 'thunar' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 9526 error_code 3 request_code 141 (Composite) minor_code 8)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Thread 1 "thunar" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff71410d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

$ lsb_release -rd
Description: Ubuntu 20.04.1 LTS
Release: 20.04

$ apt-cache policy thunar
thunar:
  Installed: 1.8.14-0ubuntu1
  Candidate: 1.8.14-0ubuntu1
  Version table:
 *** 1.8.14-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

$ /opt/firefox/firefox-bin --version
Mozilla Firefox 84.0.2

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSignature: Ubuntu 5.4.0-58.64-generic 5.4.73
Uname: Linux 5.4.0-58-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
.proc.driver.nvidia.capabilities.gpu0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/capabilities/gpu0'
.proc.driver.nvidia.capabilities.gpu1: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/capabilities/gpu1'
.proc.driver.nvidia.capabilities.mig: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/capabilities/mig'
.proc.driver.nvidia.gpus.0000.03.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:03:00.0'
.proc.driver.nvidia.gpus.0000.04.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:04:00.0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.suspend: suspend hibernate resume
.proc.driver.nvidia.suspend_depth: default modeset uvm
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 450.80.02 Wed Sep 23 01:13:39 UTC 2020
 GCC version: gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
ApportVersion: 2.20.11-0ubuntu27.14
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: skip
CompositorRunning: None
CurrentDesktop: XFCE
Date: Mon Jan 11 10:14:51 2021
DistUpgraded: Fresh install
DistroCodename: focal
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
GraphicsCard:
 NVIDIA Corporation GM206GL [Quadro M2000] [10de:1430] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company GM206GL [Quadro M2000] [103c:1190]
 NVIDIA Corporation GM206GL [Quadro M2000] [10de:1430] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company GM206GL [Quadro M2000] [103c:1190]
InstallationDate: Installed on 2020-05-24 (231 days ago)
InstallationMedia: Xubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
MachineType: Hewlett-Packard HP Z840 Workstation
ProcKernelCmdLine: BOOT_IMAGE=/BOOT/ubuntu_6kvean@/vmlinuz-5.4.0-58-generic root=ZFS=rpool/ROOT/ubuntu_6kvean ro nosplash debug
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/07/2019
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: M60 v02.50
dmi.board.asset.tag: USH842L0ZF
dmi.board.name: 2129
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 1.01
dmi.chassis.asset.tag: USH842L0ZF
dmi.chassis.type: 6
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvrM60v02.50:bd11/07/2019:svnHewlett-Packard:pnHPZ840Workstation:pvr:rvnHewlett-Packard:rn2129:rvr1.01:cvnHewlett-Packard:ct6:cvr:
dmi.product.family: 103C_53335X G=D
dmi.product.name: HP Z840 Workstation
dmi.product.sku: 4SW15U8R#ABA
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.101-2
version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.8-0ubuntu1~20.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx 20.0.8-0ubuntu1~20.04.1
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.20.8-2ubuntu2.6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200226-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

Revision history for this message
XXX (feretio-j) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It sounds like some part of the system has crashed. To help us find the cause of the crash please follow these steps:

1. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

2. If step 1 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

3. If step 2 also failed then apply the workaround from bug 994921, reboot, reproduce the crash, and retry step 1.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

affects: xorg (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
XXX (feretio-j) wrote :

As this server is used heavily used, rebooting is not that convenient. Is there a way to force crashdb.conf to be reloaded? I tried restarting apport & whoopsie services with systemctl but not sure if that worked.

There's a recent crash file for thunar that may or may not have been produced from the same issue. Though it oddly doesn't show up on my servers' error page, the url should be https://errors.ubuntu.com/oops/f9a43c4e-5076-11eb-8e16-fa163ee63de6 based on the contents of the .uploaded file. Unfortunately, I'm unable to check as I'm not a member of the appropriate group.

Let me know what you find and if a reboot is absolutely necessary to get the crash file uploaded securely.

Thanks

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It appears that crash report has not been retraced so does not have any useful debug info in it. I don't know if that's because of a missing core dump or because the infrastructure has failed (both are equally likely in my experience).

If you would like to get to the bottom of the issue then I have three suggestions:

* Add GDK_SYNCHRONIZE=1 to your /etc/environment file. It will make things slower but that's a necessary evil to debug the issue properly.

* If you can open gnome-control-center then look in Privacy>Diagnostics and try enabling error reports.

* Continue checking /var/crash for new files. If you have any old files in there that don't seem useful then please delete them. Sometimes old files will prevent new more useful crashes from being recorded.

Revision history for this message
XXX (feretio-j) wrote :

Hi Daniel,

I was able to get a few minutes to reboot. I also applied all the latest updates and created a new user with only the default home directory contents. I was able to reproduce the issue with thunar. Hopefully, you can see the crash file here:

https://errors.ubuntu.com/oops/7d0ed18c-5503-11eb-8231-fa163e102db1

I've been playing around with the GDK_SYNCHRONIZE environment variable for some time but haven't found any extra debug output, at least not at the command line. Is there some other log file I should check? Regardless, I added it to /etc/environment to ensure any GDK daemons inherits it.

Thanks

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

After adding GDK_SYNCHRONIZE=1 to /etc/environment you will probably need to reboot before it takes effect.

Revision history for this message
XXX (feretio-j) wrote :

Hi Daniel,

I figured as much given I was adding it to a file in /etc rather than a home shell rc file. I added it before I rebooted earlier. I'm just not sure where I'm supposed to look for the extra logging, presuming that's the intended result.

Thank.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No, the result of GDK_SYNCHRONIZE=1 would be just better quality crash reports. No extra logging.

Revision history for this message
XXX (feretio-j) wrote :

Hi Daniel,

Here's the latest crash file:

https://errors.ubuntu.com/oops/3cd6616e-554e-11eb-8c66-fa163e6cac46

Let me know if you have any trouble accessing it.

Thanks

Revision history for this message
XXX (feretio-j) wrote :

Hi,

Is there any other information I can provide to help resolve this issue?

Thanks

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Unfortunately the link in comment #9 shows no usable details, only that 'thunar' crashed with signal 5 on Tue Jan 12 20:19:56 2021

Please attach links to new crash reports as you find them, although it appears the machine that last crash report came from has not reported any crashes since January(?)

affects: ubuntu → thunar (Ubuntu)
Changed in gtk+3.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
XXX (feretio-j) wrote :

Hi Daniel,

I've been digging a little deeper on this issue. First, I look for other binaries in /usr/bin that dynamically link to either libgtk or libgdk (at least for starters). In short, I found other binaries that exhibit the same issue. I may have narrowed it down to possibly /lib/x86_64-linux-gnu/libgdk-3.so.0. In addition to firefox and thunar, I can recreate the crash in font-manager and gucharmap. All four of these binaries suck in libgdk-3.so.0 dynamically. A diff of the ldd output for these binaries shows other potential culprits but thus far, libgdk-3.0.so.0 might be a likely candidate to investigate further. Interestingly, pcmanfm uses the old libgdk-x11-2.0.so.0 and does not crash.

To recap, I can create the crash at will by dragging some draggable object in any of these applications. Simply dragging it a pixel or two is all it takes. I ran thunar, font-manager and gucharmap with $GDK_SYNCHRONIZE set to 1 and the --gdk-debug=all parameter. I'll upload the respective output.

Lastly, see if any of these links are helpful:

Crash from font-manager:
https://errors.ubuntu.com/oops/24c5e792-7624-11eb-86d5-fa163e102db1

Crash from gucharmap:
https://errors.ubuntu.com/oops/7af1be1c-7623-11eb-90cd-fa163e6cac46

Revision history for this message
XXX (feretio-j) wrote :
Revision history for this message
XXX (feretio-j) wrote :
Revision history for this message
XXX (feretio-j) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for those crash reports. Unfortunately they don't have any stack traces for some reason...

Since you seem to be pretty technical, the next steps I suggest are:

1. Install the debug symbols for gtk and apps like thunar.

2. Attach 'gdb' to thunar or any affected app.

3. Reproduce the crash.

4. Get a 'bt' backtrace from gdb and paste it here.

Revision history for this message
XXX (feretio-j) wrote :

I tried install all the debug (dbg), dev and source packages I could find for each of the libraries that might be an issue. I attached the result of running thunar through gdb. FYI, the crash hangs mouse in the display manager, forcing me to kill the subprocess via ssh. The kill takes place between the line starting with 554 and execution of bt.

I did another few tests which might point to either X11 or the display manager. I can log in from another computer (this one running Mageia), remotely display thunar and moving an object does NOT crash thunar.

Regardless, I attached the gdb output as requested. I tried installing the glib2 source to satisfy the missing gmessages.c but it didn't seem to find it.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Strangely that backtrace is incomplete. There should be more than two frames...

(gdb) bt
#0 _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
#1 0x0000155554698a9c in g_log_writer_default (log_level=6, fields=0x7fffffffc920, n_fields=6, user_data=0x0) at ../../../glib/gmessages.c:2694
(gdb) quit

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please remember to keep GDK_SYNCHRONIZE=1 in your /etc/environment so we can see the proper stack trace of each crash.

Revision history for this message
XXX (feretio-j) wrote :

Hi Daniel,

I never removed GDK_SYNCHRONIZE from /etc/environment. It's been set that way for a few reboots. In addition, I confirmed it was set to 1 before running gdb.

I'm wondering if you're not getting as much as you'd expect from the backtrace because I had to kill the thunar process. When thunar crashed within gdb, the mouse was stuck unfocused, meaning I couldn't focus on any window to type. I was only able to recover focus by killing the thunar process (not gdb) via a remote shell from another computer, after which I was able to run bt. Do you know of a way to automatically run bt in gdb if the process crashes?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Try running gdb from within ssh :)

Revision history for this message
XXX (feretio-j) wrote :

I tried that as I mentioned above. It doesn't crash in that scenario. I can ssh in from another computer and run thunar but I can't reproduce the crash this way. This is why I think it might have to do with the X11 server or lightdm.

I can see if I can mess with xauth to run via ssh and keep it displaying on the "broken" computer...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I mean start thunar graphically, then attach to it with gdb from ssh.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

... then type 'cont' in gdb, then crash thunar.

Revision history for this message
XXX (feretio-j) wrote :

ah, gotcha. My gdb skills are a bit rusty.

For some reason, thunar wouldn't come up so I used gucharmap. I'm attaching the output as well from using --gdk-debug=all.

Revision history for this message
XXX (feretio-j) wrote :
Revision history for this message
XXX (feretio-j) wrote :

I'm planning on rebooting soon which will hopefully fix whatever is preventing thunar from displaying. I'll that output as well, if I can.

Revision history for this message
XXX (feretio-j) wrote :

Here's the gdb & gtk-debug=all output from thunar.

Revision history for this message
XXX (feretio-j) wrote :
summary: - GDK/GTK app crash when performing drag operation
+ GDK/GTK app crash when performing drag operation (in
+ gdk_window_cache_new <- gdk_window_cache_get <-
+ drag_context_find_window_cache <- gdk_x11_drag_context_find_window)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: GDK/GTK app crash when performing drag operation (in gdk_window_cache_new <- gdk_window_cache_get <- drag_context_find_window_cache <- gdk_x11_drag_context_find_window)

Thanks, those stack traces are exactly what we needed. I can't find any other reports of those crashes, but that's likely just because nobody else had debugged it with GDK_SYNCHRONIZE yet...

Next please report the bug to the developers at https://gitlab.gnome.org/GNOME/gtk/-/issues and remember to attach the full stack traces from comments #25 and #28.

summary: - GDK/GTK app crash when performing drag operation (in
+ GDK/GTK app crash in XFCE when performing drag operation (in
gdk_window_cache_new <- gdk_window_cache_get <-
drag_context_find_window_cache <- gdk_x11_drag_context_find_window)
Changed in gtk+3.0 (Ubuntu):
status: Incomplete → New
Changed in thunar (Ubuntu):
status: Incomplete → New
Changed in gtk+3.0 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in thunar (Ubuntu):
importance: Undecided → Medium
no longer affects: thunar (Ubuntu)
Revision history for this message
XXX (feretio-j) wrote :
Revision history for this message
XXX (feretio-j) wrote :

RE: https://gitlab.xfce.org/xfce/thunar/-/issues/532

Not wanting to run an unsupported configuration and hoping for a workaround, I tried the suggestion in that issue and disabled display compositing in Window Manager Tweaks. While it did indeed seem to "fix" the drag issue in all the affected apps I mentioned, it had the unfortunate side effect of terrible graphic artifacts and weirdness happening all over the place, mostly in my terminals. It was too unusable to continue with it disabled. As soon as I re-enabled it, the graphical artifact issues stopped and the drag issue resumed.

FWIW, disabling display compositing in Window Manager Tweaks does indeed freeze the current X session as mentioned but enabling it does not.

Changed in gtk+3.0 (Ubuntu):
status: Triaged → Fix Committed
tags: added: fixed-in-3.24.28 fixed-in-4.1.3 fixed-upstream
Changed in gtk4 (Ubuntu):
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Now in hirsute-proposed:

gtk+3.0 (3.24.25-1ubuntu3) hirsute; urgency=medium

  * d/p/x11-dnd-Ignore-XErrors-from-the-COW.patch:
    - Ignore XErrors from the COW (LP: #1911036)
  * d/p/cssshadowvalue-Apply-device-scale-to-the-offset-when.patch:
    - Apply device scale to the offset when blurring text
      (LP: #1919404)

 -- Daniel van Vugt <email address hidden> Thu, 25 Mar 2021 16:17:15 +0100

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+3.0 - 3.24.25-1ubuntu3

---------------
gtk+3.0 (3.24.25-1ubuntu3) hirsute; urgency=medium

  * d/p/x11-dnd-Ignore-XErrors-from-the-COW.patch:
    - Ignore XErrors from the COW (LP: #1911036)
  * d/p/cssshadowvalue-Apply-device-scale-to-the-offset-when.patch:
    - Apply device scale to the offset when blurring text
      (LP: #1919404)

 -- Daniel van Vugt <email address hidden> Thu, 25 Mar 2021 16:17:15 +0100

Changed in gtk+3.0 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk4 - 4.3.1-1

---------------
gtk4 (4.3.1-1) experimental; urgency=medium

  * New upstream release:
    - Ignore XErrors from the COW (LP: #1911036)
  * debian/control: Update build-dependencies
  * debian/patches: Refresh
  * debian/control: Add dependencies to use upstream provided gi-docgen
    gi-docgen is still in NEW for some months now, so until that we can
    manually use the upstream provided version as subproject.
  * debian/patches: Prevent usage of web-fonts and external links in docs
  * debian/rules: Do not check for nocheck with dh 13
  * debian/rules: Do not manually build docs at build phase.
    This is now handled by gi-docgen that is called at build phase, not at
    install phase.
  * debian/control: Add python3-gi as test build dependency.
    It's needed by introspection tests
  * debian/libgtk-4-1.symbols.in: Add new symbols
  * debian/libgtk-4-doc.*: Adapt install files and links to gi-docgen paths.
    Docs are installed all in /usr/share/docs/libgtk-4-doc subfolders and
    linked to /usr/share/gtk-doc to keep devhelp support
  * debian/patches: Get typelib path from pkg-config
  * debian/rules: Ensure all symbols are defined.
    This is now working fine with all the components
  * debian/rules: Do not reset xvfb on running tests
  * debian/rules: Support running tests in parallel.
    This works fine now, so let's enable it again
  * debian/rules: Move test script to an easier to maintain external file.
    We're doing lots of operations to run tests, it's better to have the
    setup in an external script that it's easier to run, debug and maintain
  * debian/run-tests.sh: Only print full log on errors.
    No need to output the whole log if there have been no failures
  * debian: Run tests under wayland too in linux.
    It's now becoming the default backend so better to also test the library
    there.
  * debian/patches: Initialize the textbtree tags counting causing s390x fails
  * debian/rules: Skip some broken comparison tests in big endian archs
  * debian/tests: Port to Gtk4 and run them both in wayland and x11

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 09 Jul 2021 16:31:39 +0200

Changed in gtk4 (Ubuntu):
status: Fix Committed → Fix Released
Changed in gtk:
status: Unknown → Fix Released
To post a comment you must log in.