Totem player hangs when seeking video due to [gen9_mfd.c:649: gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.]

Bug #1818862 reported by Gerrit Niezen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Libva
New
Unknown
intel-vaapi-driver (Ubuntu)
Triaged
High
Unassigned

Bug Description

Totem player hangs as soon as I click on the bar at the bottom to seek to a specific time in an mp4 video.

Video in question can be found here: https://cdn.media.ccc.de/congress/2018/h264-hd/35c3-9370-eng-deu-Hacking_how_we_see_hd.mp4

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: totem 3.26.0-0ubuntu6.2
ProcVersionSignature: Ubuntu 4.15.0-45.48-generic 4.15.18
Uname: Linux 4.15.0-45-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 6 16:10:11 2019
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-12-08 (453 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
SourcePackage: totem
UpgradeStatus: Upgraded to bionic on 2018-05-02 (308 days ago)

Revision history for this message
Gerrit Niezen (gerrit-niezen) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. I can't reproduce the issue here. Do you get any error/warning on the standard output/journal log when getting the issue? Could you get a gdb backtrace?

Changed in totem (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Gerrit Niezen (gerrit-niezen) wrote :
Download full text (30.6 KiB)

If I run totem from the command-line, it has the following output before it hangs:

```
gerrit@gerrit-apollo:~/Downloads$ totem 35c3-9370-eng-deu-Hacking_how_we_see_hd.mp4

(totem:16739): Gtk-WARNING **: 21:07:52.632: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node slider owner GtkScale)

(totem:16739): Gtk-WARNING **: 21:07:52.649: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node slider owner GtkScale)
```

I then ran it with `gdb totem`, and when it froze I ctrl+C'ed out to get a backtrace:

```
^C
Thread 1 "totem" received signal SIGINT, Interrupt.
__lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
135 ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: No such file or directory.
(gdb) thread apply all backtrace

Thread 23 (Thread 0x7fff66896700 (LWP 17563)):
#0 0x00007ffff6340839 in syscall ()
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff768617f in g_cond_wait ()
    at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fffd58a0c7f in ()
    at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#3 0x00007ffff5d5cf79 in () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4 0x00007ffff7668ad0 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff7668105 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff213c6db in start_thread (arg=0x7fff66896700) at pthread_create.c:463
#7 0x00007ffff634688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 22 (Thread 0x7fff9f641700 (LWP 17562)):
#0 0x00007ffff6340839 in syscall ()
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff768617f in g_cond_wait ()
---Type <return> to continue, or q <return> to quit---
   .0
#2 0x00007ffff5d5d15b in () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3 0x00007ffff7668ad0 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff7668105 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff213c6db in start_thread (arg=0x7fff9f641700) at pthread_create.c:463
#6 0x00007ffff634688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 21 (Thread 0x7fff6d1ba700 (LWP 17561)):
#0 0x00007ffff6340839 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff768617f in g_cond_wait () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fffd589c803 in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#3 0x00007ffff5d5cf79 in () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4 0x00007ffff7668ad0 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff7668105 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff213c6db in start_thread (arg=0x7fff6d1ba700) at pthread_create.c:463
#7 0x00007ffff634688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 20 (Thread 0x7fff83fff700 (LWP 17559)):
#0 0x00007ffff6340839 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007ffff768617f in g_cond_wait () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff028a42b in () at /usr/lib/x86_64-linux-gnu/libgstbase-1....

Revision history for this message
Gerrit Niezen (gerrit-niezen) wrote :

That was playing an .mp4 file. When I play an .mov file, totem crashes instead of hangs, providing a hopefully more useful error message:

totem: gen9_mfd.c:649: gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.
Aborted

Revision history for this message
Gerrit Niezen (gerrit-niezen) wrote :

And here is the backtrace for that error:

```
#0 0x00007ffff6263e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6265801 in __GI_abort () at abort.c:79
#2 0x00007ffff625539a in __assert_fail_base (fmt=0x7ffff63dc7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffa5055b4c "0", file=file@entry=0x7fffa4d4bdf0 "gen9_mfd.c", line=line@entry=649, function=function@entry=0x7fffa4d4c500 "gen9_hcpd_get_reference_picture_frame_id") at assert.c:92
#3 0x00007ffff6255412 in __GI___assert_fail (assertion=0x7fffa5055b4c "0", file=0x7fffa4d4bdf0 "gen9_mfd.c", line=649, function=0x7fffa4d4c500 "gen9_hcpd_get_reference_picture_frame_id") at assert.c:101
#4 0x00007fffa4c14b41 in () at /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
#5 0x00007fffa4c14c97 in () at /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
#6 0x00007fffa4c16802 in () at /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
#7 0x00007fffa5c09820 in vaEndPicture () at /usr/lib/x86_64-linux-gnu/libva.so.2
#8 0x00007fffa66b6cf3 in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#9 0x00007fffa66cea7d in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#10 0x00007fffa66a9563 in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#11 0x00007fffa668dd12 in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#12 0x00007ffff55a9b71 in () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#13 0x00007ffff55b215f in gst_video_decoder_have_frame () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#14 0x00007fffa668c8da in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
#15 0x00007ffff55a9d33 in () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#16 0x00007ffff55ac6fc in () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#17 0x00007ffff55acd42 in () at /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#18 0x00007ffff5d285fb in () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#19 0x00007ffff5d30933 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#20 0x00007ffff5d1692b in gst_proxy_pad_chain_default () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#21 0x00007ffff5d285fb in () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#22 0x00007ffff5d30933 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#23 0x00007fffd589c514 in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#24 0x00007ffff5d5cf79 in () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#25 0x00007ffff7668ad0 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff7668105 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff213c6db in start_thread (arg=0x7fffa7154700) at pthread_create.c:463
#28 0x00007ffff634688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It may be a coincidence, but another Mesa Intel gen9 crash in totem is bug 1815236.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh. gen9_mfd.c and gen9_hcpd_get_reference_picture_frame_id are from intel-vaapi-driver.

As a workaround, please try:

  sudo apt remove i965-va-driver

Changed in totem (Ubuntu):
status: Incomplete → New
Revision history for this message
Gerrit Niezen (gerrit-niezen) wrote :

Hmm, so removing i965-va-driver did not do anything, even after a reboot. What did work is to remove gstreamer1.0-vaapi. What are the side effects of this? Does it basically just mean that anything using gstreamer would have HW acceleration disabled?

It's a little bit entertaining to see the comment in the affected code:
https://github.com/intel/intel-vaapi-driver/blob/master/src/gen9_mfd.c#L648-L649

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Can you clarify what "did not do anything" means? Because if you have uninstalled package i965-va-driver then it should be impossible to encounter the crash mentioned above. If not doing anything means that totem still hangs then the cause of the hang is likely something different again.

P.S. Please report the crash (assertion failure) at: https://github.com/intel/intel-vaapi-driver/issues

Changed in intel-vaapi-driver (Ubuntu):
status: New → Incomplete
Changed in totem (Ubuntu):
status: New → Incomplete
Revision history for this message
Gerrit Niezen (gerrit-niezen) wrote :

Hmm, not sure what I did wrong last time, but you're right: Uninstalling i965-va-driver does resolve the issue. I'll report the crash at the intel-vaapi-driver repo as suggested.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in totem:
status: Unknown → New
Changed in intel-vaapi-driver (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
summary: - Totem player hangs when seeking video
+ Totem player hangs when seeking video due to [gen9_mfd.c:649:
+ gen9_hcpd_get_reference_picture_frame_id: Assertion `0' failed.]
no longer affects: totem (Ubuntu)
affects: totem → libva
Revision history for this message
El jinete sin cabeza (ejsc) wrote :

See LP: #1821525

tags: added: disco
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.