Bug 90968 - sigsegv from "sna/dri2: Mark the pending backbuffer copy as active"
Summary: sigsegv from "sna/dri2: Mark the pending backbuffer copy as active"
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 90965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-13 10:55 UTC by Andreas Reis
Modified: 2015-06-13 17:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Andreas Reis 2015-06-13 10:55:28 UTC
Said bisected commit causes consistent crashes eg. when Steam loads its main window:

[   394.049] (EE) Backtrace:
[   394.049] (EE) 0: /usr/bin/xorg-server/Xorg (OsLookupColor+0x139) [0x5f22a9]
[   394.050] (EE) 1: /usr/lib/libc.so.6 (killpg+0x40) [0x7f28e1c095ef]
[   394.050] (EE) 2: /usr/lib/xorg/modules/drivers/intel_drv.so (chain_swap+0x95) [0x7f28dbec1265]
[   394.050] (EE) 3: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_dri2_vblank_handler+0x259) [0x7f28dbec2ee9]
[   394.050] (EE) 4: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_mode_wakeup+0x195) [0x7f28dbe10e05]
[   394.051] (EE) 5: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_wakeup_handler+0xb0) [0x7f28dbe15270]
[   394.051] (EE) 6: /usr/bin/xorg-server/Xorg (WakeupHandler+0xaa) [0x4427fa]
[   394.051] (EE) 7: /usr/bin/xorg-server/Xorg (WaitForSomething+0x36e) [0x5e904e]
[   394.051] (EE) 8: /usr/bin/xorg-server/Xorg (SendErrorToClient+0x114) [0x43c054]
[   394.051] (EE) 9: /usr/bin/xorg-server/Xorg (remove_fs_handlers+0x414) [0x441c04]
[   394.051] (EE) 10: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7f28e1bf6790]
[   394.051] (EE) 11: /usr/bin/xorg-server/Xorg (_start+0x29) [0x427489]

4770, git versions & drm-intel-nightly
Comment 1 Chris Wilson 2015-06-13 11:46:05 UTC
Fatal server error:
(EE) chain_swap:2263 assertion 'get_private(chain->back)->copy' failed
Comment 2 Chris Wilson 2015-06-13 12:20:06 UTC
*** Bug 90965 has been marked as a duplicate of this bug. ***
Comment 3 Chris Wilson 2015-06-13 12:21:00 UTC
commit ed7bcae0ab0af41bc51dbcb729e4af34e2ba5094
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Jun 13 12:53:19 2015 +0100

    sna/dri2: SWAP_THROTTLE is also used for a delayed SWAP
    
    If there is already a pending operation on the drawable, the swap is
    queued. It is queued with SWAP_THROTTLE which classes with the
    vblank_mode=0 chaining, so the choice is to either review all other uses
    of SWAP_THROTTLE and duplicate the chain swap handling, or to choose when
    use to the alternate copy or back buffer. This patch opts for the
    latter.
    
    Fixes regression from
    commit dcb4d323ca19f86fbe0230378ac9035161a70f9e
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Thu Jun 11 13:54:49 2015 +0100
    
        sna/dri2: Mark the pending backbuffer copy as active
    
    Reported-by: Christoph Haag <haagch@frickel.club>
    Reported-by: Andreas Reis <andreas.reis@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90968
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 4 Andreas Reis 2015-06-13 13:03:16 UTC
Just got another with Steam. I'm not 100% sure which version I was running and I can't seem to reproduce it either, so feel free to ignore it for now.

[  9095.069] (EE) Backtrace:
[  9095.069] (EE) 0: /usr/bin/xorg-server/Xorg (OsLookupColor+0x139) [0x5f22a9]
[  9095.071] (EE) 1: /usr/lib/libc.so.6 (killpg+0x40) [0x7f33c1a075ef]
[  9095.071] (EE) 2: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_dri2_schedule_swap+0xa3e) [0x7f33bbcc04de]
[  9095.071] (EE) 3: /usr/bin/xorg-server/Xorg (DRI2SwapBuffers+0x1c1) [0x5b72d1]
[  9095.072] (EE) 4: /usr/bin/xorg-server/Xorg (DRI2GetParam+0xbf8) [0x5b9418]
[  9095.072] (EE) 5: /usr/bin/xorg-server/Xorg (SendErrorToClient+0x30f) [0x43c24f]
[  9095.072] (EE) 6: /usr/bin/xorg-server/Xorg (remove_fs_handlers+0x414) [0x441c04]
[  9095.073] (EE) 7: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7f33c19f4790]
[  9095.073] (EE) 8: /usr/bin/xorg-server/Xorg (_start+0x29) [0x427489]
Comment 5 Chris Wilson 2015-06-13 16:17:15 UTC
Hmm. Make sure you have HEAD installed and reopen if it reoccurs. Thanks.
Comment 6 Andreas Reis 2015-06-13 17:19:23 UTC
The same crash now happened trice in a row when Steam loads its main window and this time I'm definitely on HEAD (ie: sna/dri2: SWAP_THROTTLE is also used for a delayed SWAP).
Comment 7 Chris Wilson 2015-06-13 17:22:40 UTC
Could you compile with --enable-debug and look for an assert (logged via FatalError in xorg.log)?
Comment 8 Andreas Reis 2015-06-13 17:36:47 UTC
[  4170.522] (EE) 
[  4170.522] (EE) Backtrace:
[  4170.522] (EE) 0: /usr/bin/xorg-server/Xorg (OsLookupColor+0x139) [0x5f22a9]
[  4170.523] (EE) 1: /usr/lib/libc.so.6 (killpg+0x40) [0x7fddea0505ef]
[  4170.523] (EE) 2: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_dri2_schedule_swap+0xec0) [0x7fdde42efa00]
[  4170.524] (EE) 3: /usr/bin/xorg-server/Xorg (DRI2SwapBuffers+0x1c1) [0x5b72d1]
[  4170.524] (EE) 4: /usr/bin/xorg-server/Xorg (DRI2GetParam+0xbf8) [0x5b9418]
[  4170.524] (EE) 5: /usr/bin/xorg-server/Xorg (SendErrorToClient+0x30f) [0x43c24f]
[  4170.524] (EE) 6: /usr/bin/xorg-server/Xorg (remove_fs_handlers+0x414) [0x441c04]
[  4170.524] (EE) 7: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7fddea03d790]
[  4170.525] (EE) 8: /usr/bin/xorg-server/Xorg (_start+0x29) [0x427489]
[  4170.525] (EE) 
[  4170.525] (EE) Segmentation fault at address 0x7c
[  4170.525] (EE) 
Fatal server error:
[  4170.525] (EE) Caught signal 11 (Segmentation fault). Server aborting
[  4170.525] (EE) 
[  4170.525] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[  4170.525] (EE) Please also check the log file at "/home/meme/.local/share/xorg/Xorg.0.log" for additional information.
[  4170.525] (EE) 
[  4170.525] (II) AIGLX: Suspending AIGLX clients for VT switch
[  4170.550] (EE) 
[  4170.550] (EE) Backtrace:
[  4170.551] (EE) 0: /usr/lib/xorg/modules/drivers/intel_drv.so (kgem_set_mode.isra.46.constprop.79+0x57) [0x7fdde42c7e77]
[  4170.551] (EE) 1: /usr/lib/xorg/modules/drivers/intel_drv.so (gen7_render_copy_boxes+0xfbd) [0x7fdde42ced8d]
[  4170.552] (EE) 2: /usr/lib/xorg/modules/drivers/intel_drv.so (__sna_dri2_copy_region+0x382) [0x7fdde42eca32]
[  4170.552] (EE) 3: /usr/lib/xorg/modules/drivers/intel_drv.so (chain_swap+0x126) [0x7fdde42edec6]
[  4170.553] (EE) 4: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_dri2_vblank_handler+0x20a) [0x7fdde42f0b9a]
[  4170.553] (EE) 5: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_mode_wakeup+0x235) [0x7fdde4219c85]
[  4170.554] (EE) 6: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_mode_reset+0x2f4) [0x7fdde421c2f4]
[  4170.554] (EE) 7: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_leave_vt+0x20) [0x7fdde421f460]
[  4170.555] (EE) 8: /usr/lib/xorg/modules/extensions/libglx.so (GlxSetVisualConfigs+0xb66d) [0x7fdde6ec9fad]
[  4170.555] (EE) 9: /usr/bin/xorg-server/Xorg (AbortDDX+0x7c) [0x4944cc]
[  4170.555] (EE) 10: /usr/bin/xorg-server/Xorg (LogSetParameter+0x92) [0x5ff6c2]
[  4170.555] (EE) 11: /usr/bin/xorg-server/Xorg (FatalError+0x13d) [0x60045d]
[  4170.555] (EE) 12: /usr/bin/xorg-server/Xorg (OsLookupColor+0x18e) [0x5f22fe]
[  4170.556] (EE) 13: /usr/lib/libc.so.6 (killpg+0x40) [0x7fddea0505ef]
[  4170.556] (EE) 14: /usr/lib/xorg/modules/drivers/intel_drv.so (sna_dri2_schedule_swap+0xec0) [0x7fdde42efa00]
[  4170.556] (EE) 15: /usr/bin/xorg-server/Xorg (DRI2SwapBuffers+0x1c1) [0x5b72d1]
[  4170.556] (EE) 16: /usr/bin/xorg-server/Xorg (DRI2GetParam+0xbf8) [0x5b9418]
[  4170.556] (EE) 17: /usr/bin/xorg-server/Xorg (SendErrorToClient+0x30f) [0x43c24f]
[  4170.556] (EE) 18: /usr/bin/xorg-server/Xorg (remove_fs_handlers+0x414) [0x441c04]
[  4170.557] (EE) 19: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7fddea03d790]
[  4170.557] (EE) 20: /usr/bin/xorg-server/Xorg (_start+0x29) [0x427489]
[  4170.557] (EE) 
[  4170.557] kgem_set_mode:414 assertion '!kgem->wedged' failed
Comment 9 Chris Wilson 2015-06-13 17:46:55 UTC
commit 670d05f438520bcef8e86a0e32016ae542c61cee
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Jun 13 18:43:13 2015 +0100

    sna/dri2: Destroy the right bo
    
    Fixes copy'n'paste error in
    
    commit d46c793663d2b1b5ffb923500111b7affa8402b6
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Fri Jun 12 13:50:35 2015 +0100
    
        sna/dri2: Remove the active_scanout flag when deleting the event
    
    Reported-by: Andreas Reis <andreas.reis@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90968#c8
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Sigh.


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.