Skip to contentSkip to conversation

New: Radeon uvd makes Flash player with VDPAU enabled to crash at vlVdpDecoderCreate

Bug 78297 [email protected] 1 participant 20 messages May 5, 2014 – May 7, 2014

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=78297

Priority: medium
Bug ID: 78297
Assignee: [email protected]
Summary: Radeon uvd makes Flash player with VDPAU enabled to
crash at vlVdpDecoderCreate
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: Other
Status: NEW
Version: 10.1
Component: Drivers/Gallium/r600
Product: Mesa

Created attachment 98475
--> https://bugs.freedesktop.org/attachment.cgi?id=98475&action=edit
Flash player crash using VDPAU with full-hd videos

I've enabled VDPAU support in flash player, and testing it with normal youtube videos (up to 720p) gives good results (congrats!).

However, once I switch to 1080p quality, the flash player crashes, and this seems to happen at the mesa vdpau driver level (for reference, this work using Intel, although that's a different story, but I can't test nouveau here).

Anyway, I'm attaching here the backtrace. I've got it using mesa stock from ubuntu, thus I've linked on the bt a paste of the exact files referenced by the debugger.
Let me know if you need further debugging.

This is what happens in Ubuntu 14.04, but the same seems to happens in Arch Linux (check https://bbs.archlinux.org/viewtopic.php?pid=1409666).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

[Bug 78297] Radeon uvd makes Flash player with VDPAU enabled to crash at vlVdpDecoderCreate

https://bugs.freedesktop.org/show_bug.cgi?id=78297

Marco Trevisan (Treviño) <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #98475|0                           |1

is obsolete| |

--- Comment #1 from Marco Trevisan (Treviño) <[email protected]> --- Created attachment 98480
--> https://bugs.freedesktop.org/attachment.cgi?id=98480&action=edit
Flash player crash using VDPAU with full-hd videos

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

Marco Trevisan (Treviño) <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|Radeon uvd makes Flash      |Radeon uvd makes VDPAU
                   |player with VDPAU enabled   |clients to crash at
                   |to crash at                 |vlVdpDecoderCreate with
                   |vlVdpDecoderCreate          |1080p videos
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #2 from Christian König <[email protected]> --- What version of mesa is that? From the backtrace it looks like allocating a buffers fails and then we crash because we want to clear the buffer.

But the line numbers look quite outdated to me.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #3 from Marco Trevisan (Treviño) <[email protected]> --- Created attachment 98482
--> https://bugs.freedesktop.org/attachment.cgi?id=98482&action=edit
VLC crash using VDPAU with full-hd videos

This is actually more generic than I thought, as it happens also with VLC and Mplayer.

Attaching the VLC backtrace here (very similar to flash and to mplayer).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #4 from Marco Trevisan (Treviño) <[email protected]> --- (In reply to comment #2)

Quoted 4 lines

What version of mesa is that? From the backtrace it looks like allocating a buffers fails and then we crash because we want to clear the buffer.

But the line numbers look quite outdated to me.

As said I've used the ubuntu debug version, so in the backtrace (the last one attached, not the one I deprecated) I've linked the relative files:

src/gallium/state_trackers/vdpau/decode.c: http://paste.ubuntu.com/7398157/
src/gallium/drivers/radeon/radeon_uvd.c: http://paste.ubuntu.com/7398148/

I might test this with a more recent version as well, but since this seems to happen in Arch as well, I suppose it's in git version too.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #5 from Christian König <[email protected]> --- (In reply to comment #4)

Quoted 6 lines

(In reply to comment #2)

Quoted 4 lines

What version of mesa is that? From the backtrace it looks like allocating a buffers fails and then we crash because we want to clear the buffer.

But the line numbers look quite outdated to me.

Quoted 8 lines

As said I've used the ubuntu debug version, so in the backtrace (the last one attached, not the one I deprecated) I've linked the relative files:

src/gallium/state_trackers/vdpau/decode.c: http://paste.ubuntu.com/7398157/
src/gallium/drivers/radeon/radeon_uvd.c: http://paste.ubuntu.com/7398148/

I might test this with a more recent version as well, but since this seems to happen in Arch as well, I suppose it's in git version too.

Source files doesn't help at all, I need a version number or better git hash of what revision this is.

It looks like allocating the decoded picture buffer works, but mapping it returns a NULL pointer. Is there any other error message? Kernel or stderr?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #6 from Marco Trevisan (Treviño) <[email protected]> --- (In reply to comment #5)

Quoted 2 lines

Source files doesn't help at all, I need a version number or better git hash of what revision this is.

So, as I reported the ubuntu package is based on mesa 10.1, and the same is on debian git, thus the git hash seems to be 4a86465 (and line numbers reported on these backports matches).

The full tree, with ubuntu patches applied, is available at
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/mesa/trusty/files
(or bzr branch lp:ubuntu/mesa).

Quoted 2 lines

It looks like allocating the decoded picture buffer works, but mapping it returns a NULL pointer. Is there any other error message? Kernel or stderr?

Mh, no I'm just getting this (on VLC):

VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876) [0x15adaa8] main interface error: no suitable interface module [0x13a9148] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
[0x7f4358c28e98] avcodec decoder: Using VA API version 0.35 for hardware decoding.
Bus Error (core dumped)

And pretty similar on mplayer (http://pastebin.ubuntu.com/7398928/), nothing more kernel side.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #7 from Christian König <[email protected]> --- (In reply to comment #6)

Quoted 3 lines

[0x7f4358c28e98] avcodec decoder: Using VA API version 0.35 for hardware decoding.
Bus Error (core dumped)

Oh! Well that's interesting. It's not an segmentation fault at all.

It means that the CPU can't properly access VRAM. Please provide full dmesg output.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #8 from Marco Trevisan (Treviño) <[email protected]> --- Created attachment 98499
--> https://bugs.freedesktop.org/attachment.cgi?id=98499&action=edit
dmesg

(In reply to comment #7)

Quoted 9 lines

(In reply to comment #6)

Quoted 3 lines

[0x7f4358c28e98] avcodec decoder: Using VA API version 0.35 for hardware decoding.
Bus Error (core dumped)

Oh! Well that's interesting. It's not an segmentation fault at all.

It means that the CPU can't properly access VRAM. Please provide full dmesg output.

Here you are...
Nothing seems directly related to this, though.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #9 from Christian König <[email protected]> --- That's the problem:

[    1.714537] [drm] Detected VRAM RAM=1024M, BAR=128M

Your PCI BAR is smaller than usually, for a REDWOOD 256M are normal. Going to hack up a patch for this.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #10 from Marco Trevisan (Treviño) <[email protected]> --- (In reply to comment #9)

Quoted 6 lines

That's the problem:

[    1.714537] [drm] Detected VRAM RAM=1024M, BAR=128M

Your PCI BAR is smaller than usually, for a REDWOOD 256M are normal. Going to hack up a patch for this.

Nice to hear!
But in these cases where there's not enough memory, shouldn't the vdpau driver to fail returning an error (making the client to fallback to software rendering), instead of crashing?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #11 from Christian König <[email protected]> --- (In reply to comment #10)

Quoted 5 lines

(In reply to comment #9)

Quoted 4 lines

That's the problem:

[    1.714537] [drm] Detected VRAM RAM=1024M, BAR=128M
Quoted 7 lines
Quoted 2 lines

Your PCI BAR is smaller than usually, for a REDWOOD 256M are normal. Going to hack up a patch for this.

Nice to hear!
But in these cases where there's not enough memory, shouldn't the vdpau driver to fail returning an error (making the client to fallback to software rendering), instead of crashing?

It's not the VDPAU driver that's failing here, it's the kernel.

When the kernel can't place a buffer into visible VRAM the buffer should be moved into GART instead for CPU access. But instead we just return a SIGBUS to the application effectively crashing it.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #12 from Christian König <[email protected]> --- Created attachment 98501
--> https://bugs.freedesktop.org/attachment.cgi?id=98501&action=edit
Possible fix.

Please try the attached kernel patch.

Only tested with 3.15-rc2, but should apply to 3.14 as well.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #13 from Marco Trevisan (Treviño) <[email protected]> --- (In reply to comment #12)

Quoted 6 lines

Created attachment 98501 [details] [review]
Possible fix.

Please try the attached kernel patch.

Only tested with 3.15-rc2, but should apply to 3.14 as well.

Thanks, it applies to 3.13 as well, but still same issue :(

Exactly same crash (http://paste.ubuntu.com/7405255/) and dmesg
(http://paste.ubuntu.com/7405259/)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #14 from Christian König <[email protected]> --- (In reply to comment #13)

Quoted 4 lines

(In reply to comment #12)

Quoted 3 lines

Created attachment 98501 [details] [review] [review] Possible fix.

Quoted 8 lines
Quoted 3 lines

Please try the attached kernel patch.

Only tested with 3.15-rc2, but should apply to 3.14 as well.

Thanks, it applies to 3.13 as well, but still same issue :(

Exactly same crash (http://paste.ubuntu.com/7405255/) and dmesg
(http://paste.ubuntu.com/7405259/)

Mhm, your dmesg looks like you are still booting the standard Ubuntu kernel:

[    0.000000] Linux version 3.13.0-24-generic (buildd@batsu) (gcc version

4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 (Ubuntu 3.13.0-24.47-generic 3.13.9)

Grub usually selects the kernel with the highest version number for boot. Please double check that you selected the self compiled version in grub while booting.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #15 from Marco Trevisan (Treviño) <[email protected]> --- (In reply to comment #14)

Quoted 8 lines

Mhm, your dmesg looks like you are still booting the standard Ubuntu kernel:

[    0.000000] Linux version 3.13.0-24-generic (buildd@batsu) (gcc version

4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 (Ubuntu 3.13.0-24.47-generic 3.13.9)

Grub usually selects the kernel with the highest version number for boot. Please double check that you selected the self compiled version in grub while booting.

Sorry, that wasn't the problem since I patched the ubuntu kernel itself, but I did forgot to update the initramfs, thus it was still loading the old module
-_-.

Anyway, once I fixed it this works like a charm!
Thanks a lot (and sorry again for the trouble)!

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

Marco Trevisan (Treviño) <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Product|Mesa                        |DRI
            Version|10.1                        |unspecified
          Component|Drivers/Gallium/r600        |DRM/Radeon
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

Christian König <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #16 from Christian König <[email protected]> --- Thanks for for the help.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#19 lore raw

[Bug 78297] Radeon uvd makes VDPAU clients to crash at vlVdpDecoderCreate with 1080p videos

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=78297

--- Comment #17 from Marco Trevisan (Treviño) <[email protected]> --- (In reply to comment #16)

Quoted 1 line

Thanks for for the help.

Thank you!

Once the patch gets into a drm branch, could you also please forward this to stable? As it would be very nice to get this included by distros as stable update.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel