Bug 97219 - Reproducible crash during certain window interactions
Summary: Reproducible crash during certain window interactions
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-05 14:42 UTC by Andreas Reis
Modified: 2016-08-19 01:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (56.22 KB, text/x-log)
2016-08-05 14:42 UTC, Andreas Reis
no flags Details
tar'ed Xorg log with debug=full (2.17 MB, application/x-xz)
2016-08-05 15:57 UTC, Andreas Reis
no flags Details

Description Andreas Reis 2016-08-05 14:42:42 UTC
Created attachment 125557 [details]
Xorg.0.log

Getting this reproducible crash with Xserver 1.18.4 + xf86-video-intel git.

Compiler for both is gcc 6.1.1 20160803 x64, tried both kernel 4.6.5 (vanilla Arch) and drm-intel-nightly. Same result with xserver-git (0b2f30 os: Clean up WaitFor.c – current head won't start).

So far I've noticed it when clicking Save in a wined IrfanView's Save File dialog, and sometimes when telling file-roller to create an archive.

Xorg log doesn't seem to list the crash, sometimes the last line is interrupted, other times it even lists the usual "terminated successfully (0)".

One gdb log each for both compiled with ordinary debug symbols, and the other with --with-debug=full for xf86-video-intel.

Attached Xorg log is for this (without =full):
Thread 1 "Xorg" received signal SIGTERM, Terminated.
0x00007f0abd71df37 in sna_covering_crtc () from /usr/lib/xorg/modules/drivers/intel_drv.so
(gdb) bt
#0  0x00007f0abd71df37 in sna_covering_crtc () from /usr/lib/xorg/modules/drivers/intel_drv.so
#1  0x00007f0abd7e1b55 in sna_present_get_crtc () from /usr/lib/xorg/modules/drivers/intel_drv.so
#2  0x00000000005580db in present_get_crtc (window=0xaa87e0) at present.c:246
#3  present_pixmap (window=0xaa87e0, pixmap=0x17aafe0, serial=171, valid=0x0, update=0x0, x_off=<optimized out>, y_off=0, target_crtc=<optimized out>, wait_fence=0x0, idle_fence=0x17ab0e0, options=0, window_msc=126408, divisor=0, remainder=0, notifies=0x0, num_notifies=0) at present.c:812
#4  0x000000000055a165 in proc_present_pixmap (client=0x174a310) at present_request.c:138
#5  0x000000000043aaaf in Dispatch () at dispatch.c:430
#6  0x00000000004407b3 in dix_main (argc=12, argv=0x7ffddd217e68, envp=<optimized out>) at main.c:300
#7  0x00007f0ac26102d1 in __libc_start_main () from /usr/lib/libc.so.6
#8  0x0000000000424aea in _start ()

--with-debug=full:

Thread 1 "Xorg" received signal SIGTERM, Terminated.
0x00007f2e339c62b3 in malloc_consolidate () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007f2e339c62b3 in malloc_consolidate () from /usr/lib/libc.so.6
#1  0x00007f2e339c7d6a in _int_malloc () from /usr/lib/libc.so.6
#2  0x00007f2e339ca99b in calloc () from /usr/lib/libc.so.6
#3  0x000000000045a91d in InitEventList (num_events=<optimized out>) at getevents.c:1161
#4  0x0000000000478cde in TouchListenerGone (resource=31457280) at touch.c:975
#5  0x0000000000439d79 in CloseDownClient (client=client@entry=0x1cc9e40) at dispatch.c:3426
#6  0x000000000043aa7c in Dispatch () at dispatch.c:442
#7  0x00000000004407b3 in dix_main (argc=12, argv=0x7fff96f31958, envp=<optimized out>) at main.c:300
#8  0x00007f2e3396f2d1 in __libc_start_main () from /usr/lib/libc.so.6
#9  0x0000000000424aea in _start ()
Comment 1 Andreas Reis 2016-08-05 14:44:06 UTC
window manager is xmonad (no further DE), compositor is compton
Comment 2 Chris Wilson 2016-08-05 14:58:14 UTC
SIGTERM is being sent by a third party. Check system logs.
Comment 3 Andreas Reis 2016-08-05 15:57:45 UTC
Created attachment 125560 [details]
tar'ed Xorg log with debug=full

Apparently certain parts of my systemd (incl. journal) weren't working properly, now after reinstalling 231 they are back and I seem to get a "proper" error?

(This is… confusing.)

Attached the Xorg log I'm now getting, from xserver git (0b2f30) + xf86-video-intel git with debug=full.

(Btw, since "sna: Only flush GPU bo for a damage event" I occasionally see my urxvtc only showing the latest lines after interaction, but that's ofc unrelated to this.)
Comment 4 Andreas Reis 2016-08-06 11:09:48 UTC
The last part extracted so people don't have to bother with a 72M text file.

[    72.280] sna_destroy_pixmap: pixmap=1339, attached?=0
[    72.280] sna_unrealize_font (key=0)
[    72.280] sna_destroy_pixmap: pixmap=34, attached?=1
[    72.280] _kgem_bo_destroy: handle=18, proxy? 0
[    72.280] __kgem_bo_destroy: handle=18, size=25804800
[    72.280] __kgem_bo_destroy: handle=18, not reusable
[    72.280] __sna_free_pixmap(pixmap=34)
[    72.280] sna_watch_flush: enable=-1
[    72.280] sna_destroy_pixmap: pixmap=4, attached?=0
[    72.281] (EE) 
[    72.281] (EE) Backtrace:
[    72.286] (EE) 0: /usr/lib/xorg/modules/drivers/intel_drv.so (get_window_pixmap+0x18) [0x7f25e5f42d8c]
[    72.287] (EE) 1: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_get_window_pixmap+0x18) [0x7f25e5f8a31f]
[    72.287] (EE) 2: /usr/lib/xorg-server/Xorg (present_restore_screen_pixmap+0x7d) [0x55465d]
[    72.287] (EE) 3: /usr/lib/xorg-server/Xorg (present_flip_destroy+0x49) [0x557359]
[    72.288] (EE) 4: /usr/lib/xorg-server/Xorg (present_close_screen+0x33) [0x553dd3]
[    72.288] (EE) 5: /usr/lib/xorg-server/Xorg (CursorCloseScreen+0x88) [0x4f71c8]
[    72.289] (EE) 6: /usr/lib/xorg-server/Xorg (AnimCurCloseScreen+0x96) [0x5519a6]
[    72.289] (EE) 7: /usr/lib/xorg-server/Xorg (dix_main+0x669) [0x440649]
[    72.290] (EE) 8: /usr/lib/libc.so.6 (__libc_start_main+0xf1) [0x7f25eab1d2d1]
[    72.290] (EE) 9: /usr/lib/xorg-server/Xorg (_start+0x2a) [0x4248fa]
[    72.291] (EE) 10: ? (?+0x2a) [0x2a]
[    72.291] (EE) 
[    72.291] (EE) 
Fatal server error:
[    72.291] (EE) get_window_pixmap:199 assertion 'window' failed
[    72.291] (EE) 
[    72.291] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    72.291] (EE) Please also check the log file at "/home/meme/.local/share/xorg/Xorg.0.log" for additional information.
[    72.291] (EE) 
[    72.291] sna_leave_vt
[    72.291] sna_mode_reset
[    72.291] sna_disable_cursors
[    72.302] sna_crtc_disable_shadow: disabling for crtc 26
[    72.302] __sna_crtc_disable: releasing handle=27 from scanout, active=1
[    72.316] sna_crtc_disable_shadow: disabling for crtc 30
[    72.316] sna_mode_disable_shadow
[    72.316] _kgem_bo_destroy: handle=10, proxy? 0
[    72.316] __kgem_bo_destroy: handle=10, size=25804800
[    72.316] kgem_bo_move_to_scanout: moving 10 [fb 52] to scanout cache, active? 0
[    72.316] __sna_crtc_disable: releasing handle=27 from scanout, active=0
[    72.316] sna_mode_wakeup: len=64
[    72.316] sna_mode_wakeup: recording last swap on pipe=1, frame 4214 [1076], time 71.883757
[    72.316] sna_mode_wakeup: flip complete, pending? 2
[    72.316] sna_mode_wakeup: recording last swap on pipe=0, frame 4211 [1073], time 71.886408
[    72.316] sna_mode_wakeup: flip complete, pending? 1
[    72.316] present_flip_handler(sequence=4211): event=573
[    72.316] present_flip_handler: pipe=0, tv=71.886408 msc=4211 (target 4211), event=573 complete
[    72.316] sna_destroy_pixmap: pixmap=271, attached?=1
[    72.316] _kgem_bo_destroy: handle=27, proxy? 0
[    72.316] __kgem_bo_destroy: handle=27, size=29360128
[    72.316] kgem_bo_free: handle=27, size=29360128
[    72.316] kgem_bo_rmfb: releasing fb=110 for handle=27
[    72.316] kgem_bo_free: releasing 0x0:0x0 vma for handle=27, count=0
[    72.316] __sna_free_pixmap(pixmap=271)
[    72.316] sna_watch_flush: enable=-1
[    72.316] (EE) 
[    72.316] (EE) Backtrace:
[    72.317] (EE) 0: /usr/lib/xorg/modules/drivers/intel_drv.so (get_window_pixmap+0x18) [0x7f25e5f42d8c]
[    72.317] (EE) 1: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_get_window_pixmap+0x18) [0x7f25e5f8a31f]
[    72.317] (EE) 2: /usr/lib/xorg-server/Xorg (present_unflip+0x95) [0x554a85]
[    72.318] (EE) 3: /usr/lib/xorg-server/Xorg (present_event_notify+0x644) [0x555e34]
[    72.318] (EE) 4: /usr/lib/xorg/modules/drivers/intel_drv.so (present_flip_handler+0x1e6) [0x7f25e60ba00c]
[    72.319] (EE) 5: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_mode_wakeup+0x659) [0x7f25e5fc853a]
[    72.319] (EE) 6: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_mode_reset+0x2b6) [0x7f25e5fc41e5]
[    72.320] (EE) 7: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_leave_vt+0x48) [0x7f25e5fcbefc]
[    72.320] (EE) 8: /usr/lib/xorg-server/Xorg (AbortDDX+0x7c) [0x49639c]
[    72.320] (EE) 9: /usr/lib/xorg-server/Xorg (AbortServer+0x22) [0x6065f2]
[    72.321] (EE) 10: /usr/lib/xorg-server/Xorg (FatalError+0x13d) [0x60736d]
[    72.321] (EE) 11: /usr/lib/xorg/modules/drivers/intel_drv.so (get_window_pixmap+0x3c) [0x7f25e5f42db0]
[    72.321] (EE) 12: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_get_window_pixmap+0x18) [0x7f25e5f8a31f]
[    72.322] (EE) 13: /usr/lib/xorg-server/Xorg (present_restore_screen_pixmap+0x7d) [0x55465d]
[    72.322] (EE) 14: /usr/lib/xorg-server/Xorg (present_flip_destroy+0x49) [0x557359]
[    72.322] (EE) 15: /usr/lib/xorg-server/Xorg (present_close_screen+0x33) [0x553dd3]
[    72.322] (EE) 16: /usr/lib/xorg-server/Xorg (CursorCloseScreen+0x88) [0x4f71c8]
[    72.323] (EE) 17: /usr/lib/xorg-server/Xorg (AnimCurCloseScreen+0x96) [0x5519a6]
[    72.323] (EE) 18: /usr/lib/xorg-server/Xorg (dix_main+0x669) [0x440649]
[    72.324] (EE) 19: /usr/lib/libc.so.6 (__libc_start_main+0xf1) [0x7f25eab1d2d1]
[    72.324] (EE) 20: /usr/lib/xorg-server/Xorg (_start+0x2a) [0x4248fa]
[    72.324] (EE) 21: ? (?+0x2a) [0x2a]
[    72.324] (EE) 
[    72.324] (EE) 
FatalError re-entered, aborting
[    72.324] (EE) get_window_pixmap:199 assertion 'window' failed
[    72.324] (EE)
Comment 5 Chris Wilson 2016-08-06 11:21:34 UTC
(In reply to Andreas Reis from comment #3)
> Created attachment 125560 [details]
> tar'ed Xorg log with debug=full
> 
> Apparently certain parts of my systemd (incl. journal) weren't working
> properly, now after reinstalling 231 they are back and I seem to get a
> "proper" error?

That's a known bug in the Xorg shutdown code. But it still seems to be a normal shutdown before it trips over itself.

> (Btw, since "sna: Only flush GPU bo for a damage event" I occasionally see
> my urxvtc only showing the latest lines after interaction, but that's ofc
> unrelated to this.)

Hmm, please file a new bug. DRI3 probably needs a force flush as well.
Comment 6 Andreas Reis 2016-08-06 11:23:50 UTC
(In reply to Chris Wilson from comment #5)
> That's a known bug in the Xorg shutdown code. But it still seems to be a
> normal shutdown before it trips over itself.

Darn, I'd hoped this would be it. There's just nothing else in the logs, at all.

> Hmm, please file a new bug. DRI3 probably needs a force flush as well.

Will do tomorrow.
Comment 7 Michel Dänzer 2016-08-07 05:33:35 UTC
https://patchwork.freedesktop.org/patch/102639/ should fix this crash, but as Chris pointed out, Xorg is already shutting down when it happens, so something happens on the client side first.
Comment 8 Andreas Reis 2016-08-17 15:54:19 UTC
This bug still exists for me and it's incredibly annoying.

I also don't have the foggiest how to further debug it. Any ideas are be much appreciated.
Comment 9 Michel Dänzer 2016-08-18 00:18:11 UTC
At the very least, the symptoms should have changed with current xserver Git master. If it still crashes, please attach the current backtrace.
Comment 10 Andreas Reis 2016-08-18 10:07:38 UTC
No real changes, or not that I can see, other than that shutdown crash indeed being gone.

But as for the involuntary shutdowns themselves, those still happen. The Wine one is consistent. Again, nothing in the logs (verbose 99 & logverbose 99), it's being listed as normal shutdown.

Is there no way to have the server list what gave it the order to close?
Comment 11 Michel Dänzer 2016-08-19 01:29:38 UTC
(In reply to Andreas Reis from comment #10)
> No real changes, or not that I can see, other than that shutdown crash
> indeed being gone.

Resolving this report as fixed then.


> Is there no way to have the server list what gave it the order to close?

Not that I know of, but usually it should be the session manager I think.


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.