Bug 10351

Summary: X server refuses to start when XV is disabled
Product: xorg Reporter: JM Ibanez <jm>
Component: Driver/intelAssignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: high    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg logfile
none
Xorg core file
none
Also check that XV is enabled before calling xf86InitFBManagerLinear none

Description JM Ibanez 2007-03-20 02:56:39 UTC
The X server segfaults when XVideo is disabled in the config file. See the log files attached.
Comment 1 JM Ibanez 2007-03-20 02:57:45 UTC
Created attachment 9233 [details]
Xorg logfile
Comment 2 JM Ibanez 2007-04-05 01:10:41 UTC
Any news on this? I'll be testing this on RC4 of the driver, but so far it's still affecting me.
Comment 3 Eric Anholt 2007-04-09 14:10:45 UTC
I tried disabling XVideo in the config file, and the server continued to work fine (just with no XVideo).  This may require you to run X under the debugger from another machine to pinpoint where the failure is happening.
Comment 4 JM Ibanez 2007-04-13 03:59:04 UTC
Okay, I've checked it on my end; I logged in as root, set ulimit to allow core files, and made it dump core.

Running gdb on the core gives me the hint that it's complaining at LinearAlloc. I had forgotten that I put that in (sorry), and apparently, with the LinearAlloc option removed (and XVideo set to on), the X server runs.

HOWEVER, with LinearAlloc set and XVideo set off, the server does crash.
Comment 5 JM Ibanez 2007-04-13 04:06:38 UTC
Created attachment 9592 [details]
Xorg core file

Xorg core file
Comment 6 JM Ibanez 2007-04-13 04:07:41 UTC
Here's the back trace:

(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d6ddf0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7d6f641 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x080a6525 in ddxGiveUp () at xf86Init.c:1129
#4  0x081b9d08 in AbortServer () at log.c:409
#5  0x081ba256 in FatalError (f=0x81c47cc "Caught signal %d.  Server aborting\n")
    at log.c:555
#6  0x080c506d in xf86SigHandler (signo=11) at xf86Events.c:771
#7  <signal handler called>
#8  0xb7bb9048 in I830ScreenInit (scrnIndex=0, pScreen=0x8214b18, argc=2, 
    argv=0xbfd41034) at i830_driver.c:2548
#9  0x0807264e in AddScreen (pfnInit=0xb7bb7dd0 <I830ScreenInit>, argc=2, 
    argv=0xbfd41034) at main.c:784
#10 0x080a6c1e in InitOutput (pScreenInfo=0x81f3d60, argc=2, argv=0xbfd41034)
    at xf86Init.c:909
#11 0x08072df1 in main (argc=2, argv=0xbfd41034, envp=Cannot access memory at address 0x8
) at main.c:370
Comment 7 JM Ibanez 2007-04-13 05:16:13 UTC
More info: continuing with the core file, gdb tells me the value of pI830->xaa_linear is null.
Comment 8 JM Ibanez 2007-04-13 05:26:33 UTC
Apparently, in i830_memory.c:654, there's a check for XV; if the LinearAlloc option is set *and* XV is disabled, pI830->xaa_linear isn't malloc'd.
Comment 9 JM Ibanez 2007-04-13 05:29:40 UTC
Created attachment 9594 [details]
Also check that XV is enabled before calling xf86InitFBManagerLinear

This patch adds a check to ->XvEnabled; having LinearAlloc in the driver options when XV is disabled is *wrong*, I believe, and adding this check prevents the whole thing coming down in that case.
Comment 10 Michel Dänzer 2007-04-30 01:51:58 UTC
Fixed in the 2.0.0 release.

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.