Interrupt / Interrupt/systemshock
[Error] SIGSEGV (Address boundary error) on Fedora 28 -- possible dynamic library loading issue
- Dominant language
- C
- Stars
- 900
- Forks
- 77
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
Hello, having some trouble running this on Fedora 28. Tried both latest binary release and compiling from source. Both times the binary terminates with:
```
> ./systemshock
11:14:06 INFO InitMac.c:100: Starting Shockolate
fish: “./systemshock” terminated by signal SIGSEGV (Address boundary error)
```
If relevant, here's some output from gdb (the binary release):
```
(gdb) r
Starting program: /laleksic/sources/shockolate/systemshock
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-30.fc28.i686
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
11:18:43 INFO InitMac.c:100: Starting Shockolate
[New Thread 0xf75adb40 (LWP 3019)]
warning: Error reading shared library list entry at 0x2e80
warning: Error reading shared library list entry at 0x3200
warning: Error reading shared library list entry at 0x3580
warning: Error reading shared library list entry at 0x3970
warning: Error reading shared library list entry at 0x4060
warning: Error reading shared library list entry at 0x50f0
warning: Error reading shared library list entry at 0x53e0
warning: Error reading shared library list entry at 0x56d0
warning: Error reading shared library list entry at 0x59b0
warning: Error reading shared library list entry at 0x4ae0
warning: Corrupted shared library list: 0x83c68b0 != 0xffffca38
Thread 1 "systemshock" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install dbus-libs-1.12.10-1.fc28.i686 libXcursor-1.1.15-1.fc28.i686 libXfixes-5.0.3-5.fc28.i686 libXi-1.7.9-6.fc28.i686 libXinerama-1.1.3-10.fc28.i686 libXrandr-1.5.1-5.fc28.i686 libXrender-0.9.10-5.fc28.i686 libXxf86vm-1.1.4-7.fc28.i686 libblkid-2.32.1-1.fc28.i686 libcap-2.25-9.fc28.i686 libgcrypt-1.8.3-1.fc28.i686 libgpg-error-1.31-1.fc28.i686 libmount-2.32.1-1.fc28.i686 libselinux-2.8-1.fc28.i686 libuuid-2.32.1-1.fc28.i686 lz4-libs-1.8.1.2-4.fc28.i686 pcre2-10.31-10.fc28.i686 systemd-libs-238-9.git0e0aa59.fc28.i686 xz-libs-5.2.4-2.fc28.i686
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xf787a84e in __pthread_once_slow () from /lib/libpthread.so.0
#2 0xf6404f58 in ?? () from /lib/libGLX_nvidia.so.0
#3 0xf63cc9fe in ?? () from /lib/libGLX_nvidia.so.0
#4 0xf7fe4f89 in call_init.part () from /lib/ld-linux.so.2
#5 0xf7fe50bd in _dl_init () from /lib/ld-linux.so.2
#6 0xf7fe903b in dl_open_worker () from /lib/ld-linux.so.2
#7 0xf79b1bea in _dl_catch_exception () from /lib/libc.so.6
#8 0xf7fe8866 in _dl_open () from /lib/ld-linux.so.2
#9 0xf788bcc3 in dlopen_doit () from /lib/libdl.so.2
#10 0xf79b1bea in _dl_catch_exception () from /lib/libc.so.6
#11 0xf79b1c80 in _dl_catch_error () from /lib/libc.so.6
#12 0xf788c461 in _dlerror_run () from /lib/libdl.so.2
#13 0xf788bd66 in dlopen@@GLIBC_2.1 () from /lib/libdl.so.2
#14 0xf78466e7 in __glXLookupVendorByName (vendorName=0x83ca220 "nvidia") at libglxmapping.c:430
#15 0xf7847b21 in __glXLookupVendorByScreen (dpy=dpy@entry=0x83a6ff0, screen=screen@entry=0) at libglxmapping.c:574
#16 0xf7847c47 in __glXLookupVendorByScreen (screen=0, dpy=0x83a6ff0) at libglxmapping.c:612
#17 __glXGetDynDispatch (dpy=0x83a6ff0, screen=0) at libglxmapping.c:612
#18 0xf7841119 in glXChooseVisual (dpy=0x83a6ff0, screen=0, attrib_list=0xffffcccc) at libglx.c:215
#19 0xf7f7210a in X11_GL_GetVisual () from /usr/local/lib/libSDL2-2.0.so.0
#20 0xf7f715e5 in X11_GL_InitExtensions () from /usr/local/lib/libSDL2-2.0.so.0
#21 0xf7f71305 in X11_GL_LoadLibrary () from /usr/local/lib/libSDL2-2.0.so.0
#22 0xf7e6b942 in SDL_GL_LoadLibrary_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#23 0xf7e675c8 in SDL_CreateWindow_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#24 0xf7e64775 in ShouldUseTextureFramebuffer () from /usr/local/lib/libSDL2-2.0.so.0
#25 0xf7e65316 in SDL_VideoInit_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#26 0xf7da142d in SDL_InitSubSystem_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#27 0xf7da1576 in SDL_Init_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#28 0xf7db785e in SDL_Init () from /usr/local/lib/libSDL2-2.0.so.0
#29 0x0807c10d in InitSDL ()
#30 0x08090c52 in init_all ()
#31 0x0807bf8c in main ()
(gdb)
```
And when running the built from source:
```
(gdb) r
Starting program: /laleksic/sources/systemshock/build/systemshock
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-30.fc28.i686
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
11:33:03 INFO InitMac.c:100: Starting Shockolate
[New Thread 0xf7532b40 (LWP 4361)]
warning: Corrupted shared library list: 0x846d350 != 0x772e2a3a
warning: Corrupted shared library list: 0x846d7f0 != 0x6c6576
warning: Corrupted shared library list: 0x846db70 != 0x54414553
warning: Error reading shared library list entry at 0xffffe2e0
warning: Error reading shared library list entry at 0xffffe9d0
warning: Error reading shared library list entry at 0xfffffa60
warning: Error reading shared library list entry at 0xfffffd50
warning: Error reading shared library list entry at 0x40
warning: Error reading shared library list entry at 0x320
warning: Error reading shared library list entry at 0xfffff4b0
warning: Error reading shared library list entry at 0x7240
Thread 1 "systemshock" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install dbus-libs-1.12.10-1.fc28.i686 libXcursor-1.1.15-1.fc28.i686 libXfixes-5.0.3-5.fc28.i686 libXi-1.7.9-6.fc28.i686 libXinerama-1.1.3-10.fc28.i686 libXrandr-1.5.1-5.fc28.i686 libXrender-0.9.10-5.fc28.i686 libXxf86vm-1.1.4-7.fc28.i686 libblkid-2.32.1-1.fc28.i686 libcap-2.25-9.fc28.i686 libgcrypt-1.8.3-1.fc28.i686 libgpg-error-1.31-1.fc28.i686 libmount-2.32.1-1.fc28.i686 libselinux-2.8-1.fc28.i686 libuuid-2.32.1-1.fc28.i686 lz4-libs-1.8.1.2-4.fc28.i686 mesa-libGLU-9.0.0-14.fc28.i686 pcre2-10.31-10.fc28.i686 systemd-libs-238-9.git0e0aa59.fc28.i686 xz-libs-5.2.4-2.fc28.i686
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xf7d5984e in __pthread_once_slow () from /lib/libpthread.so.0
#2 0xf6389f58 in ?? () from /lib/libGLX_nvidia.so.0
#3 0xf63519fe in ?? () from /lib/libGLX_nvidia.so.0
#4 0xf7fe4f89 in call_init.part () from /lib/ld-linux.so.2
#5 0xf7fe50bd in _dl_init () from /lib/ld-linux.so.2
#6 0xf7fe903b in dl_open_worker () from /lib/ld-linux.so.2
#7 0xf7917bea in _dl_catch_exception () from /lib/libc.so.6
#8 0xf7fe8866 in _dl_open () from /lib/ld-linux.so.2
#9 0xf77f1cc3 in dlopen_doit () from /lib/libdl.so.2
#10 0xf7917bea in _dl_catch_exception () from /lib/libc.so.6
#11 0xf7917c80 in _dl_catch_error () from /lib/libc.so.6
#12 0xf77f2461 in _dlerror_run () from /lib/libdl.so.2
#13 0xf77f1d66 in dlopen@@GLIBC_2.1 () from /lib/libdl.so.2
#14 0xf77c96e7 in __glXLookupVendorByName (vendorName=0x8494bf0 "nvidia") at libglxmapping.c:430
#15 0xf77cab21 in __glXLookupVendorByScreen (dpy=dpy@entry=0x8471960, screen=screen@entry=0) at libglxmapping.c:574
#16 0xf77cac47 in __glXLookupVendorByScreen (screen=0, dpy=0x8471960) at libglxmapping.c:612
#17 __glXGetDynDispatch (dpy=0x8471960, screen=0) at libglxmapping.c:612
#18 0xf77c4119 in glXChooseVisual (dpy=0x8471960, screen=0, attrib_list=0xffffccdc) at libglx.c:215
#19 0xf7f7210a in X11_GL_GetVisual () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#20 0xf7f715e5 in X11_GL_InitExtensions () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#21 0xf7f71305 in X11_GL_LoadLibrary () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#22 0xf7e6b942 in SDL_GL_LoadLibrary_REAL () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#23 0xf7e675c8 in SDL_CreateWindow_REAL () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#24 0xf7e64775 in ShouldUseTextureFramebuffer () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#25 0xf7e65316 in SDL_VideoInit_REAL () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#26 0xf7da142d in SDL_InitSubSystem_REAL () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#27 0xf7da1576 in SDL_Init_REAL () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#28 0xf7db785e in SDL_Init () from /laleksic/sources/systemshock/build_ext/built_sdl/lib/libSDL2-2.0.so.0
#29 0x080bd93d in InitSDL ()
#30 0x080d58d3 in init_all ()
#31 0x080bd7c2 in main ()
```
It would seem something is wrong with dlopen or dynamic library loading.
In both the case of running the binary build and building from source I ran the SDL script (`install_32bit_sdl.sh`/`build_deps.sh` respectively) as root.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.