Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matchmaker game timeout sometimes cancels the wrong game #866

Open
Askaholic opened this issue Dec 14, 2021 · 14 comments
Open

Matchmaker game timeout sometimes cancels the wrong game #866

Askaholic opened this issue Dec 14, 2021 · 14 comments
Assignees
Labels

Comments

@Askaholic
Copy link
Collaborator

Here, the first game 15904960 failed to start at around 17:59:29 however, no match cancelled message was sent. After about 10 minutes the handler in LadderService finally saw that the game didn't launch and sent the match cancelled message at 18:10:46 which ended up cancelling a different game that had launched in the mean time.

I think we should first of all include a game id in the match cancelled message so that the client can check if the message that's arriving is actually meant for the current game. And second of all figure out why it took 10 minutes for the game to time out when the maximum timeout should only have been 2.66 minutes.

INFO     Dec 13  17:58:38 LadderGame.15904960            Added game connection GameConnection(Player(TreefolkNoob, 206383, Rating(mean=2128.88, dev=85.6139), Rating(mean=2159.26, dev=65.3348)), Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  17:58:44 LadderGame.15904960            Added game connection GameConnection(Player(Itness, 282306, Rating(mean=1518.76, dev=81.5663), Rating(mean=1953.86, dev=366.154)), Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  17:58:45 LadderGame.15904960            Added game connection GameConnection(Player(Wpierdolo, 282284, Rating(mean=1547.42, dev=80.9831), Rating(mean=1155.62, dev=66.3089)), Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  17:59:29 LadderGame.15904960            Removed game connection GameConnection(Player(TreefolkNoob, 206383, Rating(mean=2128.88, dev=85.6139), Rating(mean=2159.26, dev=65.3348)), Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  17:59:29 LadderGame.15904960            Game cancelled pre launch
INFO     Dec 13  17:59:38 LadderGame.15904960            Removed game connection GameConnection(Player(Wpierdolo, 282284, Rating(mean=1547.42, dev=80.9831), Rating(mean=1155.62, dev=66.3089)), Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  17:59:39 LadderGame.15904960            Removed game connection GameConnection(Player(Itness, 282306, Rating(mean=1518.76, dev=81.5663), Rating(mean=1953.86, dev=366.154)), Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:04:35 LadderGame.15904996            Added game connection GameConnection(Player(TreefolkNoob, 206383, Rating(mean=2128.88, dev=85.6139), Rating(mean=2159.26, dev=65.3348)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:04:41 LadderGame.15904996            Added game connection GameConnection(Player(Itness, 282306, Rating(mean=1518.76, dev=81.5663), Rating(mean=1953.86, dev=366.154)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:04:43 LadderGame.15904996            Added game connection GameConnection(Player(Wpierdolo, 282284, Rating(mean=1547.42, dev=80.9831), Rating(mean=1155.62, dev=66.3089)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:04:47 LadderGame.15904996            Added game connection GameConnection(Player(Vladislav__, 232662, Rating(mean=1571.54, dev=106.25), Rating(mean=1500.0, dev=500.0)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:04:52 GameConnection                 Launching game Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip)
INFO     Dec 13  18:04:52 LadderGame.15904996            Game launched
ERROR    Dec 13  18:10:46 LadderService                  Ladder game failed to start Game(15904960, TreefolkNoob, maps/turtle_rocks.v0002.zip)
INFO     Dec 13  18:10:46 LadderGame.15904996            Removed game connection GameConnection(Player(TreefolkNoob, 206383, Rating(mean=2128.88, dev=85.6139), Rating(mean=2159.26, dev=65.3348)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:12:22 LadderGame.15904996            282306 reported result for army 1: defeat -10
INFO     Dec 13  18:12:23 LadderGame.15904996            232662 reported result for army 1: defeat -10
INFO     Dec 13  18:12:23 LadderGame.15904996            282284 reported result for army 1: defeat -10
INFO     Dec 13  18:14:09 LadderGame.15904996            282284 reported result for army 3: defeat -10
INFO     Dec 13  18:14:09 LadderGame.15904996            282306 reported result for army 3: defeat -10
INFO     Dec 13  18:14:11 LadderGame.15904996            Removed game connection GameConnection(Player(Vladislav__, 232662, Rating(mean=1571.54, dev=106.25), Rating(mean=1500.0, dev=500.0)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:14:17 LadderGame.15904996            282284 reported result for army 2: victory 10
INFO     Dec 13  18:14:18 LadderGame.15904996            282284 reported result for army 4: victory 10
INFO     Dec 13  18:14:18 LadderGame.15904996            282306 reported result for army 2: victory 10
INFO     Dec 13  18:14:18 LadderGame.15904996            282306 reported result for army 4: victory 10
ERROR    Dec 13  18:14:21 GameStatsService               Error processing game stats for TreefolkNoob in game 15904996
ERROR    Dec 13  18:14:21 GameStatsService               Error processing game stats for Wpierdolo in game 15904996
INFO     Dec 13  18:14:21 LadderGame.15904996            Game finished normally
INFO     Dec 13  18:14:21 LadderGame.15904996            Result for army 1, player: Player(TreefolkNoob, 206383, Rating(mean=2128.88, dev=85.6139), Rating(mean=2159.26, dev=65.3348)): score 0, outcome ArmyOutcome.DEFEAT
INFO     Dec 13  18:14:21 LadderGame.15904996            Result for army 4, player: Player(Itness, 282306, Rating(mean=1518.76, dev=81.5663), Rating(mean=1953.86, dev=366.154)): score 1, outcome ArmyOutcome.VICTORY
INFO     Dec 13  18:14:21 LadderGame.15904996            Result for army 2, player: Player(Wpierdolo, 282284, Rating(mean=1547.42, dev=80.9831), Rating(mean=1155.62, dev=66.3089)): score 1, outcome ArmyOutcome.VICTORY
INFO     Dec 13  18:14:21 LadderGame.15904996            Result for army 3, player: Player(Vladislav__, 232662, Rating(mean=1571.54, dev=106.25), Rating(mean=1500.0, dev=500.0)): score 0, outcome ArmyOutcome.DEFEAT
INFO     Dec 13  18:14:21 LadderGame.15904996            Score for player Player(TreefolkNoob, 206383, Rating(mean=2128.88, dev=85.6139), Rating(mean=2159.26, dev=65.3348)): score 0, outcome ArmyOutcome.DEFEAT
INFO     Dec 13  18:14:21 LadderGame.15904996            Score for player Player(Itness, 282306, Rating(mean=1518.76, dev=81.5663), Rating(mean=1953.86, dev=366.154)): score 1, outcome ArmyOutcome.VICTORY
INFO     Dec 13  18:14:21 LadderGame.15904996            Score for player Player(Wpierdolo, 282284, Rating(mean=1547.42, dev=80.9831), Rating(mean=1155.62, dev=66.3089)): score 1, outcome ArmyOutcome.VICTORY
INFO     Dec 13  18:14:21 LadderGame.15904996            Score for player Player(Vladislav__, 232662, Rating(mean=1571.54, dev=106.25), Rating(mean=1500.0, dev=500.0)): score 0, outcome ArmyOutcome.DEFEAT
ERROR    Dec 13  18:14:21 GameStatsService               Error processing game stats for Vladislav__ in game 15904996
ERROR    Dec 13  18:14:21 GameStatsService               Error processing game stats for Itness in game 15904996
INFO     Dec 13  18:14:30 LadderGame.15904996            Removed game connection GameConnection(Player(Wpierdolo, 282284, Rating(mean=1561.9271869318663, dev=80.9022179515306), Rating(mean=1155.62, dev=66.3089)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
INFO     Dec 13  18:14:50 LadderGame.15904996            Removed game connection GameConnection(Player(Itness, 282306, Rating(mean=1518.76, dev=81.5663), Rating(mean=1953.86, dev=366.154)), Game(15904996, TreefolkNoob, maps/turtle_rocks.v0002.zip))
@Askaholic Askaholic added the bug label Dec 14, 2021
@Askaholic Askaholic self-assigned this Dec 14, 2021
@Sheikah45
Copy link
Member

So people are able to requeue even though the server still has them in a game? Should the removal of people from a game only happen once the cancellation and failure to start is officially recognized?

@Askaholic
Copy link
Collaborator Author

Well what happens here is that one of the players never connects to the first game and after a while the other 3 leave the game and requeue. They're not in the game anymore and the server knows that, however when the game finally does time out it just sends the cancelled message to everyone who was in the match (everyone who received a corresponding match_found message).

I think I'm going to start by fixing the issue that I know exists which is that the match can take way too long to time out, and I wanted to add the game id to the message anyways... After that I'll think about if it's really worth trying to make the player state tracking more complicated, because I think what you're suggesting is a lot easier said than done given how it's implemented right now.

@Sheikah45
Copy link
Member

Understood. As that tracking would depend on how it is currently done. I would also wonder if it is possible to just send a cancel message once any of the game connections are dopped during the set up phase but not sure if that requires the same tracking

@Askaholic
Copy link
Collaborator Author

Yea that would be easier to do but it would prevent any reconnection attempts. Although, I don’t think we have a system in place for reconnecting in that way anyways so it would probably be fine to do that.

@Sheikah45
Copy link
Member

Just as a second reference apparently this can also happen with one game without relaunchign as swkoll had a game that started the all players got match cancelled

@BlackYps BlackYps added this to To do in Team Matchmaker via automation Jan 1, 2022
Askaholic added a commit that referenced this issue Jan 2, 2022
* Add game id to match_cancelled message

* Refactor launch_game so it can be called without awaiting
@BlackYps
Copy link
Collaborator

BlackYps commented Jan 7, 2022

Is there a reason that this is still open?

@BlackYps BlackYps moved this from To do to Assigned in Team Matchmaker Jan 7, 2022
@Askaholic
Copy link
Collaborator Author

Just as a second reference apparently this can also happen with one game without relaunchign as swkoll had a game that started the all players got match cancelled

Wait what? I'm not sure I understand what you're saying.

@Sheikah45
Copy link
Member

The cancel message happened after the game had already launched and been playing for a few minutes.

@Sheikah45
Copy link
Member

But no one had requeued or anything

@Askaholic
Copy link
Collaborator Author

Game id?

@Sheikah45
Copy link
Member

It never got a game id that I am aware of as it never showed in replay vault

@Askaholic
Copy link
Collaborator Author

It will still have an id, although if it didn’t properly launch then it won’t have been written to the database

@Sheikah45
Copy link
Member

Yes so I meant it doesn't have an id that I can recover

1 similar comment
@Sheikah45
Copy link
Member

Yes so I meant it doesn't have an id that I can recover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Assigned
Team Matchmaker
  
Assigned
Development

No branches or pull requests

3 participants