Summary: | media-libs/alsa-lib-1.1.6-r1 with ABI_X86=x32 - segmentation fault in libasound-2.0.0 when calling snd_pcm{,_plugin}_writei() | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paul Bordukov <pa5hgan> |
Component: | Current packages | Assignee: | Gentoo ALSA team <alsa-bugs> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | CC: | gart, itumaykin+gentoo, media-video, pacho, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 393673 | ||
Attachments: |
session log from gdb
emerge info gdb session gdb session mpv log |
Description
Paul Bordukov
2018-05-03 17:18:57 UTC
Created attachment 529634 [details]
emerge info
Created attachment 529636 [details]
gdb session
Versions: mpv = 0.27.2 (X alsa cli drm egl iconv jpeg libass lua opengl tools uchardet vaapi vdpau wayland xv zlib -aqua -archive -bluray -cdda -coreaudio -cplugins -cuda -doc -dvb -dvd -encode -gbm -jack -javascript -lcms -libav -libcaca -libmpv -luajit -openal -oss -pulseaudio -raspberry-pi -rubberband -samba -sdl -selinux -test -v4l -zsh-completion PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6") alsa-lib = 1.1.6-r1 (debug thread-safety -alisp -doc -python ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 x32 -32" ELIBC="-uclibc" PYTHON_SINGLE_TARGET="python3_5 -python2_7 -python3_4 -python3_6" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6") Bug was reported in alsa-devel mail list as well: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-May/135606.html 1. Please rebuild mpv, alsa-lib and other relevant pieces with CFLAGS="-O2". "-O3" in CFLAGS is generally not supported. Then check if the issue is still reproducible. 2. Your gdb backtrace is incomplete (notice ??). Please enable debugging info in alsa-lib, mpv, glibc and other relevant pieces, then attach a complete backtrace. 3. Please run mpv like this: `mpv --no-config --log-file=mpv.log your_file.here' Then attach the resulting mpv.log file here. True, I used O3. Now I recompiled mpv, glibc, ffmpeg, mesa, alsa-lib with -O2 and debubgsyms. New backtrace and are mpv.log attached. Created attachment 529948 [details]
gdb session
Created attachment 529950 [details]
mpv log
Thank you very much. I will try to reproduce your problem here. Thank you! I appreciate this. Ok, cannot reproduce on my regular system. Will create ABI=x32 chroot next and try there. It will take some time. I have one more request beforehand, though. Just to make sure it's a problem with mpv, could you please do the following: 0. Build media-video/ffmpeg with USE=sdl enabled 1. Run `ffplay -hide_banner your_file.here' and see if it plays your file. It works, no issues with sound or segmentation faults. pashgan@light ~ $ ffplay -hide_banner ./temp/SampleVideo_1280x720_10mb.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './temp/SampleVideo_1280x720_10mb.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01T00:00:00.000000Z encoder : Lavf53.24.2 Duration: 00:01:02.32, start: 0.000000, bitrate: 1347 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 959 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : SoundHandler 2.60 A-V: 0.031 fd= 0 aq= 54KB vq= 133KB sq= 0B f=0/0 Interesting thing, I've added alsa-plugins with USE="pulseaudio" in my system, and mpv started to work normally, using same plain alsa output. Mpv itself has no pulseaudio support, i.e. USE="-pulseaudio". (In reply to Paul Bordukov from comment #13) > Interesting thing, I've added alsa-plugins with USE="pulseaudio" in my > system, and mpv started to work normally, using same plain alsa output. Mpv > itself has no pulseaudio support, i.e. USE="-pulseaudio". Interesting. Please help me understand. 1. From your `emerge --info` and `emerge -pqv mpv` I concluded that your system doesn't have pulseaudio installed. Correct? 2. You didn't previously have alsa-plugins installed at all when you had crashes. Correct? 1. right, I've added it recently, because firefox-bin requires pulseaudio for sound, and I cannot build firefox w/o pulseaudio because firefox ebild broken: https://bugs.gentoo.org/654988. But all tests you asked me to do I did w/o pulseaudio 2. correct, I want to use plain alsa, w/o any plugins, so no alsa-plugins were installed Ok, I am able to reproduce this in a current Gentoo ~amd64-x32 chroot. Not sure yet if it's mpv's problem or alsa's. Same with different audio only files (flac, vorbis, ac3, mp3). Not reproducible on amd64, ~amd64, x86 systems. Exclusive to amd64+x32. If I install alsa-plugins without pulseaudio, the problem is still reproducible. The cause of this crash is somewhere in mix_areas_32_smp() function, which eventually gets called from snd_pcm_plugin_writei() function. This crash is easily reproducible with a very minimal test program shipped with alsa-lib: http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=test/pcm_min.c;h=7462a45fef332d1027b3a3dfe0df550e0faa5c9d;hb=HEAD (Just do `gcc -lasound pcm_min.c; ./a.out`) This program just calls snd_pcm_plugin_writei() right away and crashes. Thus this isn't a problem with mpv, but rather with alsa-lib itself. Reassigning to alsa-lib maintainers. Still valid with an updated system? In that case I would report it to upstream, or I don't think it will be fixed ever Thanks |