xmalloc.c: Assertion 'size > 0' failed at pulse/xmalloc.c:60

Bug #1496577 reported by Chris West
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Pulseaudio frequently crashes when Skype or some games (e.g. BigPharma from Steam) are playing audio, it appears fine otherwise.
It gets restarted as my user (not as the system), and hence things can start playing again, but neither Skype nor the games recover from this situation, so audio is broken forever for them.

Log, from running it non-daemonised; I don't seem to get the E: log in syslog when I run it daemonised, but I may just be failing at reading the right bit of syslog:
D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-surround-51 becomes busy, resuming.
D: [alsa-sink-ALC892 Analog] alsa-sink.c: Limited to 12572 bytes.
D: [alsa-sink-ALC892 Analog] alsa-sink.c: before: 1047
D: [alsa-sink-ALC892 Analog] alsa-sink.c: after: 1047
D: [alsa-sink-ALC892 Analog] alsa-sink.c: Rewound 12564 bytes.
D: [alsa-sink-ALC892 Analog] sink.c: Processing rewind...
D: [alsa-sink-ALC892 Analog] sink.c: latency = 639
D: [alsa-sink-ALC892 Analog] sink-input.c: Have to rewind 12564 bytes on render memblockq.
D: [alsa-sink-ALC892 Analog] sink-input.c: Have to rewind 12564 bytes on render memblockq.
D: [alsa-sink-ALC892 Analog] source.c: Processing rewind...
D: [alsa-sink-ALC892 Analog] protocol-native.c: Requesting rewind due to end of underrun.
D: [alsa-sink-ALC892 Analog] alsa-sink.c: Requested to rewind 65520 bytes.
D: [alsa-sink-ALC892 Analog] alsa-sink.c: Limited to 13244 bytes.
D: [alsa-sink-ALC892 Analog] alsa-sink.c: before: 1103
D: [alsa-sink-ALC892 Analog] alsa-sink.c: after: 1103
D: [alsa-sink-ALC892 Analog] alsa-sink.c: Rewound 13236 bytes.
D: [alsa-sink-ALC892 Analog] sink.c: Processing rewind...
D: [alsa-sink-ALC892 Analog] sink.c: latency = 599
D: [alsa-sink-ALC892 Analog] sink-input.c: Have to rewind 13236 bytes on render memblockq.
D: [alsa-sink-ALC892 Analog] sink-input.c: Have to rewind 13236 bytes on render memblockq.
D: [alsa-sink-ALC892 Analog] sink-input.c: Have to rewind 13236 bytes on render memblockq.
D: [alsa-sink-ALC892 Analog] source.c: Processing rewind...
E: [alsa-sink-ALC892 Analog] xmalloc.c: Assertion 'size > 0' failed at pulse/xmalloc.c:60, function pa_xmalloc(). Aborting.

$ killall -9 pulseaudio; gdb --args pulseaudio
b abort
r

...

gdb) bt
#0 __GI_abort () at abort.c:51
#1 0x00007ffff78d27fb in pa_xmalloc (size=size@entry=0) at pulse/xmalloc.c:60
#2 0x00007ffff78d29e9 in pa_xmemdup (p=0x7fffef568040, l=l@entry=0) at pulse/xmalloc.c:94
#3 0x00007ffff7b4a6b5 in pa_lfe_filter_process (f=0x6b9bd0, buf=buf@entry=0x81c9b0) at pulsecore/filter/lfe-filter.c:132
#4 0x00007ffff7b68313 in pa_resampler_run (r=0x81c830, in=in@entry=0x7fffe936a4d0, out=out@entry=0x7fffe936a4f0) at pulsecore/resampler.c:1359
#5 0x00007ffff7b730d3 in pa_sink_input_peek (i=i@entry=0x707450, slength=3744, chunk=chunk@entry=0x7fffe936a840, volume=volume@entry=0x7fffe936a858) at pulsecore/sink-input.c:965
#6 0x00007ffff7b7b990 in fill_mix_info (s=s@entry=0x68b2b0, length=length@entry=0x7fffe936a658, info=0x7fffe936a840, info@entry=0x7fffe936a710, maxinfo=31) at pulsecore/sink.c:1016
#7 0x00007ffff7b7e74d in pa_sink_render_into (s=s@entry=0x68b2b0, target=target@entry=0x7fffe936cd60) at pulsecore/sink.c:1256
#8 0x00007ffff7b7ecef in pa_sink_render_into_full (s=0x68b2b0, target=target@entry=0x7fffe936ce20) at pulsecore/sink.c:1340
#9 0x00007fffe9b9668a in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x6f46f0) at modules/alsa/alsa-sink.c:645
#10 thread_func (userdata=0x6f46f0) at modules/alsa/alsa-sink.c:1716
#11 0x00007ffff790c4d8 in internal_thread_func (userdata=0x80a060) at pulsecore/thread-posix.c:81
#12 0x00007ffff6dfd6aa in start_thread (arg=0x7fffe936d700) at pthread_create.c:333
#13 0x00007ffff641eeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

pulsecore/filter/lfe-filter.c:132 comes from debian/patches/0305-lfe-filter-Add-rewind-support.patch, i.e. this is a Debian/Ubuntu specific bug.

Wily pre-release, pulseaudio 1:6.0-0ubuntu11.
apport hangs forever trying to gather details.

Revision history for this message
Arun Raghavan (arunraghavan) wrote :

This bug also exists upstream now, and there's a patch to fix it at: http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-September/024401.html

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

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

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
JustMax (max-kue) wrote :

I'm also hit by this bug. Mainly when I'm playing games and Youtube at the same time.

From journal:
pulseaudio[6323]: [alsa-sink-USB Audio] xmalloc.c: Assertion 'size > 0' failed at pulse/xmalloc.c:60, function pa_xmalloc(). Aborting.

backtrace:

(gdb) bt
#0 0x00007f1832b75267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007f1832b76eca in __GI_abort () at abort.c:89
#2 0x00007f18340fa7fb in pa_xmalloc () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-6.0.so
#3 0x00007f18340fa9e9 in pa_xmemdup () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-6.0.so
#4 0x00007f18343726b5 in pa_lfe_filter_process () from /usr/lib/libpulsecore-6.0.so
#5 0x00007f1834390353 in pa_resampler_run () from /usr/lib/libpulsecore-6.0.so
#6 0x00007f183439b113 in pa_sink_input_peek () from /usr/lib/libpulsecore-6.0.so
#7 0x00007f18343a39d0 in ?? () from /usr/lib/libpulsecore-6.0.so
#8 0x00007f18343a678d in pa_sink_render_into () from /usr/lib/libpulsecore-6.0.so
#9 0x00007f18343a6d2f in pa_sink_render_into_full () from /usr/lib/libpulsecore-6.0.so
#10 0x00007f182d63468a in ?? () from /usr/lib/pulse-6.0/modules/libalsa-util.so
#11 0x00007f18341344d8 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-6.0.so
#12 0x00007f18336256aa in start_thread (arg=0x7f182d60c700) at pthread_create.c:333
#13 0x00007f1832c46eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Since there seems to be a fix upstream can we merge this into Ubuntu 15.10?

Revision history for this message
Chris West (faux) wrote :

I switched to a build of Xenial's pulseaudio ages ago, and can confirm it fixes this issue (although not the other).

Revision history for this message
Ernst Persson (ernstp) wrote :

Rebuilt xenial's pulseaudio in my ppa: https://launchpad.net/~ernstp/+archive/ubuntu/ppa

Revision history for this message
dino99 (9d9) wrote :

fixed as per #4 above
as it is not a 'security' problem, it will not be backported; meaning that report is set to 'fixed'

Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ernst Persson (ernstp) wrote :

You could argue that this is a very severe regression though...

Revision history for this message
JustMax (max-kue) wrote :

Am I right that is means that bis bug will not be fixed in 15.10? Is it Ubuntu philosophy that all bug that are "not a 'security' problem" will not be fixed until the next release?

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.