bugFreeciv - Bugs: bug #20490, Player owner reconnecting to...

 
 
Show feedback again

bug #20490: Player owner reconnecting to player while delegate user attached => server assertion failures, crash

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat Feb 9 21:39:12 2013  
 
Category: generalSeverity: 5 - Blocker
Priority: 5 - NormalStatus: Fixed
Assigned to: pepeto <pepeto>Open/Closed: Closed
Release: S2_4 r22316Operating System: GNU/Linux
Planned Release: 2.4.0,2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat Feb 23 14:10:52 2013, comment #6:

Oh, I see. This crash only occurred if 'pamcakes' was completely detached at '/delegate take' time, I guess -- if they were an observer (or player), all would be fine.

Jacob Nevins <jtn>
Project Administrator
Wed Feb 20 09:35:52 2013, SVN revision 22398:

Do not attempt to attach a connection to a player or to global observer when
restoring delegation if the connection was not previously attached to something.
It was causing the server creating an incomplete player for it. Many assertion
failures and eventually a crash were consequences.

Reported by Jacob Nevins

See gna bug #20490

(Browse SVN revision 22398)

pepeto <pepeto>
Project MemberIn charge of this item.
Wed Feb 20 09:35:49 2013, SVN revision 22397:

Do not attempt to attach a connection to a player or to global observer when
restoring delegation if the connection was not previously attached to something.
It was causing the server creating an incomplete player for it. Many assertion
failures and eventually a crash were consequences.

Reported by Jacob Nevins

See gna bug #20490

(Browse SVN revision 22397)

pepeto <pepeto>
Project MemberIn charge of this item.
Sun Feb 17 13:19:20 2013, comment #3:

I think the backtrace attached was after herp reconnect. Attached patch that fix both way to reproduce these "bad things".

(file #17238)

pepeto <pepeto>
Project MemberIn charge of this item.
Sun Feb 17 13:16:08 2013, comment #2:

Oops, I missed the vital step in my description! Should have been

  • ...
  • pamcakes: /delegate take Ur-Nammu [herp's player]
  • *herp rejoins*
  • bad things happen to server

This is the scenario the backtraces come from.

Jacob Nevins <jtn>
Project Administrator
Sun Feb 17 12:43:58 2013, comment #1:

I can confirm, but it needs a step more :

  • pamcakes: /delegate restore
pepeto <pepeto>
Project MemberIn charge of this item.
Sat Feb 9 21:39:12 2013, original submission:
  • Two users initially: herp, derp, each with a player
  • Game started
  • herp: /delegate to pamcakes
  • herp leaves
  • pamcakes joins (not attached to player intitially)
  • pamcakes: /delegate take Ur-Nammu [herp's player]
  • bad things happen to server

"Bad things" include many many assertion failures and eventually a crash.

With -F, the first server assertion failure:

Without -F, I get 8112 of these assertions, then a different one, then a segfault.

(I note that this is a map of 78 x 52 = 4056 tiles, so it looks like there are two assertion failures per tile. I haven't checked if they have different backtraces.)

A similar thing happens if the delegate 'pamcakes' just leaves the game, without 'herp' reconnecting. So it may be something to do with the process of detaching the delegate from the player. This is probably the simpler case to debug, but I haven't double-checked the backtraces etc are exactly the same.

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pepeto (Posted a comment)
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Feb 20 09:36:03 2013pepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue Feb 19 09:19:27 2013pepetoAssigned toNone=>pepeto
    Sun Feb 17 13:19:20 2013pepetoAttached File-=>Added connection_delegate_restore.diff, #17238
      CategoryNone=>general
      StatusConfirmed=>Ready For Test
    Sun Feb 17 12:43:58 2013pepetoStatusNone=>Confirmed
    Sat Feb 9 21:44:53 2013cazfiSeverity3 - Normal=>5 - Blocker
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup