radeon GPU lockup when using VLC and Firefox

Bug #1574130 reported by Thomas Jollans
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

When playing a video with VLC and running Firefox at the same time, the radeon driver consistently (reproducibly) locks up and crashes on my machine since upgrading to 16.04. I'm using a Radeon HD 6870.

This does not happen with other video players (totem, mpv). Tested with different video codecs and different window managers (gnome-shell, metacity).

When VLC starts, the following message is printed to dmesg:

[ 102.379520] [drm:btc_dpm_set_power_state [radeon]] *ERROR* rv770_restrict_performance_levels_before_switch failed

This is not the case with Totem.
When Firefox is started, or if Firefox had been running in the first place, a few seconds later it locks up:

[ 157.157196] radeon 0000:01:00.0: ring 5 stalled for more than 10104msec
[ 157.157212] radeon 0000:01:00.0: GPU lockup (current fence id 0x00000000000003b7 last fence id 0x00000000000003bb on ring 5)
[ 157.506657] radeon 0000:01:00.0: couldn't schedule ib
[ 157.506746] [drm:radeon_uvd_suspend [radeon]] *ERROR* Error destroying UVD (-22)!
[ 157.507820] radeon 0000:01:00.0: Saved 535 dwords of commands on ring 0.
[ 157.507840] radeon 0000:01:00.0: GPU softreset: 0x00000088
[ 157.507846] radeon 0000:01:00.0: GRBM_STATUS = 0xA0003828
[ 157.507852] radeon 0000:01:00.0: GRBM_STATUS_SE0 = 0x00000007
[ 157.507858] radeon 0000:01:00.0: GRBM_STATUS_SE1 = 0x00000007
[ 157.507863] radeon 0000:01:00.0: SRBM_STATUS = 0x200040C0
[ 157.507868] radeon 0000:01:00.0: SRBM_STATUS2 = 0x00000000
[ 157.507874] radeon 0000:01:00.0: R_008674_CP_STALLED_STAT1 = 0x00000000
[ 157.507879] radeon 0000:01:00.0: R_008678_CP_STALLED_STAT2 = 0x00010000
[ 157.507884] radeon 0000:01:00.0: R_00867C_CP_BUSY_STAT = 0x00000002
[ 157.507890] radeon 0000:01:00.0: R_008680_CP_STAT = 0x80010243
[ 157.507895] radeon 0000:01:00.0: R_00D034_DMA_STATUS_REG = 0x44C83D57
[ 157.520474] radeon 0000:01:00.0: GRBM_SOFT_RESET=0x00004001
[ 157.520532] radeon 0000:01:00.0: SRBM_SOFT_RESET=0x00008100
[ 157.521682] radeon 0000:01:00.0: GRBM_STATUS = 0x00003828
[ 157.521687] radeon 0000:01:00.0: GRBM_STATUS_SE0 = 0x00000007
[ 157.521692] radeon 0000:01:00.0: GRBM_STATUS_SE1 = 0x00000007
[ 157.521698] radeon 0000:01:00.0: SRBM_STATUS = 0x200000C0
[ 157.521703] radeon 0000:01:00.0: SRBM_STATUS2 = 0x00000000
[ 157.521708] radeon 0000:01:00.0: R_008674_CP_STALLED_STAT1 = 0x00000000
[ 157.521714] radeon 0000:01:00.0: R_008678_CP_STALLED_STAT2 = 0x00000000
[ 157.521719] radeon 0000:01:00.0: R_00867C_CP_BUSY_STAT = 0x00000000
[ 157.521724] radeon 0000:01:00.0: R_008680_CP_STAT = 0x00000000
[ 157.521730] radeon 0000:01:00.0: R_00D034_DMA_STATUS_REG = 0x44C83D57
[ 157.521750] radeon 0000:01:00.0: GPU reset succeeded, trying to resume
[ 157.544993] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0
[ 157.547598] [drm] PCIE GART of 1024M enabled (table at 0x0000000000274000).
[ 157.547689] radeon 0000:01:00.0: WB enabled
[ 157.547692] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff8800cf551c00
[ 157.547694] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0xffff8800cf551c0c
[ 157.549250] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0xffffc90002032118
[ 157.771955] [drm:r600_ring_test [radeon]] *ERROR* radeon: ring 0 test failed (scratch(0x8504)=0xCAFEDEAD)
[ 157.771978] [drm:evergreen_resume [radeon]] *ERROR* evergreen startup failed on resume

Software version information:

% cat /proc/version
Linux version 4.4.0-21-generic (buildd@lgw01-21) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016

% dpkg -l firefox vlc
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========================-==================-==================-=========================================================
ii firefox 45.0.2+build1-0ubu amd64 Safe and easy web browser from Mozilla
ii vlc 2.2.2-5 amd64 multimedia player and streamer

Revision history for this message
Thomas Jollans (tjol) wrote :
Revision history for this message
Thomas Jollans (tjol) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in vlc (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.6 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6-rc6-wily/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Thomas Jollans (tjol) wrote :
Download full text (10.1 KiB)

This also occurs with the mainline kernel version 4.6.0-040600rc6.201605012031.

As far as I can tell the dmesg output is identical, but I'm including it below in case there's something useful in there.

[ 135.984685] [drm:btc_dpm_set_power_state [radeon]] *ERROR* rv770_restrict_performance_levels_before_switch failed
[ 163.326451] radeon 0000:01:00.0: ring 5 stalled for more than 10056msec
[ 163.326466] radeon 0000:01:00.0: GPU lockup (current fence id 0x0000000000000127 last fence id 0x0000000000000129 on ring 5)
[ 163.712685] radeon 0000:01:00.0: couldn't schedule ib
[ 163.712779] [drm:radeon_uvd_suspend [radeon]] *ERROR* Error destroying UVD (-22)!
[ 163.713913] radeon 0000:01:00.0: Saved 1207 dwords of commands on ring 0.
[ 163.713933] radeon 0000:01:00.0: GPU softreset: 0x00000088
[ 163.713940] radeon 0000:01:00.0: GRBM_STATUS = 0xA0003828
[ 163.714000] radeon 0000:01:00.0: GRBM_STATUS_SE0 = 0x00000007
[ 163.714011] radeon 0000:01:00.0: GRBM_STATUS_SE1 = 0x00000007
[ 163.714020] radeon 0000:01:00.0: SRBM_STATUS = 0x200040C0
[ 163.714025] radeon 0000:01:00.0: SRBM_STATUS2 = 0x00000000
[ 163.714030] radeon 0000:01:00.0: R_008674_CP_STALLED_STAT1 = 0x00000000
[ 163.714036] radeon 0000:01:00.0: R_008678_CP_STALLED_STAT2 = 0x00010000
[ 163.714041] radeon 0000:01:00.0: R_00867C_CP_BUSY_STAT = 0x00000002
[ 163.714049] radeon 0000:01:00.0: R_008680_CP_STAT = 0x80010243
[ 163.714055] radeon 0000:01:00.0: R_00D034_DMA_STATUS_REG = 0x44C83D57
[ 163.719401] radeon 0000:01:00.0: GRBM_SOFT_RESET=0x00004001
[ 163.719457] radeon 0000:01:00.0: SRBM_SOFT_RESET=0x00008100
[ 163.720607] radeon 0000:01:00.0: GRBM_STATUS = 0x00003828
[ 163.720612] radeon 0000:01:00.0: GRBM_STATUS_SE0 = 0x00000007
[ 163.720617] radeon 0000:01:00.0: GRBM_STATUS_SE1 = 0x00000007
[ 163.720622] radeon 0000:01:00.0: SRBM_STATUS = 0x200000C0
[ 163.720627] radeon 0000:01:00.0: SRBM_STATUS2 = 0x00000000
[ 163.720632] radeon 0000:01:00.0: R_008674_CP_STALLED_STAT1 = 0x00000000
[ 163.720637] radeon 0000:01:00.0: R_008678_CP_STALLED_STAT2 = 0x00000000
[ 163.720642] radeon 0000:01:00.0: R_00867C_CP_BUSY_STAT = 0x00000000
[ 163.720647] radeon 0000:01:00.0: R_008680_CP_STAT = 0x00000000
[ 163.720652] radeon 0000:01:00.0: R_00D034_DMA_STATUS_REG = 0x44C83D57
[ 163.720671] radeon 0000:01:00.0: GPU reset succeeded, trying to resume
[ 163.743430] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0
[ 163.745989] [drm] PCIE GART of 1024M enabled (table at 0x0000000000274000).
[ 163.746080] radeon 0000:01:00.0: WB enabled
[ 163.746083] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff88031acd9c00
[ 163.746085] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0xffff88031acd9c0c
[ 163.747529] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0xffffc90002832118
[ 163.968633] [drm:r600_ring_tes...

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: kernel-bug-exists-upstream
Revision history for this message
penalvch (penalvch) wrote :

Thomas Jollans, please execute the following command only once, as it will automatically gather debugging information, in a terminal:
apport-collect 1574130

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

no longer affects: vlc (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
VF (fviktor) wrote :

I had this issue happening twice while playing a video in VLC this evening. I will try to reproduce it and execute apport-collect 1574130 to collect debugging information.

Revision history for this message
penalvch (penalvch) wrote :

VF (fviktor), it will help immensely if you filed a new report with Ubuntu, using the default repository kernel (not mainline/upstream/3rd party) via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

For more on why this is helpful, please see https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
VF (fviktor) wrote :

Tried to reproduce it and after 1.5 hours of playback I ended up with a similar video playback issue, but with different radeon error messages in dmesg. Reported as separate ticket: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1654088

Revision history for this message
Hey! (press-1p-start) wrote :

Hi.

I'm having this issue on Elementary and Xubuntu with the same card (HD6870), but Firefox doesn't need to be running.

Unity and Gnome apparently fixed the issue since vlc works really well.

Does anybody know where could be the issue on Elementary.

Setting the radeon.dpm=0 makes the problem go away, but i don't feel comfortable using it since it must put a lot of stress on the card.

I'm using kernel 4.10 with the 16.04 hwe stack on all the distro's and only Unity and Gnome work out of the box.

Thanks.

Revision history for this message
Philippe Coval (rzr) wrote :

I am not sure it is the same issue.

But I am also observing some similar logs on RV730 (pci=1002:949f):

```
[92559.678518] radeon 0000:01:00.0: ring 5 stalled for more than 10120msec
[92559.678522] radeon 0000:01:00.0: GPU lockup (current fence id 0x0000000000001b7a last fence id 0x0000000000001b7e on ring 5)
[92559.684574] radeon 0000:01:00.0: couldn't schedule ib
[92559.684606] [drm:radeon_uvd_suspend [radeon]] *ERROR* Error destroying UVD (-22)!
[92559.700536] radeon 0000:01:00.0: GPU reset succeeded, trying to resume
[92559.720783] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0
[92559.725647] [drm] PCIE GART of 1024M enabled (table at 0x000000000014C000).
[92559.725689] radeon 0000:01:00.0: WB enabled
[92559.725692] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000010000c00 and cpu addr 0x000000009a38e8b2
[92559.725693] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000010000c0c and cpu addr 0x00000000615c308c
[92559.726044] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x000000000005c598 and cpu addr 0x000000004c4e25b3
[92559.772306] [drm] ring test on 0 succeeded in 1 usecs
[92559.772312] [drm] ring test on 3 succeeded in 2 usecs
[92559.947215] [drm] ring test on 5 succeeded in 1 usecs
[92559.947219] [drm] UVD initialized successfully.
[92560.151093] [drm] ib test on ring 0 succeeded in 0 usecs
[92560.151124] [drm] ib test on ring 3 succeeded in 0 usecs
[92561.310619] [drm:uvd_v1_0_ib_test [radeon]] *ERROR* radeon: fence wait timed out.
[92561.310642] [drm:radeon_ib_ring_tests [radeon]] *ERROR* radeon: failed testing IB on ring 5 (-110).
[92561.310744] radeon 0000:01:00.0: couldn't schedule ib
[92561.310773] [drm:radeon_cs_ioctl [radeon]] *ERROR* Failed to schedule IB !
(...)
[92658.438703] radeon 0000:01:00.0: couldn't schedule ib
[92658.438722] [drm:radeon_cs_ioctl [radeon]] *ERROR* Failed to schedule IB !
[92682.871371] radeon 0000:01:00.0: couldn't schedule ib
[92682.871431] [drm:radeon_uvd_free_handles [radeon]] *ERROR* Error destroying UVD (-22)!
```

Kernel is 5.3.0-24-generic of Ubuntu 19.10

Any other investigation ongoing ?

Revision history for this message
penalvch (penalvch) wrote :

Philippe Coval (rzr), to provide the necessary debugging information for an investigation please file a new report via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

Revision history for this message
Philippe Coval (rzr) wrote :

Thanks @penalvch I submitted a new issue that does not involve VLC at:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1900854

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.