Amarok freezes while playing music

Bug #1856745 reported by Fighter19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
amarok (Ubuntu)
New
Undecided
Unassigned

Bug Description

Amarok becomes unresponsive at the end of a certain aiff file.
The song plays until the end, but the UI stops every time exactly 20 seconds before it reaches the end.

lsb_release -rd:

```
Description: Ubuntu 18.04.3 LTS
Release: 18.04
```

apt-cache policy amarok:

```
amarok:
  Installed: 2:2.9.0-0ubuntu2
  Candidate: 2:2.9.0-0ubuntu2
  Version table:
 *** 2:2.9.0-0ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status
```

This might be an issue in gstreamer, but I'm unsure and as it affects amarok I think it's best to report it here first.

```
gstreamer1.0-plugins-base:
  Installed: 1.14.5-0ubuntu1~18.04.1
  Candidate: 1.14.5-0ubuntu1~18.04.1
  Version table:
 *** 1.14.5-0ubuntu1~18.04.1 500
        500 http://de.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.14.1-1ubuntu1~ubuntu18.04.2 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     1.14.0-2ubuntu1 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
```

EDIT: When using debug output, it outputs

(amarok:30707): GStreamer-CRITICAL **: 20:34:30.100: _gst_util_uint64_scale: assertion 'denom != 0' failed

However in debug mode, it doesn't freeze. The song starts fading 20 seconds before it ends at which the player also freezes.

EDIT2: Step to reproduce:
Create two AIFF files using FFMPEG and IDv3 metadata:
ffmpeg -i image1653x1653.png -i ~/sinewave3min.wav -write_id3v2 1 -c:a pcm_s16be -c:v mjpeg -map 1:a -map 0:v output.aif

Playback both of them sequentially.
Notice Amarok freezing at the second file.

Revision history for this message
Fighter19 (littlefighter1996) wrote :
description: updated
description: updated
description: updated
Revision history for this message
Myriam Schweingruber (myriam) wrote :

Is this only with one specific file or all files of this type? If it is just one file, I would actually suspect a corruption of that file

Revision history for this message
Fighter19 (littlefighter1996) wrote : Re: [Bug 1856745] Re: Amarok freezes while playing music

So far, I was only able to reproduce it with that one file.
But it's not 100% reproducible, which leads me to believe it's a bug.
When started with the "--debug" flag, it doesn't freeze and when
Amarok is currently focused, it doesn't always freeze.
When Amarok is minimized, without the debug flag active, it freezes
permanently on that one file.
I will try again today, to rule out other songs in the playlist. It's
a bit hard, considering seeking apparently also does not work.

On Tue, Dec 17, 2019 at 10:00 PM Myriam Schweingruber <email address hidden> wrote:
>
> Is this only with one specific file or all files of this type? If it is
> just one file, I would actually suspect a corruption of that file
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1856745
>
> Title:
> Amarok freezes while playing music
>
> Status in amarok package in Ubuntu:
> New
>
> Bug description:
> Amarok becomes unresponsive at the end of a certain aiff file.
> The song plays until the end, but the UI stops every time exactly 20 seconds before it reaches the end.
>
> lsb_release -rd:
>
> ```
> Description: Ubuntu 18.04.3 LTS
> Release: 18.04
> ```
>
> apt-cache policy amarok:
>
> ```
> amarok:
> Installed: 2:2.9.0-0ubuntu2
> Candidate: 2:2.9.0-0ubuntu2
> Version table:
> *** 2:2.9.0-0ubuntu2 500
> 500 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
> 100 /var/lib/dpkg/status
> ```
>
> This might be an issue in gstreamer, but I'm unsure and as it affects
> amarok I think it's best to report it here first.
>
> ```
> gstreamer1.0-plugins-base:
> Installed: 1.14.5-0ubuntu1~18.04.1
> Candidate: 1.14.5-0ubuntu1~18.04.1
> Version table:
> *** 1.14.5-0ubuntu1~18.04.1 500
> 500 http://de.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
> 100 /var/lib/dpkg/status
> 1.14.1-1ubuntu1~ubuntu18.04.2 500
> 500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
> 1.14.0-2ubuntu1 500
> 500 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
> ```
>
> EDIT: When using debug output, it outputs
>
> (amarok:30707): GStreamer-CRITICAL **: 20:34:30.100:
> _gst_util_uint64_scale: assertion 'denom != 0' failed
>
> However in debug mode, it doesn't freeze. The song starts fading 20
> seconds before it ends at which the player also freezes.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/amarok/+bug/1856745/+subscriptions

Revision history for this message
Fighter19 (littlefighter1996) wrote :

Today when trying to reproduce it, it didn't work any more with the same file as before, instead it froze on the last file of my playlist.
This time, the freeze occurred right at the end of a song.
I've created another core dump, showing the lock situation, if necessary I can upload it.

Revision history for this message
Fighter19 (littlefighter1996) wrote :

After digging a bit into it, I found that the main thread is waiting for another thread.
Then between these two threads (called "multiqueue6:src") a deadlock appears to happen.
I appended gdb output showing the backtrace of both the locked threads and the main thread.

Revision history for this message
Fighter19 (littlefighter1996) wrote :

I just tested the same files with rhythmbox, in order to identify whether it's an issue that comes from gstreamer or amarok.

The same threads seem to cause a deadlock in gstreamer.
Thus also making rhythmbox freeze.

description: updated
Revision history for this message
Fighter19 (littlefighter1996) wrote :

I tried the same version of amarok, without rebuilding, with the current master of gstreamer.
(gstreamer commit:8140da74ba474d2f218c0c85944c89d6be38e545)
(gst-plugin-bad commit:2a3205b294cb881bb1d60ad9bf7c9841031fb2f4)
(gst-plugins-base commit:940c9998e5cfffd90fade8a7f39f29a426e20460)

This version seems to work without causing any freezes.
It also allows to seek and rewind on said aiff files.

As a workaround I decided to remove the gstreamer phonon backend and install the vlc one instead.

This problem will probably "solve itself", with the newer gstreamer libraries in the next Ubuntu versions.

tl;dr:
This is most likely a gstreamer issue, that affects amarok, not an actual bug in amarok itself.

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.