Author Topic: [fixed] 3.6.0.3 Segfault when re-hosting quickly  (Read 777 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
[fixed] 3.6.0.3 Segfault when re-hosting quickly
« on: 3 March 2012, 19:37:50 »
I've just run into a segmentation fault which I triggered by starting the game with --starthost, leaving this menu quickly - before (or possibly while) the masterserver connected to my gameserver, then entering the Internet menu (list of available gameservers) and hosting again. This bug can be reproduced, it occurs every time I follow this procedure.

Standard output/error:
Code: [Select]
$ ./start_megaglest --starthost
gamedir [/home/tomreyn/megaglest-3.6.0.3]
Looking for LDCONFIG []...
LDCONFIG environment variable is not set...
Found LDCONFIG using which [/sbin/ldconfig]...
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libopenal.so.1] was found in [/usr/lib/libopenal.so.1]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libdirectfb-1.2.so.0] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libdirectfb-1.2.so.9] pointed to from [/home/tomreyn/megaglest-3.6.0.3/lib/libdirectfb-1.2.so.0]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libfusion-1.2.so.0] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libfusion-1.2.so.9] pointed to from [/home/tomreyn/megaglest-3.6.0.3/lib/libfusion-1.2.so.0]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libdirect-1.2.so.0] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libdirect-1.2.so.9] pointed to from [/home/tomreyn/megaglest-3.6.0.3/lib/libdirect-1.2.so.0]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libjpeg.so.62] was found in [/usr/lib/x86_64-linux-gnu/libjpeg.so.62]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libpng15.so.15] is missing, attempting to find and link to a newer version if available...
new library link [/lib/x86_64-linux-gnu/libpng12.so.0] pointed to from [/home/tomreyn/megaglest-3.6.0.3/lib/libpng15.so.15]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libcurl.so.4] was found in [/usr/lib/x86_64-linux-gnu/libcurl.so.4]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libxerces-c-3.1.so] was found in [/usr/lib/libxerces-c-3.1.so]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libicudata.so.40] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libicudata.so.44] pointed to from [/home/tomreyn/megaglest-3.6.0.3/lib/libicudata.so.40]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libicuuc.so.40] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libicuuc.so.44] pointed to from [/home/tomreyn/megaglest-3.6.0.3/lib/libicuuc.so.40]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libGLEW.so.1.5] was found in [/usr/lib/libGLEW.so.1.5]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libGLEW.so.1.5] was found in [/usr/lib/libGLEW.so.1.5]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libogg.so.0] was found in [/usr/lib/x86_64-linux-gnu/libogg.so.0]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libvorbis.so.0] was found in [/usr/lib/x86_64-linux-gnu/libvorbis.so.0]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libvorbisfile.so.3] was found in [/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libfontconfig.so.1] was found in [/usr/lib/x86_64-linux-gnu/libfontconfig.so.1]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libfreetype.so.6] was found in [/usr/lib/x86_64-linux-gnu/libfreetype.so.6]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libgnutls.so.26] was found in [/usr/lib/x86_64-linux-gnu/libgnutls.so.26]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libldap_r-2.4.so.2] was found in [/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libresolv.so.2] was found in [/lib/x86_64-linux-gnu/libresolv.so.2]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/liblua5.1.so.0] was found in [/usr/lib/x86_64-linux-gnu/liblua5.1.so.0]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libftgl.so.2] was found in [/usr/lib/libftgl.so.2]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libircclient.so.1] was found in [/usr/lib/libircclient.so.1]
default library [/home/tomreyn/megaglest-3.6.0.3/lib/libdl.so.2] was found in [/lib/x86_64-linux-gnu/libdl.so.2]
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
megaglest v3.6.0.3
Compiled using: GNUC: 40401 [64bit] on: Jan 24 2012 13:33:42
SVN: [Rev: 3080] - using STREFLOP
In [/home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/main.cpp::handleSIGSEGV Line: 652] Error detected: signal 11:
Error saved to logfile [/home/tomreyn/.megaglest/error.log]
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
megaglest: ../../src/xcb_io.c:178: dequeue_pending_request: Zusicherung »!xcb_xlib_unknown_req_in_deq« nicht erfüllt.
[2012-03-03 20:26:11] *ERROR* In [/home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/main.cpp::handleRuntimeError Line: 416] [In [/home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/main.cpp::handleSIGSEGV Line: 652] Error detected: signal 11:
] gameInitialized = 1, program = 0x7fdbec0112e0
[2012-03-03 20:26:12] *ERROR* In [/home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/main.cpp::handleRuntimeError Line: 509] [In [/home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/main.cpp::handleSIGSEGV Line: 652] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::handleSIGSEGV(int) address [0x6d45c2] line: 657
/lib/x86_64-linux-gnu/libc.so.6:() address [0x7fdbfe284420] line: 0
./megaglest:Shared::PlatformCommon::SimpleTaskThread::~SimpleTaskThread() address [0x999d75] line: 310
./megaglest:Shared::PlatformCommon::SimpleTaskThread::execute() address [0x99f53b] line: 403
./megaglest:Shared::Platform::Thread::beginExecution(void*) address [0x9c3e9f] line: 81
/usr/lib/libSDL-1.2.so.0:() address [0x7fdc0100d705] line: 0
/usr/lib/libSDL-1.2.so.0:() address [0x7fdc010513e9] line: 0
/lib/x86_64-linux-gnu/libpthread.so.0:() address [0x7fdc00de8efc] line: 0
/lib/x86_64-linux-gnu/libc.so.6:clone() address [0x7fdbfe32f89d] line: 0
]
Aborted (core dumped)

Stack trace on core file:
Code: [Select]
$ gdb -q -n -ex bt -batch megaglest core
[some irrelevant output was edited out here]
 [Thread debugging using libthread_db enabled]
 Core was generated by `./megaglest --starthost'.
 Program terminated with signal 6, Aborted.
 #0  0x00007fdbfe2843a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 64    ../nptl/sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
     in ../nptl/sysdeps/unix/sysv/linux/raise.c
 #0  0x00007fdbfe2843a5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 #1  0x00007fdbfe287b0b in __GI_abort () at abort.c:92
 #2  0x00007fdbfe27cd4d in __GI___assert_fail (assertion=0x7fdc002687a5 "!xcb_xlib_unknown_req_in_deq", file=<optimized out>, line=178, function=<optimized out>) at assert.c:81
 #3  0x00007fdc001f4b79 in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
 #4  0x00007fdc001f5cbc in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
 #5  0x00007fdc009588db in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
 #6  0x00007fdc009574ca in ?? () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
 #7  0x00000000006f1a02 in Glest::Game::Program::loopWorker (this=0x7fdbec0112e0) at /home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/program.cpp:360
 #8  0x00000000006eeafd in Glest::Game::ExceptionHandler::handleRuntimeError(char const*) ()
 #9  0x00000000006d45c2 in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/glest_game/main/main.cpp:656
 #10 <signal handler called>
 #11 0x0000000000999d75 in Shared::PlatformCommon::SimpleTaskThread::~SimpleTaskThread (this=0x1cc5d20, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/shared_lib/sources/platform/common/simple_threads.cpp:310
 #12 0x000000000099f53b in Shared::PlatformCommon::SimpleTaskThread::execute (this=0x1cc5d20) at /home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/shared_lib/sources/platform/common/simple_threads.cpp:401
 #13 0x00000000009c3e9f in Shared::Platform::Thread::beginExecution (data=0x1cb6648) at /home/softcoder/Code/megaglest/branches/release-3.6.0.3/source/shared_lib/sources/platform/sdl/thread.cpp:79
 #14 0x00007fdc0100d705 in ?? () from /usr/lib/libSDL-1.2.so.0
 #15 0x00007fdc010513e9 in ?? () from /usr/lib/libSDL-1.2.so.0
 #16 0x00007fdc00de8efc in start_thread (arg=0x7fdbe5ffa700) at pthread_create.c:304
 #17 0x00007fdbfe32f89d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
 #18 0x0000000000000000 in ?? ()
 

Edit (tomreyn): corrected steps to reproduce the bug; added note on reproducability
« Last Edit: 6 March 2012, 00:07:33 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: [fixed] 3.6.0.3 Segfault when re-hosting quickly
« Reply #1 on: 6 March 2012, 00:09:14 »
This is most likely the same as this, after all I cannot reproduce any of these on head of trunk anymore, so I consider this one fixed, too.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·