polypaudio crasher on powerpc

Bug #12939 reported by John Steele Scott on 2005-02-15
22
Affects Status Importance Assigned to Milestone
ubuntu-meta (Ubuntu)
Critical
Martin Pitt

Bug Description

Tonight I upgraded my system and in the process something in the audio subsystem
broke. The GNOME "Multimedia Systems Selector" was set to have ESD as default
audio sink prior to the upgrade; this no longer works, when I press "Test", it
says "Failed to construct test pipeline for 'ESD - Enlightenment Sound Daemon'".

If I change the sink to ALSA or OSS it works, but I know polypaudio is supposed
to replace ESD, so I think this is a bug.

If I drop to a command line and run "esd", before I try to play a sound, I see
the following message when the sound is supposed to be played:

polypaudio: sample-util.c:207: pa_volume_memchunk: Assertion `c && spec &&
(c->length % pa_frame_size(spec) == 0)' failed.

After this (presumably the soundserver crashes) I can play sound again, but I
think the application (e.g. gnome-terminal, rhythmbox, mplayer etc.) is just
falling back to OSS. In the case of mplayer, I know that it is, because it prints:

[AO ESD] esd_open_sound failed: No such file or directory
AO: [oss] 22050Hz 2ch Signed 16-bit (Big-Endian) (2 bps)

What follows is the commit log of my last upgrade:

Commit Log for Tue Feb 15 20:30:37 2005

Removed the following packages:
esound

Upgraded the following packages:
base-config (2.61ubuntu21) to 2.61ubuntu23
dbus-1 (0.23-1ubuntu3) to 0.23-1ubuntu4
dbus-1-utils (0.23-1ubuntu3) to 0.23-1ubuntu4
dbus-glib-1 (0.23-1ubuntu3) to 0.23-1ubuntu4
gksu (1.2.2-1ubuntu2) to 1.2.3-2ubuntu2
gnome-system-tools (1.1.91-0ubuntu1) to 1.1.91-0ubuntu2
hal (0.4.7-1ubuntu3) to 0.4.7-1ubuntu4
hal-device-manager (0.4.7-1ubuntu3) to 0.4.7-1ubuntu4
libdb4.1 (4.1.25-17) to 4.1.25-18
libhal-storage0 (0.4.7-1ubuntu3) to 0.4.7-1ubuntu4
libhal0 (0.4.7-1ubuntu3) to 0.4.7-1ubuntu4
libkrb-1-kerberos4kth (1.2.2-11.1ubuntu1) to 1.2.2-11.1ubuntu2
libroken16-kerberos4kth (1.2.2-11.1ubuntu1) to 1.2.2-11.1ubuntu2
linux-image-2.6.10-3-powerpc (2.6.10-16) to 2.6.10-17
linux-source-2.6.10 (2.6.10-16) to 2.6.10-17
login (1:4.0.3-30.7ubuntu8) to 1:4.0.3-30.7ubuntu9
passwd (1:4.0.3-30.7ubuntu8) to 1:4.0.3-30.7ubuntu9
python2.4-dbus (0.23-1ubuntu3) to 0.23-1ubuntu4
ubuntu-base (0.29) to 0.30
ubuntu-desktop (0.29) to 0.30
udev (0.050-3ubuntu4) to 0.050-3ubuntu5
update-manager (0.36.6) to 0.37
xscreensaver (4.16-1ubuntu5) to 4.16-1ubuntu6
xscreensaver-gl (4.16-1ubuntu5) to 4.16-1ubuntu6

Installed the following packages:
libsamplerate0 (0.1.1-2)
polypaudio (0.7-0ubuntu3)
polypaudio-alsa (0.7-0ubuntu3)
polypaudio-x11 (0.7-0ubuntu3)

Remy Maucherat (remy-maucherat) wrote :

This message on the dev list fixed ESD support for me (apparently, the issue is
that the configuration file is ignored):

Oliver and I (among others) have experienced the Rhythmbox-not-working-
with-Polypaudio issue: to see if you reach the same conclusion we did
regarding default.pa being ignored, try these steps:

1) Set all apps to use EsounD output;
2) polypaudio -k
3) polypaudio -nF /etc/polypaudio/default.pa
4) Desktop>Preferences>Multimedia Systems Selector>Default Sink>ESD>Test
  should now work

Remy Maucherat (remy-maucherat) wrote :

From the docs (http://0pointer.de/lennart/projects/polypaudio/#documentation) it
seems a configure option is needed for polypaudio to use /etc/polypaudio/, which
could explain the issues.

<quote>
Unless you pass the option --sysconfdir=/etc to configure, the directory
/etc/polypaudio/ is really /usr/local/etc/polypaudio/.
</quote>

John Steele Scott (toojays) wrote :

Thanks Remy, but unfortunately the suggestion in comment 1 does not solve the
problem for me. When I try to play a sound, polypaudio crashes with the following:

polypaudio: sample-util.c:207: pa_volume_memchunk: Assertion `c && spec &&
(c->length % pa_frame_size(spec) == 0)' failed.

Looking with strace, I am quite sure that polypaudio is reading the config file:

open("/etc/polypaudio/default.pa", O_RDONLY) = 3
close(3)

Considering that I am on powerpc, is it possible that polypaudio has endianness
issues? Has this package been tested on ppc?

I tried to change the package for this bug to polypaudio, but bugzilla borked.
cc'ing Polypaudio maintainer instead.

Remy,

in comment #1 and #2 you said the problem was not finding
/etc/polypaudio/default.pa, but when i execute the following steps i get the
gnome sounds back

1) login
2) no startup & gnome sounds -> Desktop>Preferences>Multimedia Systems
Selector>Default Sink>ESD>Test -> ESD error
2) open terminal and as user:
3) polypaudio -k
4) polypaudio (without any reference to /etc/polypaudio/...)
5) Desktop>Preferences>Multimedia Systems Selector>Default Sink>ESD>Test ->
sound = ok

It seems like when gnome session is started the polypaudio/esd daemon is not
correct initialized.

Remy Maucherat (remy-maucherat) wrote :

I have tested that now, and you are right, so no recompilation needed.

The issue originally described in the bug report is also another different issue.

Bryan Forbes (bryanforbes) wrote :
Download full text (4.5 KiB)

This happens on my machine as well (iBook g4). Here is the assertion:

bryan@mxpxppc:~$ polypaudio
bryan@mxpxppc:~$ esdplay ~/.xchat2/tock.wav
bryan@mxpxppc:~$ polypaudio: module-alsa-sink.c:107: do_write: Assertion
`memchunk->memblock && memchunk->memblock->data && memchunk->length &&
memchunk->memblock->length && (memchunk->length % u->frame_size) == 0' failed.

I did a backtrace on polypaudio and got this:

bryan@mxpxppc:~$ gdb polypaudio

(gdb) set args --daemonize=false
(gdb) r
Starting program: /usr/bin/polypaudio --daemonize=false
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 21119)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
pid.c: stale PID file, overwriting.
(no debugging symbols found)
source.c: created 0 "null_monitor" with sample spec "S16BE 2ch 44100Hz"
sink.c: created 0 "null" with sample spec "S16BE 2ch 44100Hz"
module.c: Loaded "module-null-sink" (index: #0; argument: "").
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
module.c: Loaded "module-esound-protocol-unix" (index: #1; argument: "").
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
protocol-native.c: loading cookie from disk.
module.c: Loaded "module-native-protocol-unix" (index: #2; argument: "").
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
client.c: created 0 "STDIN/STDOUT client"
module.c: Loaded "module-cli" (index: #3; argument: "").
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
module.c: Loaded "module-x11-bell" (index: #4; argument: "sample=x11-bell
sink=output").
(no debugging symbols found)
(no debugging symbols found)
module-x11-publish.c: using already loaded auth cookie.
(no debugging symbols found)
module.c: Loaded "module-x11-publish" (index: #5; argument: "").
main.c: Daemon startup complete.
Welcome to polypaudio! Use "help" for usage information.
>>> play-file /home/bryan/.xchat2/tock.wav output
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
source.c: created 1 "output_monitor" with sample spec "S16BE 2ch 44100Hz"
sink.c: created 1 "output" with sample spec "S16BE 2ch 44100Hz"
module-alsa-sink.c: using 12 fragments of size 682 bytes.
module.c: Loaded "module-alsa-sink" (index: #6; argument: "sink_name=output").
sink-input.c: created 0 "/home/bryan/.xchat2/tock.wav" on 1 with sample spec
"S16BE 1ch 44100Hz"
>>> polypaudio: module-alsa-sink.c:107: do_write: Assertion `memchunk->memblock
&& memchunk->memblock->data && memch...

Read more...

Bryan Forbes (bryanforbes) wrote :

I'm upping this to critical because it crashes on powerpc and will not play sounds.

Joe Barnett (thejoe) wrote :

split the non-crasher portion of this bug into bug #13051

Marek Werstak (marexmail) wrote :

Hello,

I have changed some options of the /etc/polypaudio/default.pa
All is set to OSS now. It is only a workaround, but for me sound is playing
again :-)

# Load audio drivers statically

#load-module module-alsa-sink sink
#load-module module-alsa-source device=plughw:1,0
load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
load-module module-null-sink
#load-module module-pipe-sink

# Load audio drivers automatically on access

# ALSA
#commented for testing
#add-autoload-sink output module-alsa-sink sink_name=output
#add-autoload-source input module-alsa-source source_name=input

# OSS
add-autoload-sink output module-oss device="/dev/dsp" sink_name=output
source_name=input
add-autoload-source input module-oss device="/dev/dsp" source_name=input
sink_name=output

#add-autoload-sink output module-oss-mmap device="/dev/dsp" sink_name=output
source_name=input
#add-autoload-source input module-oss-mmap device="/dev/dsp" sink_name=output
source_name=input

/etc/libao.conf is defaulted to oss too.

I know this is not the best solution, but for now it works. Are there ALSA
problems on ppc? I dont know. The OSS emulation works fine ... Hmmm. I am not a
programmer, but it could be. There are plenty more x86 boxes than ppc installed ...

The gstreamer-properties Output Sink is set to OSS too. Input is set to ALSA,
other combinations crash on my iBook.

Regards.

Jeff Waugh (jdub) wrote :

Thanks, upstream is aware of this bug. :-)

Marek Werstak (marexmail) wrote :

After reboot gstreamer-properties corrected again to ESD Output and Input. It
works with the other settings ceteris paribus.

Svend Sorensen (ssorensen) wrote :

I am having a similar crash on a 386 platform (Linux athxp 2.6.10-2-386 #1 Fri
Feb 4 09:44:19 UTC 2005 i686 GNU/Linux). My sound card is a M-Audio DIO 2496
which uses the snd_ice1712 ALSA module. The error is as follows:

source.c: created 1 "output_monitor" with sample spec "S16LE 2ch 44100Hz"
sink.c: created 1 "output" with sample spec "S16LE 2ch 44100Hz"
module-alsa-sink.c: using 12 fragments of size 546 bytes.
module.c: Loaded "module-alsa-sink" (index: #5; argument: "sink_name=output").
sink-input.c: created 0 "sample:x11-bell" on 1 with sample spec "S16LE
1ch 44100Hz"
polypaudio: sample-util.c:207: pa_volume_memchunk: Assertion `c &&
spec && (c->length % pa_frame_size(spec) == 0)' failed.
Aborted

I also commented out the ALSA module in /etc/polypaudio/default.pa, which
stopped the crash.

Matt Zimmerman (mdz) wrote :

What's the status of this bug upstream?

Matt Zimmerman (mdz) wrote :

Martin, can you take a look at this bug? It doesn't seem to be getting
attention upstream, and should be fixed for preview if possible.

Martin Pitt (pitti) wrote :

 polypaudio (0.7-0ubuntu5) hoary; urgency=low
 .
   * debian/patches/04_fix_fragment_size.diff:
     - ALSA sink module: Do not use period_size as buffer fragment size, this
       is the duration (in ns) of a fragment; use fragsize which is the number
       of bytes.
     - Ubuntu #6582

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.