[0.17.74] Hang on SIGTERM during startup.
Posted: Mon Oct 28, 2019 10:21 pm
I have a unit test that send SIGTERM to the Linux headless server upon receiving the following message on stdoutWhen running this test on Travis-CI it ocasionaly hangs instead of initiating the shutdown causing the test to fail.
The process is spawned with following parameters (where the ports and password are randomly generated)
test scenario_contains only a control.lua file with following code
and config.ini contains read and write data directories:
There's nothing printed out on stdout when the server hangs. I added code to send a second SIGTERM if the factorio server hangs like this and what happened then was that it printed "Received SIGTERM, shutting down" in response to it but still stayed hanged. You can see an example of this behavior in this test result. At the very bottom is the output from the test that failed (apologies for it being difficult to read, it's parsed.)
Code: Select all
RemoteCommandProcessor.cpp:131: updateTick(0) changing state from(CreatingGame) to(InGame)
The process is spawned with following parameters (where the ports and password are randomly generated)
Code: Select all
factorio/bin/x64/factorio --config test/temp/integration/config.ini --start-server-load-scenario test_scenario --port 64808 --rcon-port 62353 --rcon-password <...>
Code: Select all
script.on_init(function() print('test_scenario init') end)
Code: Select all
[path]
read-data=factorio/data
write-data=test/temp/integration