Author Topic: [fixed] 3.7.1: Segfault in ServerInterface::update() - switching admin  (Read 1916 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Jammy, Virgo and I (all players from Europe) were playing a game on summoner, the thai headless server. We were playing on the modified Conflict map for 6 players (still sized 64x64). Two of use were playing Romans, Virgo was playing Persian, the opponents were 2 CPUs (I forgot at which difficulty). This error occurred exactly when we started our first common counter attack. We were just about to cross the river.

My client ran into a connection timeout, which resulted in a human friendly error message discplaying on my clients' screen. I assume it was the same for Jammy and Virgo.

This server has 836 MB RAM available for MG (1 GB total). It's a KVM instance running Ubuntu 12.04 with its dedicated 3.2.0 kernel on two (virtual) CPU cores.

It should be noted that this server operates under severe restrictions regarding international traffic (traffic shaping/limiting is applied on its upstream router). This may be what triggered the error, it may also be that it caused the connectivity to fail temporarily (I am now running a traffic analysis tool and it shows no indication of ICMP ping packet loss nor unstable latencies on the route to play.mg (jitter is 0.9 ms, average latency is 218.3 ms). Still, I would expect the server process not to segfault as a result.

Terminal output:
Code: [Select]
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
Error saved to logfile [/home/megaglest/.megaglest/error.log]
[2012-12-08 23:49:02] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 390] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
] gameInitialized = 1, program = 0x27c6df0
[2012-12-08 23:49:03] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 409] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f91524854a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f915247076d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]
]
Message:
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f91524854a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f915247076d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]

Aborted (core dumped)

I'm not sure why it would print two stack traces there (is this something which could/should be improved upon, too)?

error.log:
Code: [Select]
[2012-12-08 23:49:03] Runtime Error information:
======================================================
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f91524854a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f915247076d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]

gdb backtrace:
Code: [Select]
$ gdb -q -n -ex bt -batch ./megaglest ./core
[New LWP 23775]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
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=exit'.
Program terminated with signal 6, Aborted.
#0  0x00007f9152485425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#0  0x00007f9152485425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f9152488b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00000000007713d7 in Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool) ()
#3  0x0000000000743aff in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:4938
#4  <signal handler called>
#5  0x000000000091659b in setMasterserver_admin (value=<optimized out>, this=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game_settings.h:453
#6  Glest::Game::ServerInterface::update (this=0x2862940) at /home/softcoder/Code/megaglest/trunk/source/glest_game/network/server_interface.cpp:1381
#7  0x000000000077674a in Glest::Game::Program::loopWorker (this=0x27c6df0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/program.cpp:448
#8  0x0000000000768ff6 in Glest::Game::glestMain (argc=1, argv=0x0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:4793
#9  0x000000000076c703 in Glest::Game::glestMainWrapper (argc=4, argv=0x7fffaf574068) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:4971
#10 0x00007f915247076d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x00000000005db3e9 in _start ()
$

Thanks for investigating.
« Last Edit: 27 December 2012, 13:29:55 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 · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: 3.7.1: Mid-game crash in ServerInterface::update()
« Reply #1 on: 8 December 2012, 18:05:20 »
Looks like something weird happened when trying to switch to a new headless admin user (as the original was no longer connected).

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: 3.7.1: Mid-game crash in ServerInterface::update()
« Reply #2 on: 8 December 2012, 18:41:41 »
This would be in line with the lines before what I posted above as the terminal output.

So here's a more complete terminal output:

Code: [Select]
megaglest v3.7.1
Compiled using: GNUC: 40403 [64bit] on: Nov 23 2012 00:29:10 platform: Linux-X64 endianness: little
SVN: [Rev: 3948] - using STREFLOP [SSE] - [no-denormals]
Waiting for players to join and start a game...
Headless server is now running...

...followed by literally thousands of these two lines repeated all over (and nothing else):
Code: [Select]
server command []
hang up in file descriptor

then:
Code: [Select]
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 9
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 9
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 11
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 11
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 9
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 11
[2012-12-08 23:40:28] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
Starting a new game...
New game has started...
server command []
hang up in file descriptor
== 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 [47] sight [47] [6159][6159] total KB: 98
FowAlphaCellsLookupItemCache: pos [0] sight [0] [0][0] total KB: 0
Map: conflict6xtreed
Tileset: fernland
Techtree: megapack
Frame count:0
Total unit count: 47


...followed, again, by thousands of these lines:
Code: [Select]
server command []
hang up in file descriptor

...and finally:
Code: [Select]
Switching masterserver admin to slot#2...
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
Error saved to logfile [/home/megaglest/.megaglest/error.log]
[2012-12-08 23:49:02] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 390] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
] gameInitialized = 1, program = 0x27c6df0
[2012-12-08 23:49:03] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 409] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f91524854a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f915247076d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]
]
Message:
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f91524854a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f915247076d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]

Aborted (core dumped)

This non-verbose terminal output contains 135,558,405  (0.1 million) copies of the two repetitive lines discussed above.

The game was started as so:
Code: [Select]
./start_megaglest --ini-path=./ --data-path=./ --headless-server-mode=exit >> ~/.megaglest/server.log 2>&1
The ~/.megaglest/server.log terminal output log file is rotated after every game, so each file only contains the output created by a single game (verified by grepping for ^Compiled using). The file size is 130MB.

Edit: I just realize it's missing the 'vps' option when running MG. This should probably fix / work around the issue about the many lines of output. Which then seems to be a separate issue from the crash entirely.
« Last Edit: 8 December 2012, 18:48:56 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: 3.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #3 on: 9 December 2012, 16:18:00 »
This happened again today:

Code: [Select]
Starting a new game...
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
[2012-12-09 12:14:22] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 10
New game has started...
== 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 [18] sight [18] [2214][2214] total KB: 35
FowAlphaCellsLookupItemCache: pos [0] sight [0] [0][0] total KB: 0
Map: conflict
Tileset: desert2
Techtree: megapack
Frame count:0
Total unit count: 18

== Current in-game stats (interval 600) ==
Render FPS: 867[753]
Update FPS: 40[39]
Time: 1.75 [9.98]
Log buffer count: 0
UnitRangeCellsLookupItemCache: pos [274] size [274] range [457][149117] total KB: 1,192
ExploredCellsLookupItemCache: pos [921] sight [1316] [179264][124255] total KB: 2,428
FowAlphaCellsLookupItemCache: pos [0] sight [0] [0][0] total KB: 0
Map: conflict
Tileset: desert2
Techtree: megapack
Frame count:23961
Total unit count: 35

Switching masterserver admin to slot#1...
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
Error saved to logfile [/home/megaglest/.megaglest/error.log]
[2012-12-09 12:26:19] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 390] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
] gameInitialized = 1, program = 0x2710dc0
[2012-12-09 12:26:20] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 409] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7fc7ad7964a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7fc7ad78176d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]
]
Message:
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7fc7ad7964a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7fc7ad78176d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]

Aborted (core dumped)

The core file was not written since I had forgotten to delete the earlier one.
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: 3.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #4 on: 15 December 2012, 23:34:18 »
Another one:

Output:
Code: [Select]
[2012-12-16 04:22:29] *ERROR* SOCKET WRITE TIMEOUT In [/home/softcoder/Code/megaglest/trunk/source/shared_lib/sources/platform/posix/socket.cpp::isWritable Line: 1671] i = 0 sock = 9
New game has started...
== 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 [38] sight [38] [4718][4718] total KB: 75
FowAlphaCellsLookupItemCache: pos [0] sight [0] [0][0] total KB: 0
Map: conflict
Tileset: desert2
Techtree: megapack
Frame count:0
Total unit count: 38

Switching masterserver admin to slot#1...
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
Error saved to logfile [/home/megaglest/.megaglest/error.log]
[2012-12-16 04:26:01] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 390] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:
] gameInitialized = 1, program = 0x14d2dc0
[2012-12-16 04:26:01] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 409] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f16333514a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f163333c76d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]
]
Message:
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 4934] Error detected: signal 11:

Stack Trace:
./megaglest:Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool)address [0x771217] line: 0
./megaglest:Glest::Game::handleSIGSEGV(int)address [0x743aff] line: 4939
/lib/x86_64-linux-gnu/libc.so.6:()address [0x7f16333514a0] line: 0
./megaglest:Glest::Game::ServerInterface::update()address [0x91659b] line: 1381
./megaglest:Glest::Game::Program::loopWorker()address [0x77674a] line: 449
./megaglest:Glest::Game::glestMain(int, char**)address [0x768ff6] line: 4793
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x76c703] line: 4973
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f163333c76d] line: 0
./megaglest() [0x5db3e9]address [0x5db3e9]

Aborted (core dumped)
ERROR: Server has quit unexpectedly.

GDB:
Code: [Select]
megaglest@dev2:~/megaglest$ gdb -q -n -ex bt -batch ./megaglest core
[New LWP 14916]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
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 6, Aborted.
#0  0x00007f1633351425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#0  0x00007f1633351425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f1633354b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00000000007713d7 in Glest::Game::ExceptionHandler::handleRuntimeError(char const*, bool) ()
#3  0x0000000000743aff in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:4938
#4  <signal handler called>
#5  0x000000000091659b in setMasterserver_admin (value=<optimized out>, this=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/game/game_settings.h:453
#6  Glest::Game::ServerInterface::update (this=0x156e910) at /home/softcoder/Code/megaglest/trunk/source/glest_game/network/server_interface.cpp:1381
#7  0x000000000077674a in Glest::Game::Program::loopWorker (this=0x14d2dc0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/program.cpp:448
#8  0x0000000000768ff6 in Glest::Game::glestMain (argc=666721760, argv=0x14c27e0) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:4793
#9  0x000000000076c703 in Glest::Game::glestMainWrapper (argc=4, argv=0x7fff27bd9e78) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:4971
#10 0x00007f163333c76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x00000000005db3e9 in _start ()

This got triggered by <MG_zaw2001_160>, a player from the 64.113.160.0/20 netblock (CC Communications, Nevada, USA).

Is there something I should do to narrow this down further?
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.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #5 on: 16 December 2012, 06:14:27 »
I'll look at these stack traces and get back to you.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: 3.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #6 on: 19 December 2012, 19:56:15 »
Try out svn and see if the issue is fixed or not?

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: 3.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #7 on: 19 December 2012, 20:24:10 »
Should I expect the resulting binary to be backwards compatible to 3.7.1? I.e. Can I build it on the server and use it to host games for 3.7.1 clients?
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.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #8 on: 19 December 2012, 20:29:19 »
Yes it will be.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: 3.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #9 on: 19 December 2012, 21:53:50 »
Thanks, I've updated only the 'megaglest' binary on this server (making it version 3.7.2-dev) and so far there have been no problems. We will see how it goes.
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.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #10 on: 26 December 2012, 07:19:05 »
Has there been any segfaults since this update? Just checking to see if the issue might possibly be resolved?

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: 3.7.1: Segfault in ServerInterface::update() - switching admin
« Reply #11 on: 26 December 2012, 18:20:57 »
Not on the server which I installed your patch on (summoner), so chances are it helped.

One of the engineer's seems to have failed (an assumption which is solely based on the server being no longer listed on the masterserver), but those are running 3.7.1 (release).

Treba: if you read this, please consider inspecting the situation.
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 · · ·

 

anything