Summary: | X segfaults when switching virtual desktops of KDE | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Johannes Hirte <johannes.hirte> | ||||||||||||||
Component: | Driver/Radeon | Assignee: | xf86-video-ati maintainers <xorg-driver-ati> | ||||||||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||||||||
Severity: | normal | ||||||||||||||||
Priority: | medium | CC: | lorenz.bona | ||||||||||||||
Version: | git | ||||||||||||||||
Hardware: | x86-64 (AMD64) | ||||||||||||||||
OS: | Linux (All) | ||||||||||||||||
Whiteboard: | |||||||||||||||||
i915 platform: | i915 features: | ||||||||||||||||
Attachments: |
|
Description
Johannes Hirte
2015-03-19 17:34:08 UTC
I can't seem to reproduce this. Which video player are you using, and how are you switching between the desktops? Can you get a backtrace of the crash with gdb, and make sure there are debugging symbols for /usr/bin/X(org), /usr/lib64/libdrm.so.2 and radeon_drv.so? If you don't know how to do this, see http://wiki.x.org/wiki/Development/Documentation/ServerDebugging/ . Please attach the full Xorg.0.log file and output of dmesg. Same issue here, but with a different cause. If I run a Steam game, I've tried with CS:GO and Dota2, in full-screen when I ALT+TAB to switch between opened windows Xorg crashes. I compile ati from git and until this commit (7388d0b6c54b9d536fdb161e3aa61b326627b939) I've never faced this problem. Here you are my Xorg.0.log. Created attachment 114555 [details]
xorg.log crash
(In reply to Michel Dänzer from comment #1) > I can't seem to reproduce this. Which video player are you using, and how > are you switching between the desktops? > > Can you get a backtrace of the crash with gdb, and make sure there are > debugging symbols for /usr/bin/X(org), /usr/lib64/libdrm.so.2 and > radeon_drv.so? If you don't know how to do this, see > http://wiki.x.org/wiki/Development/Documentation/ServerDebugging/ . > > Please attach the full Xorg.0.log file and output of dmesg. Video player is mpv, desktop environment is KDE5 compiled from git. I've configured 6 different VTs that are switched with F1-F6. backtrace from a crash: Program received signal SIGABRT, Aborted. 0x00007f0433757f97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 55 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007f0433757f97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 #1 0x00007f04337593bd in __GI_abort () at abort.c:89 #2 0x00007f0433797d20 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f043388fd80 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007f043379d59d in malloc_printerr (action=3, str=0x7f043388fed8 "double free or corruption (out)", ptr=<optimized out>) at malloc.c:4958 #4 0x00007f043379ddcb in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3829 #5 0x00007f04325fad64 in radeon_drm_abort_one (e=0x2fb6e80, e@entry=0x7f0432fd16b8) at /var/tmp/portage/x11-drivers/xf86-video-ati-9999/work/xf86-video-ati-9999/src/radeon_drm_queue.c:112 #6 0x00007f04325faee5 in radeon_drm_abort_entry (entry=entry@entry=0x7f0432fd16b8) at /var/tmp/portage/x11-drivers/xf86-video-ati-9999/work/xf86-video-ati-9999/src/radeon_drm_queue.c:136 #7 0x00007f0432603d34 in radeon_do_pageflip (scrn=0x2feac90, client=<optimized out>, new_front=<optimized out>, id=<optimized out>, data=0x0, ref_crtc_hw_id=0, handler=0x7f04325f7dc0 <radeon_dri2_flip_event_handler>, abort=0x7f04325f7d80 <radeon_dri2_flip_event_abort>) at /var/tmp/portage/x11-drivers/xf86-video-ati-9999/work/xf86-video-ati-9999/src/drmmode_display.c:2378 #8 0x00007f04325f9b5a in radeon_dri2_schedule_flip (front=<optimized out>, back=<optimized out>, target_msc=<optimized out>, data=<optimized out>, func=<optimized out>, draw=<optimized out>, client=<optimized out>, scrn=<optimized out>) at /var/tmp/portage/x11-drivers/xf86-video-ati-9999/work/xf86-video-ati-9999/src/radeon_dri2.c:650 #9 radeon_dri2_frame_event_handler (scrn=0x23f80a0, seq=12941, usec=218698740, event_data=0x2fec6e0) at /var/tmp/portage/x11-drivers/xf86-video-ati-9999/work/xf86-video-ati-9999/src/radeon_dri2.c:809 #10 0x00007f04325fadeb in radeon_drm_queue_handler (fd=<optimized out>, frame=<optimized out>, sec=<optimized out>, usec=<optimized out>, user_ptr=<optimized out>) at /var/tmp/portage/x11-drivers/xf86-video-ati-9999/work/xf86-video-ati-9999/src/radeon_drm_queue.c:67 #11 0x00007f0434a393d6 in drmHandleEvent (fd=18, evctx=0x23f8a68) at /var/tmp/portage/x11-libs/libdrm-9999/work/libdrm-9999/xf86drmMode.c:879 #12 0x000000000043fb0b in WakeupHandler (result=result@entry=1, pReadmask=pReadmask@entry=0x63f080 <LastSelectMask>) at /var/tmp/portage/x11-base/xorg-server-1.17.1-r1/work/xorg-server-1.17.1/dix/dixutils.c:423 #13 0x000000000059aa04 in WaitForSomething (pClientsReady=pClientsReady@entry=0x2651360) at /var/tmp/portage/x11-base/xorg-server-1.17.1-r1/work/xorg-server-1.17.1/os/WaitFor.c:229 #14 0x000000000043a731 in Dispatch () at /var/tmp/portage/x11-base/xorg-server-1.17.1-r1/work/xorg-server-1.17.1/dix/dispatch.c:361 #15 0x000000000043ef15 in dix_main (argc=10, argv=0x7fff5ac2a1e8, envp=<optimized out>) at /var/tmp/portage/x11-base/xorg-server-1.17.1-r1/work/xorg-server-1.17.1/dix/main.c:298 #16 0x00007f0433743fd0 in __libc_start_main (main=0x428240 <main>, argc=10, argv=0x7fff5ac2a1e8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff5ac2a1d8) at libc-start.c:289 #17 0x000000000042826e in _start () Created attachment 114558 [details]
Xorg.0.log
Created attachment 114559 [details]
dmesg output
(In reply to Lorenzo Bona from comment #2) > Same issue here, but with a different cause. > > If I run a Steam game, I've tried with CS:GO and Dota2, in full-screen when > I ALT+TAB to switch between opened windows Xorg crashes. > > I compile ati from git and until this commit > (7388d0b6c54b9d536fdb161e3aa61b326627b939) I've never faced this problem. > > Here you are my Xorg.0.log. Another hint. If I execute the same games in a window, not fullscreen, this crash never appen. I can ALT+TAB like crazy. @Johannes are you using mpv in fullscreen mode? Otherwise mine could be a different issue. (In reply to Lorenzo Bona from comment #7) > @Johannes are you using mpv in fullscreen mode? > Otherwise mine could be a different issue. Yes, like mentioned in the initial report, I've switched the video to fullscreen for triggering this bug. Created attachment 114577 [details] [review] Flip error handling fixes Does this patch fix the problem? Did you get the "flip queue failed: Device or resource busy" messages before the change which caused the problem as well? (In reply to Michel Dänzer from comment #9) > Created attachment 114577 [details] [review] [review] > Flip error handling fixes > > Does this patch fix the problem? Nope, X still crashes. > Did you get the "flip queue failed: Device or resource busy" messages before > the change which caused the problem as well? Mmm not completely sure, but I think it's the first time I see this message. Forgot to mention. My GPU is a R7-265 - Pitcairn. Same here, the patch doesn't fix the issue and I've not seen the message in the logs before. Created attachment 114612 [details]
Flip error handling fixes v2
How about this patch?
It doesn't address the cause of the flip queue failure though, no idea yet how that could happen.
(In reply to Michel Dänzer from comment #13) > Created attachment 114612 [details] > Flip error handling fixes v2 > > How about this patch? > > It doesn't address the cause of the flip queue failure though, no idea yet > how that could happen. Nice, X doesn't crash now, still complains about page flipping, as you said. New Xorg.log attached. I've tested your patch on top of latest changes you've pushed some minutes ago. Created attachment 114614 [details]
xorg.log
Can one of you attach gdb to the Xorg process, set a breakpoint at the drmmode_display.c line printing the "flip queue failed" error message, trigger the breakpoint and get a backtrace? (In reply to Michel Dänzer from comment #16) > Can one of you attach gdb to the Xorg process, set a breakpoint at the > drmmode_display.c line printing the "flip queue failed" error message, > trigger the breakpoint and get a backtrace? Never mind, it'll be basically the same as in comment 4. The segfault should be fixed. If the flip queue failure causes any other problem, another report should be filed for that. commit 8fc22360d5520469c82092ccb0fcf2af330c573f Author: Michel Dänzer <michel.daenzer@amd.com> Date: Thu Mar 26 15:58:01 2015 +0900 Increase robustness against DRM page flip ioctl failures v3 Centralize cleanup, only clean up things that have been allocated for the failed ioctl call. Fixes double-free after a flip ioctl failure. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.