Bug 73981 - Intel segfault at Xorg startup with latest bits (regression).
Summary: Intel segfault at Xorg startup with latest bits (regression).
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 16:06 UTC by Nick Bowler
Modified: 2014-01-23 21:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (7.32 KB, text/plain)
2014-01-23 16:06 UTC, Nick Bowler
no flags Details
Protect against fake CRTCs during initial probe (987 bytes, patch)
2014-01-23 16:31 UTC, Chris Wilson
no flags Details | Splinter Review

Description Nick Bowler 2014-01-23 16:06:22 UTC
Created attachment 92680 [details]
Xorg.0.log

With the latest git xf86-video-intel I am getting a segfault immediately upon
starting the X server.  The last known working version of the driver was
1.15.0 which unfortunately not longer builds against the latest X server.
Here's the backtrace from GDB...

  Program terminated with signal 11, Segmentation fault.
  #0  0x00007ffbb6f8e187 in sna_probe_initial_configuration (sna=0x7ffbbb936000)
      at sna_display.c:3495
  3495				if (to_sna_crtc(crtc)->id != crtc_id)
  (gdb) bt
  #0  0x00007ffbb6f8e187 in sna_probe_initial_configuration (sna=0x7ffbbb936000)
      at sna_display.c:3495
  #1  0x00007ffbb6f8e743 in sna_mode_pre_init (scrn=0x1a2cbe0, 
      sna=0x7ffbbb936000) at sna_display.c:3638
  #2  0x00007ffbb6f934d3 in sna_pre_init (scrn=0x1a2cbe0, flags=0)
      at sna_driver.c:611
  #3  0x000000000047e392 in InitOutput (
      pScreenInfo=pScreenInfo@entry=0x822200 <screenInfo>, argc=argc@entry=1, 
      argv=argv@entry=0x7fff40f69418)
      at /usr/src/debug/x11-base/xorg-server-1.15.0/xorg-server-1.15.0/hw/xfree86/common/xf86Init.c:594
  #4  0x000000000043f906 in dix_main (argc=1, argv=0x7fff40f69418, 
      envp=<optimized out>)
      at /usr/src/debug/x11-base/xorg-server-1.15.0/xorg-server-1.15.0/dix/main.c:200
  #5  0x00007ffbb9a46bf5 in __libc_start_main (main=0x42a520 <main>, argc=1, 
      ubp_av=0x7fff40f69418, init=<optimized out>, fini=<optimized out>, 
      rtld_fini=<optimized out>, stack_end=0x7fff40f69408) at libc-start.c:258
  #6  0x000000000042a551 in _start ()

Obligatory version information...

  Intel G45 chip
  Linux 3.12.5
  xf86-video-intel (git but most of the 2.99.xxx versions I tried failed too)
  X server 1.15.0
  libdrm 2.4.51

I will attempt to bisect if I have time
Comment 1 Nick Bowler 2014-01-23 16:08:03 UTC
Correction: last known working version of the intel driver was 2.21.15, which no longer builds against the lastest X server.
Comment 2 Nick Bowler 2014-01-23 16:23:01 UTC
OK that was easy.  Doesn't revert cleanly on master.

8ecb758697af42e8e68edee0d1945986470a9c04 is the first bad commit
commit 8ecb758697af42e8e68edee0d1945986470a9c04
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Aug 31 19:44:50 2013 +0100

    sna: Expand the array of fake outputs if the last is used
    
    Always maintain one spare so that we can reconfigure for any number of
    desired outputs on the fly.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

:040000 040000 81f258cd3d7db70d745a3f5b2ca55969919a6dc0 4084b984c91e50d2f684f461a373df297b59bc63 M	src
:040000 040000 92a07871a383eae1947956ad55d46e2a33e731a7 1ec1b24b49f49d81623cb56e7ec624c1767a661f M	tools
Comment 3 Chris Wilson 2014-01-23 16:31:52 UTC
Created attachment 92684 [details] [review]
Protect against fake CRTCs during initial probe

That's bizarre that it would take so long for this to explode. Looks like it has been broken for quite some time. :|
Comment 4 Nick Bowler 2014-01-23 21:12:37 UTC
Patch seems to work, thanks.
Comment 5 Chris Wilson 2014-01-23 21:17:52 UTC
Thanks,

commit 6914b3af7f26c7b61e4ee6ea3a6ccda5011fa4da
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jan 23 16:30:07 2014 +0000

    sna: Protect against fake CRTCs during initial probe
    
    Reported-by: Nick Bowler <nbowler@draconx.ca>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73981
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


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.