Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44055 - alsa-lib-1.0.3a bump - alsa-lib-1.0.3 causes pcm.c:5889: snd_pcm_mmap_commit: Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.
Summary: alsa-lib-1.0.3a bump - alsa-lib-1.0.3 causes pcm.c:5889: snd_pcm_mmap_commit:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-03-08 10:41 UTC by Christian Apolloni
Modified: 2004-03-14 15:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
perex's first official fix (alsa-lib-1.0.3a-first-fix.tar.bz2,1.90 KB, patch)
2004-03-12 06:50 UTC, fatty
Details | Diff
Fixed ebuild for alsa-lib-1.0.3a (alsa-lib-1.0.3a.tar.bz2,2.27 KB, application/x-bzip)
2004-03-12 17:39 UTC, fatty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Apolloni 2004-03-08 10:41:06 UTC
Various apps (e.g. ogg123, mplayer, xmame...) crash with the error message:

--
pcm.c:5889: snd_pcm_mmap_commit: Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.
--

since I upgraded from alsa-lib-1.0.2 to alsa-lib-1.0.3.
ogg123 lasts more depending on the song apparently, the others crash immediately.
The problem disappears if I downgrade to alsa-lib-1.0.2.

At boot my kernel (development-sources-2.6.3) shows:

--
Advanced Linux Sound Architecture Driver Version 1.0.2c (Thu Feb 05 15:41:49 2004 UTC).
PCI: Found IRQ 9 for device 0000:00:02.7
intel8x0_measure_ac97_clock: measured 49338 usecs
intel8x0: clocking to 48000
ALSA device list:
  #0: SiS SI7012 at 0xe000, irq 9
--

Here's the emerge info, BTW I tried with less aggressive CFLAGS too and the problem remains.

--
Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.3)
=================================================================
System uname: 2.6.3 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.3.13p1
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -Os -mfpmath=sse -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -Os -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://sunsite.cnlab-switch.ch/mirror/gentoo/ http://212.219.247.17/sites/www.ibiblio.org/gentoo/ rsync://ftp.snt.utwente.nl/gentoo http://212.219.247.11/sites/www.ibiblio.org/gentoo/ http://212.219.247.15/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acpi alsa apache2 atm avi cdr crypt cups dga dillo dvd encode flac gif gimpprint gpm gtk gtk2 imap imlib ipv6 java jpeg mad maildir memlimit mmx mozilla moznocompose moznoirc moznomail mpeg ncurses nls nptl oggvorbis opengl pam pdflib perl png pnp ppds python quicktime readline samba sasl sdl sse ssl tcpd tetex theora tiff truetype unicode usb wmf wxwindows x86 xface xml xml2 xmms xv zlib"
--
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2004-03-08 10:54:36 UTC
did you recompile packages after upgrade ?
Comment 2 Christian Apolloni 2004-03-08 11:00:07 UTC
Sorry I did not understand. Which packages?
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-09 10:19:10 UTC
ogg123, etc...

Also, it might be a driver/lib version thing... try using alsa-driver-1.0.3 with alsa-lib-1.0.3

Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-10 05:48:45 UTC
same problem here. After upgrading to alsa-*-1.0.3, all soundapps crashing. Recompiling the apps doesn't work, they still crash.

Downgrade to 1.0.2 -> all works fine again

kernel: 2.6.4-rc2 (development-sources)

but gentoo-dev-sources have the same problem. using alsa-drivers-1.0.3 is not an option for Kernel 2.6.x users, IMHO.
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-10 11:26:46 UTC
"but gentoo-dev-sources have the same problem. using alsa-drivers-1.0.3 is not an option for Kernel 2.6.x users, IMHO."

Stefan, why do you say that?  I actually recommend this to prevent the problem you are describing here, so this is what I'd suggest unless you can't compile it in which case I'd say stay with -lib-1.0.2

Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-10 13:05:51 UTC
I said 'IMHO'. ;-)

I thought, it's dangerous to mix the 2.4 world with 2.6.

But if you say, it's ok and working, I will try it (as soon as the KDE 3.2.1 emerge is finished ;)).
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-11 15:33:57 UTC
alsa-driver-1.0.3 doesn't work. It does not compile properly, because of wrong kernel version.

ok, lets wait for alsa-*-1.0.4 ;-)

btw: it seems to be safe to emerge alsa-firmware-1.0.3 and alsa-utils-1.0.3. Just leave alsa-lib and alsa-oss with version 1.0.2.

btw: there's a BUG in alsa-oss in then aoss script. But I think, this is a Bug for the ALSA-Team, not the Gentoo Team.

but FYI:

[/usr/bin/aoss]

LD_PRELOAD=${exec_prefix}/lib/libaoss.so $*

should be done this way:
LD_PRELOAD=${exec_prefix}/lib/libaoss.so exec "$@"

since $* passes the options with spaces/blanks not correctly. And the 'exec' saves some bytes of RAM ;)
Comment 8 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-11 19:09:25 UTC
Stefan: Did you file the bug on alsa's bug tracking system?

Also, 1.0.3's -firmware and -utils don't depend on any changes made to alsa-lib between 1.0.2 and 1.0.3 to function... if you did a -U --deep, it'd get updated.

Comment 9 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-12 05:07:32 UTC
> Stefan: Did you file the bug on alsa's bug tracking system?

not yet.

also, it's really only alsa-lib-1.0.3. All other packages can be installed. But alsa-lib-1.0.3 is broken, at least with Kernel 2.6.4 (development-sources).
Comment 10 fatty 2004-03-12 06:35:00 UTC
There's already a bug listed on ALSA's bugtracker. You can find it under the id #117.
Something must have gone wrong with dmix in ALSA's 1.0.3 release.

perex has offered a first diff to alsa-lib-1.0.3a, I hope it fixes that problem. 
I 'll post a ebuild including the patch later on, so everyone who's got problems using the dmix-plugin can try it out simple.

BTW: it seems to be a intel8x0-only problem. Can anyone else confirm that behavior with another chip/driver?
Comment 11 fatty 2004-03-12 06:50:23 UTC
Created attachment 27245 [details, diff]
perex's first official fix

As promised here's a updated ebuild.
Extract the file's to /usr/local/portage/media-libs/alsa-lib/ (or wherever you
store your own ebuilds).

Sadly the fix didn't work for me, but maybe you've got more luck!

PS: I'm not really familiar with creating ebuilds, so it could be my misstake,
too ;)
Comment 12 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-12 08:49:51 UTC
yes, snd_cmipci and snd_via82xx doesn't work, too.
Comment 13 fatty 2004-03-12 17:31:55 UTC
Comment on attachment 27245 [details, diff]
perex's first official fix

doesn't fix the problem
Comment 14 fatty 2004-03-12 17:39:24 UTC
Created attachment 27269 [details]
Fixed ebuild for alsa-lib-1.0.3a

perex's second shot seems to fix the problem.
Please try again with the new atached files and report your results.
Comment 15 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-13 02:33:37 UTC
please only post text... not tarballs...
Comment 16 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-13 02:47:31 UTC
I'm testing this out for inclusion now...

If you have a working dmix configuration for i8x0, I'd be very grateful if you could send it my way as I was having a lot of trouble setting it up... although perhaps that trouble stemmed from this bug and I didn't realize it at the time...

anyways... it'll probably make it into portage in the next day or so...
Comment 17 fatty 2004-03-13 08:13:24 UTC
alsa-lib-1.0.3b has been released a few minutes ago. So you just have to rename media-libs/alsa-lib/alsa-lib-1.0.3.ebuild to media-libs/alsa-lib/alsa-lib-1.0.3b.ebuild

News on http://www.alsa-project.org:
2004-03-13  	alsa-lib 1.0.3b released - it fixes SIGSEGV problem for dmix plugin (when a specific GCC version is used)

PS: You can mark this bug as fixed then
Comment 18 Dick Marinus 2004-03-13 08:53:09 UTC
I've installed alsa 1.0.3b and have the following .asoundrc:
pcm.dmixed {
        ipc_key 1025
        type dmix
        slave.pcm "hw:0,0"
}
pcm.dsnooped {
        ipc_key 1027
        type dsnoop
        slave.pcm "hw:0,0"
}
pcm.asymed {
        type asym
        playback.pcm "dmixed"
        capture.pcm "dsnooped"
}
pcm.!default {
        type plug
        slave.pcm "asymed"
}

using that configuration i get (still) the same error from artsd:

artsd: pcm.c:5899: snd_pcm_mmap_commit: Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.

I'm not sure if it's related to this bug report...
Comment 19 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-13 13:37:30 UTC
I comitted 1.0.3b

Dick, can you please comment about your problem in the bug upstream:

https://bugtrack.alsa-project.org/alsa-bug/bug_view_advanced_page.php?bug_id=0000117
Comment 20 fatty 2004-03-14 11:26:51 UTC
Dick, how did you start your artsd? Maybe it's even just a little configuration problem.

I didn't get artsd running in fullduplex mode, yet, but playback only mode works fine (artsd -a toss).
I followed the steps mentioned in the WIKI: http://alsa.opensrc.org/index.php?page=DmixPlugin
Comment 21 Stefan Briesenick (RETIRED) gentoo-dev 2004-03-14 13:43:40 UTC
first of all: alsa-lib-1.0.3b finally works!!! :-D

and then:

> I didn't get artsd running in fullduplex mode, yet, but 
> playback only mode works fine (artsd -a toss).

I know only to ways to get aRts working with dmix.

1. aoss artsd -a toss -r 48000
2. artsd -a esd -r 48000

Since I start aRts with KDE, I use the 2nd way, because I don't need a wrapperscript with aoss. ESD works great with dmix/dsnoop/asym. And so the soundserver cascade aRts -> ESD -> ALSA/dmix or ALSA/jack finally works 100% OK, though it isn't realtime anymore... ;-)

aRts is really broken. :-(
Comment 22 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-14 15:28:54 UTC
setting fixed...