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 09 Feb 2013 09:39:12 PM UTC  
 
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.0

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 23 Feb 2013 02:10:52 PM UTC, 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 20 Feb 2013 09:35:52 AM UTC, 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 20 Feb 2013 09:35:49 AM UTC, 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 17 Feb 2013 01:19:20 PM UTC, 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 17 Feb 2013 01:16:08 PM UTC, 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 17 Feb 2013 12:43:58 PM UTC, comment #1:

I can confirm, but it needs a step more :

  • pamcakes: /delegate restore
pepeto <pepeto>
Project MemberIn charge of this item.
Sat 09 Feb 2013 09:39:12 PM UTC, 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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 20 Feb 2013 09:36:03 AM UTCpepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 19 Feb 2013 09:19:27 AM UTCpepetoAssigned toNone=>pepeto
    Sun 17 Feb 2013 01:19:20 PM UTCpepetoAttached File-=>Added connection_delegate_restore.diff, #17238
      CategoryNone=>general
      StatusConfirmed=>Ready For Test
    Sun 17 Feb 2013 12:43:58 PM UTCpepetoStatusNone=>Confirmed
    Sat 09 Feb 2013 09:44:53 PM UTCcazfiSeverity3 - Normal=>5 - Blocker
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup