Author Topic: 3.9.1+git4628.11ac54a: SegF, headless General, ConnectionSlot::hasDataToRead  (Read 870 times)

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
The General headless server (Ubuntu 13.10 64-bit) ran into this segmentation fault today (Feb 26 17:33 UTC, roughly an hour before I'm posting this) while two network players were playing Japanese.

The game ID is b6ca0fbc-9f0b-11e3-8337-7dbb6aca62c7.

Console output:
Code: [Select]
== Current in-game stats (interval 600) ==
Render FPS: -1[-1]
Update FPS: 0[-1]
Time: 7.50 [0.00]
Log buffer count: 0
UnitRangeCellsLookupItemCache: pos [0] size [0] range [0][0] total KB: 0
ExploredCellsLookupItemCache: pos [36] sight [36] [16396][4957] total KB: 170
FowAlphaCellsLookupItemCache: surface count [0] total KB: 0
Selection type: color
Color picking used color list size: 831
Map: conflict
Tileset: desert2
Techtree: japanese
Frame count:0
Total unit count: 36

*TESTING*: START Waiting for lagging client playerIndex = 0 [Djordje] clientLagCount = 19.000000 [0.000000]
Switching masterserver admin to slot#1...
In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:
Error saved to logfile [/home/megaglest/.megaglest/error.log]
*ERROR* [2014-02-26 17:33:31] In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleRuntimeError Line: 629] [In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:
] gameInitialized = 1, program = 0x17384b0
*ERROR* [2014-02-26 17:33:34] In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleRuntimeError Line: 648] [In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x7a7117] line: 639
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x7a780f] line: 5607
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f5a8d7e3ff0] line: 0
./megaglest:Shared::Platform::Mutex::p()address [0xc133ab] line: 517
./megaglest:Glest::Game::ConnectionSlot::hasDataToRead()address [0xa0d46f] line: 1630
./megaglest:Glest::Game::ConnectionSlot::update(bool, int)address [0xa12238] line: 636
./megaglest:Glest::Game::ConnectionSlot::updateSlot(Glest::Game::ConnectionSlotEvent*)address [0xa1a85b] line: 516
./megaglest:Glest::Game::ConnectionSlotThread::execute()address [0xa1b100] line: 264
./megaglest:Shared::Platform::Thread::beginExecution(void*)address [0xc17452] line: 297
/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0:()address [0x7f5a9193eac8] line: 0
/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0:()address [0x7f5a9197e189] line: 0
/lib/x86_64-linux-gnu/libpthread.so.0:()address [0x7f5a91716f6e] line: 0
/lib/x86_64-linux-gnu/libc.so.6:clone()address [0x7f5a8d8a79cd] line: 0
]
Message:
In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x7a7117] line: 639
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x7a780f] line: 5607
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f5a8d7e3ff0] line: 0
./megaglest:Shared::Platform::Mutex::p()address [0xc133ab] line: 517
./megaglest:Glest::Game::ConnectionSlot::hasDataToRead()address [0xa0d46f] line: 1630
./megaglest:Glest::Game::ConnectionSlot::update(bool, int)address [0xa12238] line: 636
./megaglest:Glest::Game::ConnectionSlot::updateSlot(Glest::Game::ConnectionSlotEvent*)address [0xa1a85b] line: 516
./megaglest:Glest::Game::ConnectionSlotThread::execute()address [0xa1b100] line: 264
./megaglest:Shared::Platform::Thread::beginExecution(void*)address [0xc17452] line: 297
/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0:()address [0x7f5a9193eac8] line: 0
/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0:()address [0x7f5a9197e189] line: 0
/lib/x86_64-linux-gnu/libpthread.so.0:()address [0x7f5a91716f6e] line: 0
/lib/x86_64-linux-gnu/libc.so.6:clone()address [0x7f5a8d8a79cd] line: 0

Game ending with stats:
-----------------------
Description: Conflict
Faction count: 4
Game duration (mins): 0
Max Concurrent Units: 40
Total EndGame Concurrent Unit Count: 40
player #0 Djordje (Network) faction: Japanese Team: 0 victory: 0 # kills: 0 # enemy kills: 0 # deaths: 0
# units produced: 0 # resources harvested: 0
player #1 Brle23 (Network) faction: Japanese Team: 0 victory: 0 # kills: 0 # enemy kills: 0 # deaths: 0
# units produced: 0 # resources harvested: 0
player #2 AI1 (CPU x 1.0) faction: Japanese Team: 1 victory: 0 # kills: 0 # enemy kills: 0 # deaths: 0
# units produced: 1 # resources harvested: 25
player #3 AI2 (CPU x 1.0) faction: Japanese Team: 1 victory: 0 # kills: 0 # enemy kills: 0 # deaths: 0
# units produced: 1 # resources harvested: 50
-----------------------

Headless server is about to quit...
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x17d5400] isBaseThread: 1, Name: [connection_slot.cpp_396]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x17d5400] isBaseThread: 1, Name: [connection_slot.cpp_396]
Waiting for the following threads to exit [1]:
Thread index: 0 ptr [0x17d5400] isBaseThread: 1, Name: [connection_slot.cpp_396Segmentation fault (core dumped)
ERROR: Server has quit unexpectedly.

GDB trace:
Code: [Select]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./megaglest --ini-path=./ --data-path=./ --headless-server-mode=vps,exit'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000068a5db in std::_Rb_tree<std::string, std::pair<std::string const, long>, std::_Select1st<std::pair<std::string const, long> >, std::less<std::string>, std::allocator<std::pair<std::string const, long> > >::_M_erase(std::_Rb_tree_node<std::pair<std::string const, long> >*) ()
#0  0x000000000068a5db in std::_Rb_tree<std::string, std::pair<std::string const, long>, std::_Select1st<std::pair<std::string const, long> >, std::less<std::string>, std::allocator<std::pair<std::string const, long> > >::_M_erase(std::_Rb_tree_node<std::pair<std::string const, long> >*) ()
#1  0x000000000068a80d in std::map<std::string, long, std::less<std::string>, std::allocator<std::pair<std::string const, long> > >::~map() ()
#2  0x0000000000681527 in Glest::Game::Game::~Game (this=0x17daf60, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/game/game.cpp:471
#3  0x00000000007e2e93 in Glest::Game::Program::~Program (this=0x17384b0, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/main/program.cpp:283
#4  0x00000000007a7292 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=<optimized out>, getStackTraceString=true) at /home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp:723
#5  0x00000000007a780f in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp:5606
#6  <signal handler called>
#7  Shared::Platform::Mutex::p (this=0x3f800000) at /home/softcoder/Code/megaglest/git/source/shared_lib/sources/platform/sdl/thread.cpp:517
#8  0x0000000000a0d46f in Lock (this=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/../shared_lib/include/platform/sdl/thread.h:193
#9  MutexSafeWrapper (ownerId=..., mutex=<optimized out>, this=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/../shared_lib/include/platform/sdl/thread.h:164
#10 Glest::Game::ConnectionSlot::hasDataToRead (this=0x17e08c0) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:1630
#11 0x0000000000a12238 in Glest::Game::ConnectionSlot::update (this=0x17e08c0, checkForNewClients=216, lockedSlotIndex=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:636
#12 0x0000000000a1a85b in Glest::Game::ConnectionSlot::updateSlot (this=0x17e08c0, event=0x7f5a7effac20) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:512
#13 0x0000000000a1b100 in slotUpdateTask (event=<optimized out>, this=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:158
#14 Glest::Game::ConnectionSlotThread::execute (this=0x17d5400) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:264
#15 0x0000000000c17452 in Shared::Platform::Thread::beginExecution (data=data@entry=0x17d5400) at /home/softcoder/Code/megaglest/git/source/shared_lib/sources/platform/sdl/thread.cpp:295
#16 0x00007f5a9193eac8 in SDL_RunThread (data=0x17e1720) at ../../src/thread/SDL_thread.c:204
#17 0x00007f5a9197e189 in RunThread (data=<optimized out>) at ../../src/thread/pthread/SDL_systhread.c:47
#18 0x00007f5a91716f6e in start_thread (arg=0x7f5a7effd700) at pthread_create.c:311
#19 0x00007f5a8d8a79cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
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 · · ·