Open TBestLittleHelper opened 11 months ago
looks Lila is producing an invalid TRF file
swiss BBPairing oDyWAtwp Error parsing file REDACTED: Invalid line "001 4 ignatiy-yakhont2008 2288 0.0 42 w 0 62 b Z
So I might be dumb but in the sample from kraktus we can see on round 2 for player 4
:
62 b Z
So on round 2 player 4
was paired against 62
, but since the player was missing lila gave a zero-point-bye Z
.
However in bbpPairings code:
if (
resultChar == '+'
|| resultChar == '-'
|| resultChar == 'H'
|| resultChar == 'F'
|| resultChar == 'U'
|| resultChar == 'Z'
|| resultChar == ' ')
{
gameWasPlayed = false;
if (resultChar != '+' && resultChar != '-' && opponent != id)
{
throw InvalidLineException();
}
}
Where:
char resultChar = 'Z'; // The round result
int opponent = 62; // The opponent
int id = 4; // The player id
So that explains the exception. I will try running bbpPairings with a debugger to have more insight, but I need the exact TRF file generated by lila. (@kraktus where did you get that line from?)
Thank you for looking into this. Every lichess swiss page contains a link to download the TRF.
Nice findings! The error was from the server logs, in that case the trf should be this one https://lichess.org/swiss/oDyWAtwp.trf from https://lichess.org/swiss/oDyWAtwp
Again, might be dumb, but in this file we can't see the "Z" on player 4
round 2...
It isn't the right player too: 5
instead of 4
001 5 ignatiy-yakhont2008 2288 0.0 49 w 0 69 b 0
Lichess generates a TRF after each round to send to bbp for pairing. I don't know how the players order is generated or if it supposed to be consistent across rounds, I doubt it especially considering late-joiner.
I've tried to find more recent examples in the logs, to no avail unfortunately.
So maybe the starting rank doesn't mean anything, but the result of round 2 for this player is still different:
And this is the source of the issue. Maybe try dumping the full TRF when an error occurs with bbpPairings?
I have found out a local copy I made of these logs from that day, with more occurences. I will clean it up and post it here.
Exact URL of where the bug happened
Two examples, both swisses were manually ended. https://lichess.org/swiss/oDyWAtwp https://lichess.org/swiss/Pt1Q0fpN
Steps to reproduce the bug
Unclear, however possibly the swiss failing is a side effect of a match being created twice in the same round.
https://lichess.org/lysyIINx/black https://lichess.org/fCXBXaUA/black
and
https://lichess.org/VHxyckr8 https://lichess.org/VQZEGNCr/black
What did you expect to happen?
Swiss to pair as normal. Or, if the round fails multiple times, that the swiss is ended.
What happened instead?
Swiss got stuck in a loop of.
Round 2 failed Round 3 will start soon
Operating system
win11
Browser and version (or alternate access method)
Any
Additional information
No response