Xorg freeze when starting Firefox

Bug #938981 reported by Sam Brightman
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

About 1 in 3 times that I start Firefox, my system freezes completely - the screen freezes. the system is unresponsive. There is usually a purple square in thetop left of the screen (not solid, but showing some of the background through). The following is the last log messages:

Feb 22 21:03:01 wildthing kernel: [73480.483062] audit_printk_skb: 48 callbacks suppressed
Feb 22 21:03:01 wildthing kernel: [73480.483071] type=1400 audit(1329940981.042:28): apparmor="DENIED" operation="open" parent=3671 profile="
/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/proc/modules" pid=3674 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=
0
Feb 22 21:03:01 wildthing kernel: [73480.490671] type=1400 audit(1329940981.050:29): apparmor="DENIED" operation="open" parent=3671 profile="
/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516124] type=1400 audit(1329940981.078:30): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516145] type=1400 audit(1329940981.078:31): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516155] type=1400 audit(1329940981.078:32): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516165] type=1400 audit(1329940981.078:33): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516198] type=1400 audit(1329940981.078:34): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516208] type=1400 audit(1329940981.078:35): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516217] type=1400 audit(1329940981.078:36): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:01 wildthing kernel: [73480.516227] type=1400 audit(1329940981.078:37): apparmor="DENIED" operation="open" parent=3671 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" name="/dev/ati/card0" pid=3674 comm="firefox" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=0
Feb 22 21:03:04 wildthing gnome-session[2897]: Gdk-WARNING: gnome-session: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.#012
Feb 22 21:03:04 wildthing acpid: client 1256[0:0] has disconnected
Feb 22 21:03:04 wildthing acpid: client connected from 3699[0:0]
Feb 22 21:03:04 wildthing acpid: 1 client rule loaded
Feb 22 21:03:04 wildthing kernel: [73484.189195] HDMI hot plug event: Pin=3 Presence_Detect=1 ELD_Valid=0
Feb 22 21:03:04 wildthing kernel: [73484.189220] HDMI status: Pin=3 Presence_Detect=0 ELD_Valid=0
Feb 22 21:03:05 wildthing kernel: [73485.401162] [fglrx] IRQ 45 Disabled
Feb 22 21:03:05 wildthing kernel: [73485.408254] init: lightdm main process (1225) terminated with status 1

Disabling Firefox hardware acceleration has not helped.

Whilst running ubuntu-bug the following was shown:

libGL error: open uki failed (Operation not permitted)
libGL error: reverting to (slow) indirect rendering
cat: /var/log/lightdm/:0.log: No such file or directory
rectory
libGL error: open uki failed (Operation not permitted)
libGL error: reverting to (slow) indirect rendering

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: xorg 1:7.6+7ubuntu7.1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: fglrx
.tmp.unity.support.test.0:

ApportVersion: 1.23-0ubuntu4
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,grid,imgpng,snap,place,vpswitch,session,gnomecompat,mousepoll,regex,resize,wall,move,unitymtgrabhandles,animation,expo,ezoom,workarounds,fade,scale,unityshell]
CompositorRunning: compiz
Date: Wed Feb 22 21:21:34 2012
DistUpgraded: Log time: 2011-11-15 03:39:11.612072
DistroCodename: oneiric
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, if not too technical
GpuHangFrequency: Several times a week
GpuHangReproducibility: Occurs more often under certain circumstances
GpuHangStarted: Immediately after installing this version of Ubuntu
GraphicsCard:
 ATI Technologies Inc RV770 [Radeon HD 4850] [1002:9442] (prog-if 00 [VGA controller])
   Subsystem: PC Partner Limited Sapphire HD 4850 512MB GDDR3 PCI-E Dual Slot Fansink [174b:e810]
JockeyStatus:
 xorg:fglrx_updates - ATI/AMD proprietary FGLRX graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
 xorg:fglrx - ATI/AMD proprietary FGLRX graphics driver (Proprietary, Enabled, In use)
MachineType: Gigabyte Technology Co., Ltd. GA-MA790XT-UD4P
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: root=UUID=70c57219-aee8-42ad-bbd7-b5b7dbc1e0a1 ro quiet splash
SourcePackage: xorg
Symptom: display
Title: Xorg freeze
UpgradeStatus: Upgraded to oneiric on 2011-11-15 (99 days ago)
dmi.bios.date: 07/12/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F8g
dmi.board.name: GA-MA790XT-UD4P
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF8g:bd07/12/2010:svnGigabyteTechnologyCo.,Ltd.:pnGA-MA790XT-UD4P:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA-MA790XT-UD4P:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: GA-MA790XT-UD4P
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz 1:0.9.6+bzr20110929-0ubuntu6.1
version.fglrx-installer: fglrx-installer N/A
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.26-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu3
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu7.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu2.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

Revision history for this message
Sam Brightman (sambrightman) wrote :
Revision history for this message
Sam Brightman (sambrightman) wrote :

This actually also happens when opening links from other programs (e.g. click link in Thunderbird). It doesn't seem to happen within Firefox itself, so possibly to do with the tray animation or redrawing fullscreen?

I answered that it happens a couple of times per week, but realistically this happens several times per day - I avoid it by keeping Firefox open for days at a time.

I have tried the updated fglrx driver. It appears to fail to install (known bug #873058) but I still end up with:

ii fglrx-updates 2:8.911-0ubuntu0.1

However, CCC reports 11.8 and the crashes still occur.

Crashes perhaps sometimes manifest as Xorg restarts (as if Ctrl-Alt-Backspace was pressed) - I get both hard lockups (more common) and X restarts under similar circumstances.

bugbot (bugbot)
affects: xorg (Ubuntu) → fglrx-installer (Ubuntu)
Revision history for this message
Sam Brightman (sambrightman) wrote :

Problem does not go away with a different profile. If X restarts instead of the machine hanging, I see this:

[ 417.197517] HDMI hot plug event: Pin=3 Presence_Detect=1 ELD_Valid=0
[ 417.197543] HDMI status: Pin=3 Presence_Detect=1 ELD_Valid=1
[ 417.610845] HDMI hot plug event: Pin=3 Presence_Detect=1 ELD_Valid=0
[ 417.610871] HDMI status: Pin=3 Presence_Detect=0 ELD_Valid=0
[ 419.133733] HDMI hot plug event: Pin=3 Presence_Detect=1 ELD_Valid=0
[ 419.133759] HDMI status: Pin=3 Presence_Detect=0 ELD_Valid=0
[ 419.309745] HDMI hot plug event: Pin=3 Presence_Detect=1 ELD_Valid=0
[ 419.309769] HDMI status: Pin=3 Presence_Detect=1 ELD_Valid=1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fglrx-installer (Ubuntu):
status: New → Confirmed
Revision history for this message
mr. dump (core-dump) wrote :

Same problem. Started to happen after the (automatic) upgrade to firefox 10, in my case on February 14.
As the OP, crashes sometimes manifest as Xorg restarts, other times system freezes completely, showing a black rectangle on top left of the screen. It is deterministic: it always the third time I open Firefox (tabs do not count)

firefox is 10.0.2+build1-0ubuntu0.10.04.1
fglrx is 2:8.930-0ubuntu1 (package build from ati installer)
ubuntu is 10.04 (32bits)

ATI Radeon HD5450 graphics card

I use 3D design tools like Blender with no problem.

kern.log is full of entries like:

Mar 6 10:12:53 titan kernel: [ 176.203479] type=1503 audit(1331039573.125:34): operation="open" pid=3013 parent=3011 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" requested_mask="::rw" denied_mask="::rw" fsuid=1000 ouid=0 name="/dev/ati/card0"

and

Mar 6 11:35:17 titan kernel: [ 5120.649544] type=1503 audit(1331044517.573:210): operation="open" pid=3011 parent=1 profile="/usr/lib/firefox-10.0.2/firefox{,*[^s][^h]}" requested_mask="r::" denied_mask="r::" fsuid=1000 ouid=1000 name="/proc/3011/smaps"

Revision history for this message
Jaap Versteegh (j-r-versteegh) wrote :

Have this issue on LMDE with legacy fglrx (8.97.100.3) on HD4950 and firefox 14.0.1. Occasional hangs, occasional X restarts.

Kern.log:
Sep 24 11:02:46 kraken kernel: [10824.115071] [fglrx] IRQ 45 Disabled
Sep 24 11:02:46 kraken mdm[3589]: WARNING: mdm_slave_xioerror_handler: Fatal X error - Restarting :0

Revision history for this message
Jaap Versteegh (j-r-versteegh) wrote :

... running compiz 0.8.4 as well.

Revision history for this message
Mihaly Biro (project-draco) wrote :

I do have this bug also since some time (ok, some months, maybe over a year). Recently I stumble upon Bug#926906 and Bug#712584, both on Firefox accessing the grafix card and AppArmor blocking the access. Since all my crashed seemed to be preceded by a ratelimit and some audit denies (like the poster above stated) I reasoned, if the bugs are connected in some weird way, lets say AppArmor block firefox from accessing /dev/ati/card0 and the overflow on ratelimit crashes the system ?
At least I now adapted my firefox apparmor profile and gave it access to /dev/ati/card0. The audit messages are gone and so is the ratelimit msg. I'll watch the situation and post back, if my crashes are gone.

For NVidia the bug was fixed with a new abstraction for apparmor.

Links to the bugs
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/926906
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/712584

Revision history for this message
Mihaly Biro (project-draco) wrote :
Download full text (3.8 KiB)

Ok, bad news. Had a severe crash on firefox today.
Good news: Its the first crash that was reported in the system message log, see the excerpt at the end.
First segfault in fglrx_dri.so happens at firefox startoff and has no consequences, firefox still firing up and running.
Second crash rebooted GNOME (or maybe Xorg itsself?)

Oct 7 16:18:49 ubuntu kernel: [ 2054.698418] type=1503 audit(1349619529.700:24): operation="open" pid=3012 parent=3010 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/modules"
Oct 7 16:18:49 ubuntu kernel: [ 2054.699412] type=1503 audit(1349619529.700:25): operation="open" pid=3012 parent=3010 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/ati/major"
Oct 7 16:18:49 ubuntu kernel: [ 2054.699436] type=1503 audit(1349619529.700:26): operation="open" pid=3012 parent=3010 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/ati/major"
Oct 7 16:18:49 ubuntu kernel: [ 2054.736432] firefox[3012]: segfault at ce0dcd2 ip 0ce0dcd2 sp bfe6a06c error 4 in fglrx_dri.so[18c79000+1976000]
Oct 7 16:19:05 ubuntu kernel: [ 2070.980223] type=1503 audit(1349619545.980:27): operation="open" pid=3063 parent=1 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/modules"
Oct 7 16:19:05 ubuntu kernel: [ 2070.981657] type=1503 audit(1349619545.984:28): operation="open" pid=3063 parent=1 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/ati/major"
Oct 7 16:19:05 ubuntu kernel: [ 2070.981688] type=1503 audit(1349619545.984:29): operation="open" pid=3063 parent=1 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/ati/major"
Oct 7 16:19:06 ubuntu kernel: [ 2071.090196] firefox[3063]: segfault at 1829acd2 ip 1829acd2 sp bfcb0fdc error 4
Oct 7 16:19:35 ubuntu kernel: [ 2100.446244] type=1503 audit(1349619575.448:30): operation="open" pid=3072 parent=3070 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/modules"
Oct 7 16:19:35 ubuntu kernel: [ 2100.508865] type=1503 audit(1349619575.512:31): operation="open" pid=3072 parent=1 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/ati/major"
Oct 7 16:19:35 ubuntu kernel: [ 2100.508892] type=1503 audit(1349619575.512:32): operation="open" pid=3072 parent=1 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/proc/ati/major"
Oct 7 16:19:35 ubuntu kernel: [ 2100.560625] firefox[3072]: segfault at a876cd2 ip 0a876cd2 sp bfa77d9c error 4 in fglrx_dri.so[175cb000+1976000]
Oct 7 16:20:04 ubuntu pulseaudio[3262]: pid.c: Stale PID file, overwriting.
Oct 7 16:20:13 ubuntu kernel: [ 2138.758415] type=1503 audit(1349619613.759:33): operation="open" pid=3361 parent=3359 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" reque...

Read more...

Revision history for this message
Mihaly Biro (project-draco) wrote :

After adding /proc/modules and /proc/ati/major as readable to the apparmor profile there are no more segfaults logged in the syslog. Maybe this time it works?

Revision history for this message
Mihaly Biro (project-draco) wrote :

This fix seems to work. Since adapting the Apparmor profile to the ATI grafics card as described above I had no single crash of Firefox nor Gnome neither on FF startup nor on opening links from Thunderbird. Everything is working as its supposed to be.
All messages in the syslogs are clean. Seems like this case at least on my machine is solved.

Revision history for this message
linas (linasvepstas) wrote :

Similar/same problem, except
1) I do not have ati, I have nvidia
2) do not have apparmor, as far as I know

System hangs, sometimes in middle of night, sometimes in middle of day. The last message in syslog is:

kernel: [13054.112526] type=1503 audit(1349642278.078:46): operation="open" pid=5234 parent=5145 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::rw" denied_mask="::rw" fsuid=1002 ouid=0 name="/dev/nvidiactl"

twice; here's another:
kernel: [28822.977516] type=1503 audit(1350612822.928:39): operation="open" pid=4869 parent=4831 profile="/usr/lib/firefox/firefox{,*[^s][^h]}" requested_mask="::rw" denied_mask="::rw" fsuid=1003 ouid=0 name="/dev/nvidiactl"

For the other two crashes, the very last thing in syslog is: NVRM: Xid (0001:00): 6, PE0001 which comes 8 seconds after the above.

This all started happening a few weeks ago. Running lucid.

Revision history for this message
Mihaly Biro (project-draco) wrote :

The messages are produced by Apparmor, so its running.
Check for the presence of profile abstractions/nvidia
and open the profile usr.bin.firefox if the nvidia profile is included #include <abstractions/nvidia>

Apparmor profiles are located in /etc/apparmor.d/ and subdirectories.

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.