Author Topic: [fixed] 3.9.1, Linux-i686 headless: SegF in ConnectionSlot::update (l.816)  (Read 825 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Looks like 4588.aee2417: Headless SegF in ConnectionSlotThread::execute may have made it into 3.9.1. This SegF took place on headless server fakir ('Brazil' on play.mg) today:

Code: (Terminal output) [Select]
Thu Jan 23 17:41:49 UTC 2014
Starting server...
gamedir [/opt/megaglest/3.9.1]

...

Disabled reading from console [vps]
Forcing quit after game has completed [exit]
megaglest v3.9.1
Compiled using: GNUC: 40403 on: Jan 18 2014 00:56:43 platform: Linux endianness: little
GIT: [Rev: 4628.11ac54a] - using STREFLOP [SSE] - [no-denormals]

...

Starting a new game...
Game unique identifier is: a37c4612-8455-11e3-af1c-6f6b0513b114
New game has started...
...

== Current in-game stats (interval 600) ==
Render FPS: 751[767]
Update FPS: 40[40]
Time: 10.97 [39.91]
Log buffer count: 0
UnitRangeCellsLookupItemCache: pos [5651] size [5685] range [13243][4669815] total KB: 18,679
ExploredCellsLookupItemCache: pos [9499] sight [16941] [4533344][2185716] total KB: 26,876
FowAlphaCellsLookupItemCache: surface count [0] total KB: 0
Selection type: color
Color picking used color list size: 3619
Map: domination_isles
Tileset: desert2
Techtree: megapack
Frame count:95791
Total unit count: 403

*TESTING*: START Waiting for lagging client playerIndex = 1 [pawel o] clientLagCount = 31.000000 [15.000000]
*TESTING*: START Waiting for lagging client playerIndex = 3 [Pentel] clientLagCount = 0.000000 [10.000000]
*TESTING*: FINISHED Waiting for lagging client playerIndex = 3 [Pentel]
*ERROR* [2014-01-24 13:40:10] In [/home/softcoder/Code/megaglest/git/source/shared_lib/sources/platform/posix/socket.cpp::receive Line: 1463] additionalBytes == -1
*ERROR* [2014-01-24 13:40:10] In [network_message.cpp::receive Line: 1669] ERROR header not received as expected
In [/home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp::handleSIGSEGV Line: 5602] Error detected: signal 11:
Error saved to logfile [/opt/megaglest//.megaglest/error.log]
terminate called after throwing an instance of 'Shared::Platform::megaglest_runtime_error'
  what():  surfaceCells == NULL
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0x88c148e] line: 305
./megaglest:Glest::Game::Map::getSurfaceCell(int, int) constaddress [0x82341a4] line: 286
./megaglest:Glest::Game::Map::end()address [0x878b018] line: 324
./megaglest:Glest::Game::World::end()address [0x87b5250] line: 201
./megaglest:Glest::Game::Game::~Game()address [0x831efd9] line: 437
./megaglest:Glest::Game::Program::~Program()address [0x8433cde] line: 284
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x83e44c7] line: 727
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x83e4b21] line: 5607
[0xb7757400]address [0xb7757400] line: 0
[0xa2ba688]address [0xa2ba688] line: 0
./megaglest:Glest::Game::ConnectionSlot::update(bool, int)address [0x8626313] line: 816
./megaglest:Glest::Game::ConnectionSlot::updateSlot(Glest::Game::ConnectionSlotEvent*)address [0x8628ef6] line: 512
./megaglest:Glest::Game::ConnectionSlotThread::execute()address [0x86296c7] line: 264
./megaglest:Shared::Platform::Thread::beginExecution(void*)address [0x88cbea5] line: 297
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0:()address [0xb76c4355] line: 0

*ERROR* [2014-01-24 13:40:10] 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 = 0xa266640
*ERROR* [2014-01-24 13:40:12] 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 [0x83e431d] line: 638
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x83e4b21] line: 5607
[0xb7757400]address [0xb7757400] line: 0
[0xa2ba688]address [0xa2ba688] line: 0
./megaglest:Glest::Game::ConnectionSlot::update(bool, int)address [0x8626313] line: 816
./megaglest:Glest::Game::ConnectionSlot::updateSlot(Glest::Game::ConnectionSlotEvent*)address [0x8628ef6] line: 512
./megaglest:Glest::Game::ConnectionSlotThread::execute()address [0x86296c7] line: 264
./megaglest:Shared::Platform::Thread::beginExecution(void*)address [0x88cbea5] line: 297
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0:()address [0xb76c4355] 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 [0x83e431d] line: 638
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x83e4b21] line: 5607
[0xb7757400]address [0xb7757400] line: 0
[0xa2ba688]address [0xa2ba688] line: 0
./megaglest:Glest::Game::ConnectionSlot::update(bool, int)address [0x8626313] line: 816
./megaglest:Glest::Game::ConnectionSlot::updateSlot(Glest::Game::ConnectionSlotEvent*)address [0x8628ef6] line: 512
./megaglest:Glest::Game::ConnectionSlotThread::execute()address [0x86296c7] line: 264
./megaglest:Shared::Platform::Thread::beginExecution(void*)address [0x88cbea5] line: 297
/usr/lib/i386-linux-gnu/libSDL-1.2.so.0:()address [0xb76c4355] line: 0

Game ending with stats:
-----------------------
Description: Domination Isles
Faction count: 4
Game duration (mins): 40
Max Concurrent Units: 422
Total EndGame Concurrent Unit Count: 422
player #0 AI1 (CPU (Easy) x 0.7) faction: Norsemen Team: 0 victory: 0 # kills: 23 # enemy kills: 22 # deaths: 71
# units produced: 54 # resources harvested: 5723
player #1 pawel o (Network x 1.0) player left before end faction: Persian Team: 2 victory: 0 # kills: 69 # enemy kills: 68 # deaths: 34
# units produced: 292 # resources harvested: 39233
player #2 AI2 (CPU (Easy) x 0.7) faction: Indian Team: 0 victory: 0 # kills: 19 # enemy kills: 19 # deaths: 46
# units produced: 30 # resources harvested: 4785
player #3 Pentel (Network) faction: Magic Team: 3 victory: 0 # kills: 65 # enemy kills: 59 # deaths: 26
# units produced: 124 # resources harvested: 46153
-----------------------

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

Code: (gdb -q -n -ex "bt" -batch megaglest core) [Select]
...
Core was generated by `./megaglest --ini-path=./ --data-path=./ --headless-server-mode=vps,exit'.
Program terminated with signal 6, Aborted.
#0  0xb7757424 in __kernel_vsyscall ()
#0  0xb7757424 in __kernel_vsyscall ()
#1  0xb6c5daff in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb6c61083 in __GI_abort () at abort.c:90
#3  0xb6e90605 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#4  0xb6e8e273 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#5  0xb6e8e2af in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#6  0xb6e8e50e in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#7  0x082341c4 in Glest::Game::Map::getSurfaceCell (this=0xa3415d8, sx=0, sy=0) at /home/softcoder/Code/megaglest/git/source/glest_game/world/map.h:286
#8  0x0878b018 in Glest::Game::Map::end (this=0xa3415d8) at /home/softcoder/Code/megaglest/git/source/glest_game/world/map.cpp:324
#9  0x087b5250 in Glest::Game::World::end (this=0xa3415a4) at /home/softcoder/Code/megaglest/git/source/glest_game/world/world.cpp:200
#10 0x0831efd9 in Glest::Game::Game::~Game (this=0xa341570, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/game/game.cpp:435
#11 0x08433cde in Glest::Game::Program::~Program (this=0xa266640, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/git/source/glest_game/main/program.cpp:283
#12 0x083e44c7 in Glest::Game::ExceptionHandler::handleRuntimeError (msg=0x0, getStackTraceString=true) at /home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp:723
#13 0x083e4b21 in Glest::Game::handleSIGSEGV (sig=11) at /home/softcoder/Code/megaglest/git/source/glest_game/main/main.cpp:5606
#14 <signal handler called>
#15 0x0a2ba688 in ?? ()
#16 0x08626313 in Glest::Game::ConnectionSlot::update (this=0xa2ba690, checkForNewClients=false, lockedSlotIndex=-1) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:816
#17 0x08628ef6 in Glest::Game::ConnectionSlot::updateSlot (this=0xa2ba690, event=0xb32fb1f8) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:512
#18 0x086296c7 in slotUpdateTask (event=<optimized out>, this=0xa27b998) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:158
#19 Glest::Game::ConnectionSlotThread::execute (this=0xa27b998) at /home/softcoder/Code/megaglest/git/source/glest_game/network/connection_slot.cpp:264
#20 0x088cbea5 in Shared::Platform::Thread::beginExecution (data=data@entry=0xa27b998) at /home/softcoder/Code/megaglest/git/source/shared_lib/sources/platform/sdl/thread.cpp:295
#21 0xb76c4355 in SDL_RunThread (data=data@entry=0xa2f78c8) at ../../src/thread/SDL_thread.c:204
#22 0xb7708d6b in RunThread (data=0xa2f78c8) at ../../src/thread/pthread/SDL_systhread.c:47
#23 0xb769fd78 in start_thread (arg=0xb32fdb40) at pthread_create.c:311
#24 0xb6d2101e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:131
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 · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: 3.9.1, Linux-i686 headless: SegF in ConnectionSlot::update (l.816)
« Reply #1 on: 25 January 2014, 00:56:30 »
This may be fixed in git HEAD.

 

anything