esound crashes with a seg fault when linked against latest alsa-lib (1.0.0_rc2). Patch is posted at gnome bugzilla page Reproducible: Always Steps to Reproduce: 1. emerge alsa-lib 2. emerge esound 3. start esd Actual Results: seg fault Expected Results: ran Portage 2.0.49-r18 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.0-gentoo) ================================================================= System uname: 2.6.0-gentoo i686 AMD Athlon(tm) XP 1700+ Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -Os -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/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirrors.xmission.com/gentoo http://gentoo.mirrors.pair.com http://gentoo.chem.wisc.edu/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://gentoo.chem.wisc.edu/gentoo-portage" USE="3dnow X aalib alsa apm avi berkdb bonobo cdr crypt cups directfb encode esd foomaticdb gdbm ggi gif gnome gpm gtk gtk2 gtkhtml imlib java jpeg libg++ libwww mad mikmod mmx motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sse ssl svga tcpd truetype x86 xml2 xmms xv zlib"
and i suppose this breaks esound with pre rc releases ?
strace /usr/bin/esd -nobeeps -as 2 -tcp -public execve("/usr/bin/esd", ["/usr/bin/esd", "-nobeeps", "-as", "2", "-tcp", "-public"], [/* 47 vars */]) = 0 uname({sys="Linux", node="xlys.mysolo.org", ...}) = 0 brk(0) = 0x8057000 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=89730, ...}) = 0 mmap2(NULL, 89730, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000 close(3) = 0 open("/usr/lib/libwrap.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \0\000"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=34399, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4002a000 mmap2(NULL, 31012, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002b000 mprotect(0x40031000, 6436, PROT_NONE) = 0 mmap2(0x40031000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5) = 0x40031000 close(3) = 0 open("/usr/lib/libesd.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000(\0\000"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=44106, ...}) = 0 mmap2(NULL, 34744, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40033000 mprotect(0x4003b000, 1976, PROT_NONE) = 0 mmap2(0x4003b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8) = 0x4003b000 close(3) = 0 open("/usr/lib/libaudiofile.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220U\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=173488, ...}) = 0 mmap2(NULL, 152364, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003c000 mprotect(0x4005f000, 9004, PROT_NONE) = 0 mmap2(0x4005f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x22) = 0x4005f000 close(3) = 0 open("/usr/lib/libasound.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\325\1"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=841041, ...}) = 0 mmap2(NULL, 707060, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40062000 mprotect(0x4010b000, 14836, PROT_NONE) = 0 mmap2(0x4010b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa9) = 0x4010b000 close(3) = 0 open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2405\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=184089, ...}) = 0 mmap2(NULL, 134192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4010f000 mprotect(0x4012f000, 3120, PROT_NONE) = 0 mmap2(0x4012f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1f) = 0x4012f000 close(3) = 0 open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\30"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=12384, ...}) = 0 mmap2(NULL, 11360, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40130000 mprotect(0x40132000, 3168, PROT_NONE) = 0 mmap2(0x40132000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) = 0x40132000 close(3) = 0 open("/lib/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20A\0\000"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=91538, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40133000 mmap2(NULL, 327200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40134000 mprotect(0x40141000, 273952, PROT_NONE) = 0 mmap2(0x40141000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd) = 0x40141000 mmap2(0x40144000, 261664, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40144000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300Y\1"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=1453001, ...}) = 0 mmap2(NULL, 1214180, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40184000 mprotect(0x402a7000, 22244, PROT_NONE) = 0 mmap2(0x402a7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x123) = 0x402a7000 mmap2(0x402aa000, 9956, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402aa000 close(3) = 0 mprotect(0x40062000, 692224, PROT_READ|PROT_WRITE) = 0 mprotect(0x40062000, 692224, PROT_READ|PROT_EXEC) = 0 munmap(0x40014000, 89730) = 0 modify_ldt(1, {entry_number:0, base_addr:0x401410a0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, 16) = 0 getpid() = 10845 rt_sigaction(SIGRTMIN, {0x4013be10, [], SA_RESTORER, 0x401ad358}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x4013be60, [], SA_RESTORER, 0x401ad358}, NULL, 8) = 0 rt_sigaction(SIGRT_2, {0x4013bfd0, [], SA_RESTORER, 0x401ad358}, NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0 _sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbffff22c, 31, (nil), 0}) = 0 open("/dev/urandom", O_RDONLY) = 3 read(3, "pM\331L\227%\323\265F\277+7~\302\347W\5\242Y\307\'\244"..., 32) = 32 close(3) = 0 brk(0) = 0x8057000 brk(0x8058000) = 0x8058000 brk(0) = 0x8058000 open("/etc/esd/esd.conf", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=77, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000 read(3, "[esd]\nauto_spawn=1\nspawn_options"..., 4096) = 77 read(3, "", 4096) = 0 close(3) = 0 munmap(0x40014000, 4096) = 0 open("/root/.esd.conf", O_RDONLY) = -1 ENOENT (No such file or directory) socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 setsockopt(3, SOL_SOCKET, SO_LINGER, {onoff=1, linger=100}, 8) = 0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 bind(3, {sa_family=AF_INET, sin_port=htons(16001), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 listen(3, 16) = 0 open("/dev/snd/controlC0", O_RDONLY) = 4 close(4) = 0 stat64("/usr/share/alsa/alsa.conf", {st_mode=S_IFREG|0644, st_size=8007, ...}) = 0 open("/usr/share/alsa/alsa.conf", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=8007, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000 read(4, "#\n# ALSA library configuration "..., 4096) = 4096 brk(0) = 0x8058000 brk(0x8059000) = 0x8059000 brk(0) = 0x8059000 brk(0x805a000) = 0x805a000 brk(0) = 0x805a000 brk(0x805b000) = 0x805b000 brk(0) = 0x805b000 brk(0x805c000) = 0x805c000 read(4, "\t\t\t\tALSA_CARD\n\t\t\t]\n\t\t\tdefault {\n"..., 4096) = 3911 brk(0) = 0x805c000 brk(0x805d000) = 0x805d000 brk(0) = 0x805d000 brk(0x805e000) = 0x805e000 brk(0) = 0x805e000 brk(0x805f000) = 0x805f000 read(4, "", 4096) = 0 read(4, "", 4096) = 0 close(4) = 0 munmap(0x40014000, 4096) = 0 brk(0) = 0x805f000 brk(0x8060000) = 0x8060000 access("/etc/asound.conf", R_OK) = -1 ENOENT (No such file or directory) access("/root/.asoundrc", R_OK) = -1 ENOENT (No such file or directory) open("/dev/snd/controlC0", O_RDONLY) = 4 close(4) = 0 open("/dev/snd/controlC0", O_RDWR) = 4 ioctl(4, USBDEVFS_CONTROL, 0xbfffebcc) = 0 ioctl(4, 0x40045532, 0xbfffebf4) = 0 open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK) = 5 close(4) = 0 ioctl(5, APM_IOC_STANDBY, 0xbfffead0) = 0 fcntl64(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) ioctl(5, AGPIOC_INFO, 0xbfffeacc) = 0 ioctl(5, APM_IOC_SUSPEND, 0xbfffeac8) = 0 mmap2(NULL, 4096, PROT_READ, MAP_SHARED, 5, 0x80000) = 0x40014000 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0x81000) = 0x40015000 fcntl64(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) fcntl64(5, F_SETFL, O_RDWR) = 0 ioctl(5, 0xc25c4110, 0xbfffec70) = 0 ioctl(5, 0xc25c4110, 0xbfffec70) = 0 ioctl(5, 0xc25c4110, 0xbfffec70) = 0 ioctl(5, 0xc25c4110, 0xbfffec70) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++
I wonder what that has to do with my question ? Let's restate it : Does esound _with_ the patch break pre _rcx alsa-lib installs ?
I'm getting the same problem. I'm also using kernel 2.6.1 Backtrace: #0 snd_pcm_hw_param_set_near (pcm=0x805f208, params=0xbfffeb20, var=SNDRV_PCM_HW_PARAM_RATE, val=0xac44, dir=0x0) at pcm_params.c:786 #1 0x40097a9c in __snd_pcm_hw_params_set_rate_near (pcm=0x805f208, params=0x805f208, val=0x805f208, dir=0x805f208) at pcm.c:3593 #2 0x40019280 in initAlsa (dev=0x805f208 "pU\001@\020q\005\b", format=134607368, channels=134607368, speed=44100, mode=134607368) at audio_alsa09.c:140 #3 0x40019797 in esd_audio_open () at audio_alsa09.c:333 #4 0x0804a5bb in main (argc=1, argv=0xbffff056) at esd.c:782 I'll try some older versions and see how I get on. BTW mplayer works ok, so its not ALSA per se that it broken.
http://bugzilla.gnome.org/show_bug.cgi?id=129709 is probably the same bug. There are patches for it in esound cvs. I'll try that.
Indeed esound CVS runs without seg faulting immediately. Unless someone knows how to create a patched ebuild, I guess we'll have to wait for a new esound release.
Created attachment 24570 [details] new ebuild for apply patch on 0.2.32
Created attachment 24571 [details, diff] Aggregated patch from bugzilla.gnome.org
Attched esound-0.2.32-r1.ebuild will apply attached patch and do autoconf/autoheader before configure the project. I tested on my machine, works fine.
i tested out the patch with latest stable and unstable alsa-lib and it works just fine added to cvs as 0.2.32-r1
*** Bug 40131 has been marked as a duplicate of this bug. ***
this is not a very good solution as it is, the patch is compile time selection of which alsa one currently uses. If one upgrades alsa-lib after esound it will still bork.
if you emerge an old alsa-lib, emerge esound, update alsa-lib, it'll work without segfaults this is the upgrade path i took and it worked fine (and why i never bothered with this bug) the failure is when you update to latest alsa-lib and then emerge esound without the patch here (which i tried later when a user talked to me)
why not simply put a build time depend on latest alsa lib into the esound ebuild?
Haven't looked at this in a while. I get attached error if i try to emerge this patch vs. alsa-lib-0.9.8 reassigning this to you vapier, because you added the patch.
Created attachment 26600 [details] esound-0.2.32-r1 with alsa-lib-0.9.8 failure log
fixed in cvs