Page 1 of 1

[Oxyd] [0.18.31] Duplicate junk RCON responses

Posted: Sun Jun 14, 2020 7:34 pm
by mark9064
Factorio responds with duplicate RCON responses that are blank when sending /config commands.

It should: respond once, with the correct data.
It actually: responds twice. The first response contains the correct data. The second response contains no body (zero bytes of response string).
Example responses:

Code: Select all

>>> /config get password
dbg: sending command with id 1

Responses:
Container: 
    id = 1
    type = 0
    body = u"The server currently doesn't hav"... (truncated, total 46)
Container: 
    id = 1
    type = 0
    body = u'' (total 0)
It appears to behave incorrectly with /config get and /config set. Any configuration option appears to trigger the bug.
I have not observed this duplication behaviour with any other command.
Server log is clear apart from notifications of new RCON connections, which are expected.

System configuration: Ubuntu 18.04 64bit / Factorio 0.18.31 headless (can also reproduce with 0.17.79)

Re: [0.18.31] Duplicate junk RCON responses

Posted: Sat Jun 27, 2020 12:06 pm
by movax20h
Here is a strace with full data when talking over RCON:

Code: Select all

sendto(6, "\36\0\0\0\2\0\0\0\2\0\0\0/config get password\0\0", 34, 0, NULL, 0) = 34
recvfrom(6, "8\0\0\0\2\0\0\0\0\0\0\0The server currently doesn't have a password.\n\0\0\n\0\0\0\2\0\0\0\0\0\0\0\0\0", 262144, 0, NULL, NULL) = 74
The library I use only processes first response, but it looks like there is a second one there indeed.

For comparison, other commands:

Code: Select all

sendto(6, "\22\0\0\0\2\0\0\0\2\0\0\0/players\0\0", 22, 0, NULL, 0) = 22
recvfrom(6, "7\0\0\0\2\0\0\0\0\0\0\0Players (2):\n  botA (online)\n  botB (online)\n\0\0", 262144, 0, NULL, NULL) = 59

Code: Select all

sendto(6, "/\0\0\0\2\0\0\0\2\0\0\0/silent-command rcon.print(game.tick)\0\0", 51, 0, NULL, 0) = 51
recvfrom(6, "\20\0\0\0\2\0\0\0\0\0\0\00027815\n\0\0", 262144, 0, NULL, NULL) = 20
write(1, "27815\n", 6)

Re: [Oxyd] [0.18.31] Duplicate junk RCON responses

Posted: Tue Jul 14, 2020 3:10 pm
by Oxyd
Thanks, fixed in 0.18.36.