Share

Pioneers

Tracker: Bugs

7 Server crash when connecting - ID: 1786686
Last Update: Settings changed ( rclobus )

I've seen the server crash when a connection is made, or when a certain
amount of text is sent over the connection.

I'm able to reproduce this bug. It happens for 0.10 and 0.11 servers (I did
not test 0.9 servers, but I expect they are affected too)

When testing the method to reproduce this bug, I've killed several
inaccessible games from the meta server.


Roland Clobus ( rclobus ) - 2007-09-02 16:29

7

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 6 )




Date: 2007-11-22 21:21
Sender: rclobusSourceForge.net DonorProject Admin


Fixed in svn 0.11.4 (1360)


Date: 2007-11-16 08:41
Sender: shevek


I found the cause of the problem. If the connection was terminated before
the state machine was initialized, the CLOSE_EVENT would trigger the
assert, because route_event was getting (but not using) the current stack
function. I'll submit a patch which fixes the problem thoroughly, by not
using the current stack function when it doesn't exist (also for all other
events, where I didn't see the bug so far, but I'm not sure if it might be
possible there; if it was, it's fixed now. If not, nothing changed).


Date: 2007-11-15 15:35
Sender: shevek


I can't find the problem so far, but in case someone else wants to look, I
attached some progress. The file starts with a patch adding some debugging
stuff. Then the end of a gdb log follows, where I started
pioneers-server-gtk --debug. It first receives a broken pipe, later the
assert is triggered. Because I took some time handling the broken pipe,
the clients are disconnected (because they didn't reply to the pings).
This does not happen without gdb, but doesn't change the rest of the
behaviour.

As input I used a script which repeatedly connects and chats (the exact
output can be seen from the log). It disconnects after 100 chats.
File Added: crashlog


Date: 2007-11-15 12:14
Sender: shevek


It might also have to do with sending data before the server asked
anything. I'll look into it more.


Date: 2007-11-12 08:55
Sender: shevek


One problem is fixed, but a problem still remains. Here's how to
reproduce it:
- Start a server for two players
- Start a graphical client and an AI
- Start a viewer and create a broken pipe with it (for example by
chatting, and disconnecting before the reply is sent).
- Start a new viewer.
- Disconnect this new viewer.
An assert is hit, namely:
** ERROR **: file common/state.c: line 630 (sm_current): assertion failed:
(sm->stack_ptr >= 0)


Date: 2007-09-16 07:21
Sender: rclobusSourceForge.net DonorProject Admin


Fixed in svn 1341 (0.11.3)


Log in to comment.




Attached File ( 1 )

Filename Description Download
crashlog Download

Changes ( 11 )

Field Old Value Date By
close_date - 2007-11-22 21:21 rclobus
assigned_to shevek 2007-11-22 21:21 rclobus
resolution_id None 2007-11-22 21:21 rclobus
status_id Open 2007-11-22 21:21 rclobus
assigned_to nobody 2007-11-16 08:41 shevek
File Added 254435: crashlog 2007-11-15 15:35 shevek
close_date 2007-09-16 07:21 2007-11-12 08:55 shevek
assigned_to rclobus 2007-11-12 08:55 shevek
status_id Closed 2007-11-12 08:55 shevek
status_id Open 2007-09-16 07:21 rclobus
close_date - 2007-09-16 07:21 rclobus