GCC SSP breaks xorg-server

Bug #54650 reported by Johan Van Hellemont
8
Affects Status Importance Assigned to Milestone
gcc-4.1 (Ubuntu)
Invalid
Undecided
Unassigned
xorg-server (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

Hello,

I installed Knot1 on my laptop,install wents fine,rebooted the system and when
it comes as X start the system freezed.
I see only a white screen with the textbox for gdm,no response from my touchpad,
Ctrl+Alt+Back not working and can not switch through system consoles.
Hard shutdown and booted in single-user mode and changed the driver ati to vesa,
rebooted again and gdm loads fine.The system is up-to-date.
The same problem happens with the daily builds 28/07 and 31/07.
If you need more information,just ask ;)

Thanks,
Johan

Revision history for this message
Johan Van Hellemont (johan-van-hellemont) wrote :
Revision history for this message
Johan Van Hellemont (johan-van-hellemont) wrote :
Revision history for this message
Johan Van Hellemont (johan-van-hellemont) wrote :

0000:00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
0000:00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
0000:00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
0000:00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
0000:00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
0000:00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
0000:00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
0000:00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
0000:00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
0000:00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]
0000:02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
0000:02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
0000:02:01.0 Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)

Revision history for this message
Matt Zimmerman (mdz) wrote :

I see the same on my ThinkPad T42 with the same Radeon Mobility M7 LW that Johan has. It doesn't happen quite 100% of the time, and if the server manages to start up, it works fine. If I start the server with startx rather than gdm, that doesn't crash, so this is somehow triggered by something gdm does.

Changed in xserver-xorg-video-ati:
importance: Untriaged → High
status: Unconfirmed → Confirmed
Revision history for this message
Matt Zimmerman (mdz) wrote :

Here's a screenshot showing the problem. It's difficult to see, but a bit below the mouse cursor you can see that the text entry box for gdm has been drawn. The rest of the screen is a lighter color.

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Edgy] System freezes when loading gdm

Desktop team: can you think of anything gdm might be doing at this time to trigger this bug?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Oh, it's also worth noting that this was happening to me with xserver-xorg-driver-ati as well, so the problem predates that upgrade and may not be this package's fault at all.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Can anyone confirm this problem on Debian? I have a sneaking suspicion it could be SSP-related

Revision history for this message
Matt Zimmerman (mdz) wrote :

On a hunch, I rebuilt xorg-server and xserver-xorg-video-ati with -fno-stack-protector, and I am completely unable to reproduce the problem with those binaries. I restarted gdm 5 times from single-user mode and also rebooted the system 5 times. Given that the problem was extremely repeatable before, this is fairly compelling.

It's possible that this could explain my mysterious bug #54726 as well (different machine), though that one is not repeatable so it's difficult to tell.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I'm uploading my binary packages built with -fno-stack-protector to http://people.ubuntu.com/~mdz/bugs/54650/

Johan, could you try them and see if this corrects the problem for you as well?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Further testing:

I backed out to the xserver-xorg-video-ati in the archive, and the problem remained unreproducible. I backed out to the xserver-xorg-core in the archive, and the problem became easily reproducible again. So I think it should be sufficient to build only xorg-server with -fno-stack-protector. I'm uploading that change now, and Matthias has added this bug to the list of known SSP issues for further investigation:

https://wiki.ubuntu.com/GccSsp

Revision history for this message
Matt Zimmerman (mdz) wrote :

xorg-server (1:1.1.1-0ubuntu3) edgy; urgency=low

  * Build with -fno-stack-protector (see LP#54650)

 -- Matt Zimmerman <email address hidden> Mon, 31 Jul 2006 16:28:59 -0700

Changed in xserver-xorg-video-ati:
status: Confirmed → Fix Released
Revision history for this message
Johan Van Hellemont (johan-van-hellemont) wrote :

Matt,

First a big thank you for this.
The update to xorg-server 1.1.1-0ubuntu3 works perfect here !
Glad i'am back on my T42.
Rebooted well 10 times and the server starts fine,first I thought that my
video card was broken but I have a dual boot with dapper but that was not possible.
Glad i'am back on my T42
I see on your webpage that you uploaded a packages xserver-xorg-video-ati_6.6.1-0ubuntu1_i386.deb,must I test this binary or leave it now
this way?

Thanks again !
Johan

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 54650] Re: GCC SSP breaks xorg-server

On Tue, Aug 01, 2006 at 06:35:30PM -0000, Johan Van Hellemont wrote:
> First a big thank you for this.
> The update to xorg-server 1.1.1-0ubuntu3 works perfect here !
> Glad i'am back on my T42.
> Rebooted well 10 times and the server starts fine,first I thought that my
> video card was broken but I have a dual boot with dapper but that was not possible.
> Glad i'am back on my T42
> I see on your webpage that you uploaded a packages xserver-xorg-video-ati_6.6.1-0ubuntu1_i386.deb,must I test this binary or leave it now
> this way?

That's all I needed; thanks for helping with the testing.

--
 - mdz

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Matt, could you try building the server in 7.04 without that option to see if it could be dropped?

Revision history for this message
Matt Zimmerman (mdz) wrote :

I'd like to hear from the toolchain about this; since the problem was intermittent, we can't necessarily take a success report to mean that the option is now safe. If a problem was identified and fixed in GCC, we should feel confident in disabling the workaround, but otherwise, I'm inclined to be conservative and leave it as-is.

Revision history for this message
Matthias Klose (doko) wrote :

I'm unware of changes in gcc-4.1; we updated glibc to a newer version in the meantime.

Revision history for this message
Matthias Klose (doko) wrote :

Setting to "Incomplete". As discussed on the distro sprint in 2007/07, this should be rechecked in gutsy with the current gcc-4.1 and gcc-4.2.

Changed in xserver-xorg-video-ati:
status: Fix Released → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

I've completed a build using gcc 4.1.3 on Gutsy without the -fno-stack-protector option. I don't have an ATI system I can test this on, but it seems to work alright on my -nv system.

http://people.ubuntu.com/~bryce/Testing/xorg-server-stack-protect/xserver-xorg-core_1.3.0.0.dfsg-6ubuntu3~ppa1_i386.deb

Johan and/or Matt, could you try the above deb and see if the issue is still present?

Bryce

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Wed, Aug 01, 2007 at 06:37:56AM -0000, Bryce Harrington wrote:
> I've completed a build using gcc 4.1.3 on Gutsy without the -fno-stack-
> protector option. I don't have an ATI system I can test this on, but it
> seems to work alright on my -nv system.
>
> http://people.ubuntu.com/~bryce/Testing/xorg-server-stack-protect
> /xserver-xorg-core_1.3.0.0.dfsg-6ubuntu3~ppa1_i386.deb
>
> Johan and/or Matt, could you try the above deb and see if the issue is
> still present?

I don't have the system in question anymore, so I can't confirm.

--
 - mdz

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I've built xorg-server_1.3.0.dfsg-12ubuntu1 locally, without -fno-stack-protector, and it works fine with my radeon 8500.

Revision history for this message
Johan Van Hellemont (johan-van-hellemont) wrote :

Bryce,

I tryed the above deb from you on my laptop with an Radeon Mobility M300 and everything works fine here.
Which tests can do I more?

ps:sorry for the late reply,wash on vacation.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

This is now working alright for a number of people without compiling the server without ssp. Gutsy already has a version without -fno-stack-protection flag.

Changed in gcc-4.1:
status: New → Invalid
Changed in xserver-xorg-video-ati:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.