Bug 5068

Summary: xorg-server 0.99.3-r1 segfaults when try to start
Product: xorg Reporter: Torsten Krah <krah.tm>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: highest CC: chewi, dberkholz, egmont, erik.andren, yvasilev
Version: 6.99.99.902 (7.0 RC2)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Torsten Krah 2005-11-17 05:11:59 UTC
I tried to get modular X working and merged Xorg7RC2 ( Kernel 2.6.14.2 )

When i want to start X it segfaults immidiately. No log is written ( its empty
). With oder without xorg.conf, it segfaults.


Program received signal SIGSEGV, Segmentation fault.
0x081f9b6b in ConvertAddr (saddr=0x0, len=0xbfbb83c4, addr=0xbfbb83c0)
    at access.c:1861
1861        switch (saddr->sa_family)
(gdb) bt
#0  0x081f9b6b in ConvertAddr (saddr=0x0, len=0xbfbb83c4, addr=0xbfbb83c0)
    at access.c:1861
#1  0x081f87dc in DefineSelf (fd=1) at access.c:983
#2  0x081fb30d in CreateWellKnownSockets () at connection.c:432
#3  0x0806f611 in main (argc=1, argv=0xbfbb8524, envp=0xbfbb852c) at main.c:318

Program received signal SIGSEGV, Segmentation fault.
0x081f9b6b in ConvertAddr (saddr=0x0, len=0xbfdfd214, addr=0xbfdfd210)
    at access.c:1861
1861        switch (saddr->sa_family)
(gdb) frame 1
#1  0x081f87dc in DefineSelf (fd=1) at access.c:983
983             family = ConvertAddr(ifr->ifa_addr, &len, (pointer *)&addr);
(gdb) print *ifr
$1 = {ifa_next = 0x824d1e0, ifa_name = 0x824d1cc "irda0", ifa_flags = 128,
  ifa_addr = 0x0, ifa_netmask = 0x0, ifa_ifu = {ifu_broadaddr = 0x0,
    ifu_dstaddr = 0x0}, ifa_data = 0x824d6c4}
(gdb)

So it seems, irda0 - and so teql0 ( i use both devices ), get a null pointer to
saddr and so xorg segfaults.
I disabled irda0 and teql0 to see it it works and there it works.

The irda0 Device was configured properly and functioning. Before and after the
Crash. 

irda0     Protokoll:IrLAP  Hardware Adresse 00:00:00:00
          UP RUNNING NOARP  MTU:2048  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:8
          RX bytes:330 (330.0 b)  TX bytes:2640 (2.5 Kb)

It works before and after the crash, irdadump found my handy before and after crash.

The teql0 is configured properly, although its not in use at the moment.

Before crash and after crash same state so far i can say:

teql0     Protokoll:UNSPEC  Hardware Adresse
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet Adresse:10.0.0.0  Bcast:0.0.0.0  Maske:255.255.255.254
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Program received signal SIGSEGV, Segmentation fault.
0x081f9b6b in ConvertAddr (saddr=0x0, len=0xbffe4e74, addr=0xbffe4e70) at
access.c:1861
1861        switch (saddr->sa_family)
(gdb) frame 1
#1  0x081f87dc in DefineSelf (fd=1) at access.c:983
983             family = ConvertAddr(ifr->ifa_addr, &len, (pointer *)&addr);
(gdb) print *ifr
$1 = {ifa_next = 0x824d220, ifa_name = 0x824d20c "teql0", ifa_flags = 195,
ifa_addr = 0x0, ifa_netmask = 0x0, ifa_ifu = {
    ifu_broadaddr = 0x0, ifu_dstaddr = 0x0}, ifa_data = 0x824d788}


Both devices are there in same configuration in 6.8.x and there it works fine.

best regards
Comment 1 Donnie Berkholz 2005-11-17 08:09:34 UTC
Just FYI, the -r1 indicates that we applied
http://cvs.freedesktop.org/xorg/xserver/xorg/configure.ac?r1=1.124&r2=1.125 to
fix XKB.
Comment 2 Torsten Krah 2005-11-17 15:08:55 UTC
(In reply to comment #1)
> Just FYI, the -r1 indicates that we applied
> http://cvs.freedesktop.org/xorg/xserver/xorg/configure.ac?r1=1.124&r2=1.125 to
> fix XKB.

yes, the xkb fix is applied, the -r1 should indicate that.

best regards
Comment 3 Pekka Pietikainen 2005-11-17 20:47:39 UTC
-nolisten tcp was a workaround for me. The device I had with ifa_addr = NULL was
ppp0.
Comment 4 James Le Cuirot 2005-12-01 07:32:00 UTC
I can confirm that I also experience this problem when I have a PPP interface up 
for VPN. -nolisten tcp also works for me as a workaround.
Comment 5 Egmont Koblinger 2005-12-11 02:18:40 UTC
Detto for me. A simple "X" command issued on the Linux console leads to an
immediate segfault if I have my adsl connection on. If I stop this connection,
"X" starts perfectly. Or alternatively a "-nolisten tcp" helps.
According to ltrace, the segfault occurs inside a getifaddrs() call.
Comment 6 Jan de Groot 2005-12-31 06:21:38 UTC
Looks like the patch in this bug could solve the problem:
https://bugs.freedesktop.org/show_bug.cgi?id=5218
Comment 7 Mike A. Harris 2006-02-06 17:47:18 UTC
This is probably a dupe of bug #5218.  (or vice versa if preferred)
Comment 8 Erik Andren 2006-04-20 06:02:27 UTC
Torsten could you either:
a. try a more current version of xorg and see if it resolves this issue
b. try the patch in bug #5218

and see if anyone of those resolves your issue
Comment 9 Erik Andren 2006-05-21 19:08:04 UTC
Ping!
Comment 10 Egmont Koblinger 2006-05-22 22:45:24 UTC
Yes, that patch solves my problem described in a previous comment here.
Comment 11 Erik Andren 2006-05-31 04:55:35 UTC
Torsten, did the suggestions listed here solve your issue?
Comment 12 Timo Jyrinki 2007-02-22 14:28:37 UTC
Marking broken (status null/blank) bugs in xorg with no activity in a long time as fixed. Please reopen if you think it's necessary, but first do a search if a similar bug report is already filed and in a NEW/ASSIGNED state. These bugs do not currently show in most search results as they do not have any status.

Sorry for this janitorial spam, you know where to send hate mails to when your inbox gets full of bugs you're subscribed to.

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.