Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] Re: (PR#13817) pubserver crash with "/l" on chatline
Home

[Freeciv-Dev] Re: (PR#13817) pubserver crash with "/l" on chatline

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#13817) pubserver crash with "/l" on chatline
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 Aug 2005 21:51:29 -0700
Reply-to: bugs@xxxxxxxxxxx

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

        my_snprintf(buf, sizeof(buf),
                    _("  %s from %s (command access level %s), bufsize=%dkb"),
                    pconn->username, pconn->addr,
                    cmdlevel_name(pconn->access_level),
                    (pconn->send_buffer->nsize>>10));

(gdb) p pconn->access_level
$5 = ALLOW_NONE
(gdb) p pconn->username
$6 = "virtualQ", '\0' <repeats 23 times>
(gdb) p pconn->send_buffer->nsize
Cannot access memory at address 0x8
(gdb) p pconn->send_buffer
$7 = (struct socket_packet_buffer *) 0x0
(gdb) p pconn->used

So the user virtualQ got disconnected but the connection was not removed 
from the player.

At

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

you can see the civserver.out file.  First x_X's connection gets cut 
(presumably loss of internet).  He tries to receonnect numerous times 
but fails since he's already connected (this is surely a bug; his new 
connection if properly authenticated should replace the old one). 
Finally he is cut for ping timeout.  Then VirtualQ connects.  Oddly, 
VirtualQ seems to be given two connections: conns 47 and 48.

2: Connection request from virtualQ from router.aquariumenvironments.com
2: c47 has client version 2.0.4
 > buf = insert into loginlog (name, logintime, address, succeed) values 
('virtualQ',unix_timestamp(),'72.16.155.26','F')
buf = insert into loginlog (name, logintime, address, succeed) values 
('virtualQ',unix_timestamp(),'72.16.155.26','S')

2: virtualQ has connected from router.aquariumenvironments.com.
 >
2: Connection request from virtualQ from router.aquariumenvironments.com
2: c48 has client version 2.0.4
 > buf = insert into loginlog (name, logintime, address, succeed) values 
('virtualQ',unix_timestamp(),'72.16.155.26','S')

2: virtualQ has connected from router.aquariumenvironments.com.

He takes a player, then takes another player (x_X's player Sun Tzu) then 
disconnects.  Finally x_X reconnects; this generates the warning

1: WARNING: trying to send data to the closed connection virtualQ from 
router.aquariumenvironments.com (connection incomplete)

.  Finally x_X does "/take Sun Tzu" to recover his player (previously 
renamed when virtualQ took over...probably another bug) and this causes 
the crash because the "invalid" connection is accessed.

The crash is easy to fix but that's not the source of the bug.

-jason





[Prev in Thread] Current Thread [Next in Thread]