FS#59249 - [zsnes] Launches with segmentation fault
Attached to Project:
Community Packages
Opened by James (Charadon) - Friday, 06 July 2018, 07:59 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 13 January 2021, 14:52 GMT
Opened by James (Charadon) - Friday, 06 July 2018, 07:59 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 13 January 2021, 14:52 GMT
|
Details
Description:
Zsnes fails to launch with a segmentation fault. Additional info: Here's a backtrace of the issue. #0 0xf5f984e1 in pa_smoother_new () from /usr/lib32/pulseaudio/libpulsecommon-12.0.so #1 0xf60029d4 in ?? () from /usr/lib32/libpulse.so.0 #2 0xf6219585 in pa_simple_new () from /usr/lib32/libpulse-simple.so.0 #3 0xf7ee31c5 in ?? () from /usr/lib32/libSDL-1.2.so.0 #4 0xf7eb5b63 in SDL_AudioInit () from /usr/lib32/libSDL-1.2.so.0 #5 0xf7eb47c1 in SDL_InitSubSystem () from /usr/lib32/libSDL-1.2.so.0 #6 0xf7eb58ef in SDL_OpenAudio () from /usr/lib32/libSDL-1.2.so.0 #7 0x5698595b in ?? () #8 0x5698907d in ?? () #9 0x56986334 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) Steps to reproduce: Launch the emulator |
This task depends upon
Closed by Alexander F. Rødseth (xyproto)
Wednesday, 13 January 2021, 14:52 GMT
Reason for closing: Fixed
Wednesday, 13 January 2021, 14:52 GMT
Reason for closing: Fixed
Thread 1 "zsnes" received signal SIGSEGV, Segmentation fault.
0xf5c12161 in pa_smoother_new (adjust_time=1000000, history_time=5000000,
monotonic=true, smoothing=true, min_history=4, time_offset=2289801946,
paused=true) at pulsecore/time-smoother.c:102
102 pa_assert(adjust_time > 0);
(gdb) bt
#0 0xf5c12161 in pa_smoother_new (adjust_time=1000000, history_time=5000000,
monotonic=true, smoothing=true, min_history=4, time_offset=2289801946,
paused=true) at pulsecore/time-smoother.c:102
#1 0xf5c7e164 in create_stream (direction=direction@entry=PA_STREAM_PLAYBACK,
s=0x570379f0, dev=0x0, attr=0x0, flags=<optimized out>, volume=0x0,
sync_stream=0x0) at pulse/stream.c:1257
#2 0xf5c7eaa0 in pa_stream_connect_playback (s=<optimized out>,
dev=<optimized out>, attr=<optimized out>, flags=<optimized out>,
volume=0x0, sync_stream=0x0) at pulse/stream.c:1402
#3 0xf5cb2865 in pa_simple_new (server=0x0, name=0xf7f3e675 "Test stream",
dir=PA_STREAM_PLAYBACK, dev=0x0,
stream_name=0xf7f3e639 "Simple DirectMedia Layer", ss=0xffffd4f8, map=0x0,
attr=0x0, rerror=0x0) at pulse/simple.c:206
#4 0xf7f175e3 in ?? () from /usr/lib32/libSDL-1.2.so.0
#5 0xf7ee9933 in SDL_AudioInit () from /usr/lib32/libSDL-1.2.so.0
#6 0xf7ee85f1 in SDL_InitSubSystem () from /usr/lib32/libSDL-1.2.so.0
#7 0xf7ee96bf in SDL_OpenAudio () from /usr/lib32/libSDL-1.2.so.0
#8 0x5698595b in ?? ()
#9 0x5698907d in ?? ()
#10 0x56986334 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
It seems the trouble is coming from pa_assert(). It calls a real oddball piece of code called __x86.get_pc_thunk.bx() in libpulsecommon-12.2.so. While that code is running, the backtrace doesn't even work. So, there is something going on there that zsnes is allergic to.
I have attached the program and the gdb session.
main.c (0.4 KiB)
Unfortunately, since this is a bug introduced by the optimisation, I have absolutely no idea how to fix it. I did learn, though, that it doesn't seem to have anything to do with __x86.get_pc_thunk.bx(). The segfault happens at address 0xf5c12161 in the attached assembly dump (movdqa xmm0,XMMWORD PTR [esp]). That instruction is after the thunk.
#0 0x00000000f754eeeb __glDispatchCheckMultithreaded (libGLdispatch.so.0)
#1 0x00000000f770d9cf glXGetProcAddressARB (libGLX.so.0)
#2 0x00000000f7d6f6db n/a (libSDL-1.2.so.0)
#3 0x00000000f7d6fbfb n/a (libSDL-1.2.so.0)
#4 0x00000000f7d74e1a n/a (libSDL-1.2.so.0)
#5 0x00000000f7d753b2 n/a (libSDL-1.2.so.0)
#6 0x00000000f7d6350e SDL_SetVideoMode (libSDL-1.2.so.0)
#7 0x0000000056a794c7 n/a (zsnes)
#8 0x0000000056a7776b n/a (zsnes)
#9 0x0000000056a77d3d n/a (zsnes)
#10 0x0000000056a75334 n/a (zsnes)
The crash happens with lib32-libglvnd-1.1.0-1-x86_64.pkg.tar.xz
Last working version: lib32-libglvnd-1.0.0-1-x86_64.pkg.tar.xz (but still crashes on the lib32-libpulse bug).
groupadd pulse
groupadd pulse-rt
groupadd pulse-access
gpasswd -a $USER pulse
gpasswd -a $USER pulse-rt
gpasswd -a $USER pulse-access
Had a similar issue which I solved by adding user to input group.
Note: still couldn't get around the latest bug using OpenGL, though.
optdep on lib32-libpulse have been added.
Please re-open if this is still an issue.
See also: https://bugs.archlinux.org/task/53930