Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12809) pubserver S2_0 crash in sanity_check_players
Home

[Freeciv-Dev] (PR#12809) pubserver S2_0 crash in sanity_check_players

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12809) pubserver S2_0 crash in sanity_check_players
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Apr 2005 17:22:29 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12809 >

I was playing on pubserver, and it crashed.  For some reason no 
backtrace was e-mailed.

http://pubserver.freeciv.org/games/401219/

(gdb) bt
#0  0x400750a1 in kill () from /lib/libc.so.6
#1  0x40074e99 in raise () from /lib/libc.so.6
#2  0x40076364 in abort () from /lib/libc.so.6
#3  0x4006f15d in __assert_fail () from /lib/libc.so.6
#4  0x0807cea7 in check_players () at sanitycheck.c:407
#5  0x0804f767 in main_loop () at srv_main.c:1528
#6  0x0804f979 in srv_main () at srv_main.c:1648
#7  0x0804a5f0 in main (argc=14, argv=0xbfffe1d4) at civserver.c:200
#8  0x400641c4 in __libc_start_main () from /lib/libc.so.6

this line is for the assertion that checks that dead players have no 
units.  This player is marked as dead but has some units.

(gdb) p game.players[player_no].units
$3 = {list = {nelements = 6, head_link = 0x847a690, tail_link = 0x82f8f48}}
(gdb) p game.players[player_no].is_alive
$4 = false
(gdb) p game.players[player_no].name
$8 = "Alaric\0r", '\0' <repeats 23 times>

more information is available of course.

kill_player quite obviously kills all cities and units that the player 
has.  But there is one other place where is_alive is set to FALSE: in 
the /observe command.

Note that in the development branch the sanity checks use the 
SANITY_CHECK macro, which only asserts when compiling with debugging. 
Perhaps this should be packported to 2.0.  (This can easily be done 
after 2.0.0 since it's most important for pubserver.)

-----

Now, there was some craziness with observing that happened earlier in 
this game.  The below is from memory but is pretty accurate.

I connected to the game as the second player (kasei was first).  kilo 
connected third and typed /observe.  But he said that this caused him 
not to observe a global observer but rather to observe me; it also 
removed the player that had been created when he connected.  I suggested 
that he could /create kilo and then /take kilo; he did this and then he 
was back to controlling kilo.  Then I tried to do /observe and got this 
line: "dorje already controls dorje. Using 'observe' would remove 
dorje".  So either the empty name was being expanded to "dorje" or I had 
somehow been magically marked as the global observer.  I had no idea 
what to do about this, but I knew it was bad.  So I disconnected and 
reconnected.  Now kilo did /observe and a new global-observer player was 
created.

A little while later another player connected.  The three of us (with 
kilo still observing) decided to start.  But oops - we realized in 
nation-selection that the kilo *player* that had been /created was still 
there.  Nation-selection was completely stalled since this player didn't 
pick a nation.  We sat in confusion for about 60 seconds, then kasei 
left (and his player was removed, silently AFAICR).  Then we aitoggled 
kilo and so the kilo player chose its nation and we began the game.

As we played, I believe kilo continued observing.  Other players joined 
and left.  Some of them may have observed for a while, I don't know. 
Eventually the server crashed for seemingly no reason.

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12809) pubserver S2_0 crash in sanity_check_players, Jason Short <=