Music playback randomly stops working

Bug #1398560 reported by Bogdan
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Canonical Phone Foundations
Media Hub
Invalid
High
Jim Hodapp
qtubuntu-camera
New
Undecided
Unassigned
pulseaudio (Ubuntu)
Won't Fix
Medium
Unassigned
ubuntu-touch-session (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntu-touch-session (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

While listening to music media-hub stops randomly. Restart of the job and reboots don't fix it. Video works fine. Also, 320 kbps music pauses randomly, might be related. I have also talked about this on the mailing list.

This is probably a side effect of bug 1438486 (or similar), as pulse is working but without sound just for the multimedia related roles.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

What device are you using and what version of Ubuntu Touch (distro and build number)? I'm trying to reproduce it. Also, you said that video is always fine even when music stops playing?

summary: - Media-hub randomly stops working
+ Music playback randomly stops working
Revision history for this message
Bogdan (boghison) wrote :

I'm using the Nexus 4 with 14.10 r10. I could make a video to show the issue if you want.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Sure, a video of this would be great.

Revision history for this message
Bogdan (boghison) wrote :

Too late. My Nexus is dead, sorry :(

Revision history for this message
Sujeevan Vijayakumaran (svij) wrote :

Hi,

I've a similar problem, not sure if this is the same problem though.

I've got the bq aquaris from yesterdays Ubuntu Phone Launch Event and I can't hear the sound of music/videos/youtube. I only hear a random noise. The sound is actually working for notification and keyboard sound. It was working yesterday, but somehow stopped working later.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Additional discussion from the mailing list in late Nov:

Bogdan:
So, everything was fine today, until I noticed that the sound doesn't work. Alarms and ringtones work fine, but media sounds don't (such as Music). Moreover, there's no popup showing the volume change, although the icon in the notification panel gets updated. I am on the latest image (rtm, 10).

Sergio:
Yeah, I'm seeing the same

This is in the music log:
virtual QMediaService* AalServicePlugin::create(const QString&) "org.qt-project.
qt.mediaplayer"
Creating a new static Service instance
Failed to start a new media-hub player session: org.freedesktop.DBus.Error.NoRe
ply: Did not receive a reply. Possible causes include: the remote application di
d not send a reply, the message bus security policy blocked the reply, the reply
 timeout expired, or the network connection was broken.
Failed to create a new media player backend. Video playback will not function.
 (new media-hub landed on 11.27 http://people.canonical.com/~ogra/touch-image-stats/34.changes)

Yeah, I see it on every other boot, I'm also seeing this in media-hub logs:

client pkgname: com.ubuntu.music
uri: file:///home/phablet/Music/A/B.mp3
Client can access content in ~/Music or ~/Videos
void gstreamer::Playbin::reset_pipeline()

but when it works I see this added to that above:
Found audio content
void core::ubuntu::media::ServiceSkeleton::Private::handle_pause_other_sessions(const Ptr&)
video_height: 0, video_width: 0
Requested new system wakelock
play

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

from svij:
phablet@ubuntu-phablet:~$ cat .cache/upstart/media-hub.log
audio_sink: pulsesink
video_sink: mirsink
Creating a new Engine instance in gstreamer::Engine::Engine()
Audio stream role: props,media.role=multimedia
virtual void core::ubuntu::media::PlayerImplementation::stop()
stop
Client allowed access since it's unconfined
filename: file:///home/phablet/Videos/com.ubuntu.camera/video20150206_170416626.mp4
Found video content
Creating video sink for texture_id: 1
void core::ubuntu::media::ServiceSkeleton::Private::handle_pause_other_sessions(const Ptr&)
video_height: 1080, video_width: 1920
Requested new display wakelock
play
pause
void core::ubuntu::media::PlayerImplementation::Private::clear_wakelock(const core::ubuntu::media::PlayerImplementation::Private::wakelock_clear_t&)
Clearing display wakelock

Changed in media-hub:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Jim Hodapp (jhodapp)
Changed in canonical-devices-system-image:
status: New → Confirmed
importance: Undecided → High
milestone: none → ww09-2015
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

not sure if bug #1379881 is related

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Note re comment #5 that audio did work properly the previous day..

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

If alarms and ringtones are playing fine, it means the core part of the audio stack is fine, might be an issue with the volume side of things (e.g. pulseaudio).

When you reproduce the issue, please run the following and paste the output: 'pactl list sink-inputs'

This will list all the active inputs and the current volume for them.

Another thing to try:
1 - Save your ~/.config/pulse (in case it's broken)
2 - Erase ~/.config/pulse
3 - Reboot and retry

Revision history for this message
Sujeevan Vijayakumaran (svij) wrote :

Paste of 'pactl list sink-inputs':

Sink Input #0
        Driver: protocol-native.c
        Owner Module: 9
        Client: 5
        Sink: 0
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "2" format.channel_map = "\"front-left,front-right\""
        Corked: yes
        Mute: no
        Volume: 0: 100% 1: 100%
                0: 0.00 dB 1: 0.00 dB
                balance 0.00
        Buffer Latency: 31383 usec
        Sink Latency: 0 usec
        Resample method: n/a
        Properties:
                media.name = "QtPulseSample-3356-10983120"
                application.name = "QtPulseAudio:3356"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "28"
                media.role = "feedbacksound"
                application.process.id = "3356"
                application.process.user = "phablet"
                application.process.host = "ubuntu-phablet"
                application.process.binary = "maliit-server"
                application.language = "en_US.UTF-8"
                application.process.machine_id = "3a31d00d152a4af8af0c9cff59f63bce"
                application.process.session_id = "c1"
                module-stream-restore.id = "sink-input-by-media-role:feedbacksound"
----

The bug was still present until now. Deleting ~/.config/pulse and rebooting helped, so I don't have this issue anymore. But I still have no idea how I could reproduce it…

Revision history for this message
Jim Hodapp (jhodapp) wrote :

The last part is good to know, somehow you ended up with a corrupted pulse config file. Will need to see if we can reproduce how you got into that state.

Changed in media-hub:
status: Confirmed → Invalid
Revision history for this message
Sujeevan Vijayakumaran (svij) wrote :

Everything I did (well the parts which I remember):

 * Started a recording of a video
 * Played that video → audio was working
 * Recorded a couple of videos
 * Checked the video a few hours later → no sound

I don't remember anything else, which could have corrupted those files. I didn't play any other music/videos before that bug occured.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

I was able to reproduce this issue by doing the following:

1. Open camera-app
2. I recorded a single video, then swiped to the camera-roll to preview it, then played it in mediaplayer-app by tapping on it in the camera-roll.
3. I did #2 again for another video.
4. Then I started recording several videos in a row without trying to view them after each recording. Once I recorded my 5th video, I noticed that the thumbnails were no longer appearing in the camera-roll. I also noticed that playback no longer worked if I tried to play any of these videos.
5. Once I removed ~/.config/pulse and rebooted, thumbnailing and playback of these videos all started working again.

So it seems that we are getting a corrupted pulse config from video recording.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Adding qtubuntu-camera as possible source of the bug, but it's unclear at this point what component is exactly responsible for the issue.

affects: pulseaudio → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
assignee: nobody → Ricardo Salveti (rsalveti)
Changed in canonical-devices-system-image:
assignee: nobody → Michael Frey (mfrey)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

This attachment has the broken pulse config.

Changed in canonical-devices-system-image:
milestone: ww09-2015 → ww13-2015
Jim Hodapp (jhodapp)
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Changed in canonical-devices-system-image:
assignee: Michael Frey (mfrey) → Canonical Phone Foundations (canonical-phonedations-team)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

making critical to see if we can ota

Changed in canonical-devices-system-image:
milestone: ww13-2015 → ww13-ota
importance: High → Critical
Changed in pulseaudio (Ubuntu):
importance: Undecided → Critical
Changed in pulseaudio (Ubuntu):
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Trying to reproduce but I'm still unable to get the issue described at comment #14. I was able to get the system to hang for a bit, but that was because mediascanner crashed. It seems that at one point media-hub wasn't able to accept new connections (couldn't play music via music-app).

The problem is that it worked fine after a reboot, so not really pulse specific. I also tested the pulseconfig described by comment #16, but audio is also working as expected (if the file was corrupted or with the multimedia role muted, it would show up when using such configs).

Will keep trying to reproduce the issue (this is latest RTM/krillin).

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

I was finally able to reproduce the issue I saw before with media-hub, following the steps described by comment 14. After recording a few videos and trying to play one of them, I got media-hub to consume 100% of my cpu, blocking the loop and blocking any new connections as consequence.

Strace shows it's busy in epoll_wait:
epoll_wait(6, {}, 128, 0) = 0
sendmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"l\2\1\1\20\0\0\0T\5\0\0\37\0\0\0\6\1s\0\6\0\0\0:1.107\0\0"..., 48}, {"\1x\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 64
epoll_wait(6, {{EPOLLIN, {u32=33486680, u64=33486680}}}, 128, -1) = 1
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"l\1\0\0011\0\0\0\25\5\0\0\247\0\0\0\1\1o\0%\0\0\0/core/ub"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 233
recvmsg(4, 0xbe938130, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(6, EPOLL_CTL_MOD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP|EPOLLET, {u32=33486680, u64=33486680}}) = 0
epoll_wait(6, {}, 128, 0) = 0
sendmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"l\2\1\1\20\0\0\0U\5\0\0\37\0\0\0\6\1s\0\6\0\0\0:1.107\0\0"..., 48}, {"\1x\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 64
epoll_wait(6, {{EPOLLIN, {u32=33486680, u64=33486680}}}, 128, -1) = 1
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"l\1\0\0011\0\0\0\26\5\0\0\247\0\0\0\1\1o\0%\0\0\0/core/ub"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 233
recvmsg(4, 0xbe938130, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(6, EPOLL_CTL_MOD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP|EPOLLET, {u32=33486680, u64=33486680}}) = 0
epoll_wait(6, {}, 128, 0) = 0
sendmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"l\2\1\1\20\0\0\0V\5\0\0\37\0\0\0\6\1s\0\6\0\0\0:1.107\0\0"..., 48}, {"\1x\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 64
epoll_wait(6, {{EPOLLIN, {u32=33486680, u64=33486680}}}, 128, -1) = 1
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"l\1\0\0011\0\0\0\27\5\0\0\247\0\0\0\1\1o\0%\0\0\0/core/ub"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 233
recvmsg(4, 0xbe938130, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(6, EPOLL_CTL_MOD, 4, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP|EPOLLET, {u32=33486680, u64=33486680}}) = 0
epoll_wait(6, {}, 128, 0) = 0
sendmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"l\2

Getting dbg symbols now to get a trace.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :
Download full text (11.7 KiB)

Backtrace when attaching with gdb:

#0 0xb62c9712 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0xb6ee93fa in boost::asio::detail::epoll_reactor::run (this=0x1fef6e8, block=block@entry=true, ops=...) at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:392
        timeout = <optimized out>
        events = {{events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}} <repeats 38 times>, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 141392522407575552}}, {events = 32920512, data = {ptr = 0x1f5a0d0, fd = 32874704, u32 = 32874704, u64 = 32874704}}, {
            events = 32872688, data = {ptr = 0x4, fd = 4, u32 = 4, u64 = 4}}, {events = 32920512, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 32920512, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 141392522407575552}}, {events = 32874704, data = {
              ptr = 0x1f598f0, fd = 32872688, u32 = 32872688, u64 = 13176978892729456880}}, {events = 3068944384, data = {ptr = 0xb6e459c5, fd = -1226548795, u32 = 3068418501, u64 = 13181015765591284165}}, {events = 0, data = {ptr = 0xaa903f48, fd = -1433387192,
              u32 = 2861580104, u64 = 13178762878944034632}}, {events = 0, data = {ptr = 0x1f5ef58, fd = 32894808, u32 = 32894808, u64 = 32894808}}, {events = 3197337120, data = {ptr = 0x1f5ef58, fd = 32894808, u32 = 32894808, u64 = 144299029888888664}}, {
            events = 33597384, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 13732458124168658944}}, {events = 33607216, data = {ptr = 0xbe937e20, fd = -1097630176, u32 = 3197337120, u64 = 13177003737984761376}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {
            events = 0, data = {ptr = 0x2, fd = 2, u32 = 2, u64 = 145269464831623170}}, {events = 2, data = {ptr = 0x22b0ddc, fd = 36376028, u32 = 36376028, u64 = 8626310620}}, {events = 36376028, data = {ptr = 0xbe937e4c, fd = -1097630132, u32 = 3197337164,
              u64 = 13123924874283417164}}, {events = 36376028, data = {ptr = 0x2c, fd = 44, u32 = 44, u64 = 193273528364}}, {events = 3069841168, data = {ptr = 0x2d, fd = 45, u32 = 45, u64 = 45}}, {events = 1, data = {ptr = 0x1, fd = 1, u32 = 1,
              u64 = 145246894778482689}}, {events = 2, data = {ptr = 0x3, fd = 3, u32 = 3, u64 = 18161629713510957059}}, {events = 36376028, data = {ptr = 0x6c, fd = 108, u32 = 108, u64 = 145246894778482796}}, {events = 36376028, data = {ptr = 0xbe937f38,
              fd = -1097629896, u32 = 3197337400, u64 = 13732460669986635576}}, {events = 103, data = {ptr = 0x1, fd = 1, u32 = 1, u64 = 463856467969}}, {events = 3197337416, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 13732459361119240192}}, {events = 0, data = {
              ptr = 0x76, fd = 118, u32 = 118, u64 = 13732459567277670518}}, {events = 103, data = {ptr = 0xbe937f38, fd = -1097629896, u32 = 3197337400, u64 = 13732459639194484536}}, {events = 3197337400, data = {ptr = 0x67, fd = 103, u32 = 103,
              u64 = 13123673752938217575}}, {events = 3197337368, data = {ptr = 0xb6fa0f10 <__stack_chk_guard>, fd = -1225126128, u32 = 3069841168, u64 = 13123673481130151696}}, {events = 43, data = {ptr = 0xbe937fec, fd = -1097629716, u32 = 3197337580,
              u64 = 131236...

Revision history for this message
Ricardo Salveti (rsalveti) wrote :
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

As before, pulse was fine after a reboot. Will now try to manually corrupt the database and see what I can get (wondering if this is related with the mute issue we have with pathwind).

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Opened bug 1438491 for the issue I had with media-hub. For this bug I'll just force pulse to not store/restore any mute or device related value for the multimedia role.

I think the original issue is that the multimedia role stream got muted, causing the blocking issue just for multimedia related apps (ringtone and alarms were playing fine). This is probably a similar issue as described by bug 1438486

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

This bug was fixed in the package ubuntu-touch-session - 0.108+15.04.20150331~rtm-0ubuntu1

---------------
ubuntu-touch-session (0.108+15.04.20150331~rtm-0ubuntu1) 14.09; urgency=medium

  [ Ricardo Salveti de Araujo ]
  * touch.pa: making sure we don't store/restore device and muted status
    for module-stream-restore (LP: #1398560, #1438486)
 -- CI Train Bot <email address hidden> Tue, 31 Mar 2015 03:20:08 +0000

Changed in ubuntu-touch-session (Ubuntu RTM):
status: New → Fix Released
Changed in canonical-devices-system-image:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-touch-session - 0.108+15.04.20150331-0ubuntu1

---------------
ubuntu-touch-session (0.108+15.04.20150331-0ubuntu1) vivid; urgency=medium

  [ Ricardo Salveti de Araujo ]
  * touch.pa: making sure we don't store/restore device and muted status
    for module-stream-restore (LP: #1398560, #1438486)
 -- CI Train Bot <email address hidden> Tue, 31 Mar 2015 03:16:20 +0000

Changed in ubuntu-touch-session (Ubuntu):
status: New → Fix Released
deeksha (deekshapai7)
Changed in pulseaudio (Ubuntu):
assignee: Ricardo Salveti (rsalveti) → deeksha (deekshapai7)
assignee: deeksha (deekshapai7) → nobody
Revision history for this message
deeksha (deekshapai7) wrote :

Resetting User Configuration For some reason, pulseaudio's user configuration files can become corrupt(unsynced?) in some way, and deleting them (and forcing fresh ones to be generated) fixes a no sound condition. After using the command below, log out/in.

Ubuntu 12.10/Quantal (and earlier)

rm -r ~/.pulse*; pulseaudio -k

Ubuntu 13.04/Raring (and later)

rm -r ~/.config/pulse; pulseaudio -k

Changed in pulseaudio (Ubuntu):
assignee: nobody → deeksha (deekshapai7)
Revision history for this message
deeksha (deekshapai7) wrote :

Fix Alternative #1

Try reinstalling Alsa and Pulse audio in the following manner:

sudo apt-get remove --purge alsa-base pulseaudio

sudo apt-get install alsa-base pulseaudio
And force reload Alsa again:

sudo alsa force-reload
Fix Alternative #2

Open the terminal and edit speech-dispatcher file by using the following command:

sudo gedit /etc/default/speech-dispatcher
In here, change RUN=yes to RUN=no

Reboot.

Revision history for this message
Andrea Simonetti (simox) wrote :

Hello.. Is this last one a permanent solution?

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

Thank you for reporting this bug to Ubuntu.
Ubuntu 14.10 (utopic) reached end-of-life on July 23, 2015.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

tags: added: pulse-touch utopic
Changed in pulseaudio (Ubuntu):
assignee: deeksha (deekshapai7) → nobody
importance: Critical → Medium
status: In Progress → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ubuntu Touch is no longer supported.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Won't Fix
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.