Page 1 of 1

[posila] [1.1.46] game.save_atlas throws SIGSEGV on headless

Posted: Tue Nov 16, 2021 12:29 pm
by oof2win2
game.save_atlas throws a SIGSEGV when ran on a headless server. Rather than that, it should throw an error that it is not a supported method or something and not crash the server down.

Code: Select all

   0.042 2021-11-16 13:26:41; Factorio 1.1.46 (build 59110, linux64, headless)
   0.069 Operating system: Linux (Ubuntu 20.04)
   0.069 Program arguments: "/opt/factorio/servers/dev-dump/bin/x64/factorio" "--config" "/opt/factorio/servers/dev-dump/config/config.ini" "--port" "39000" "--start-server-load-scenario" "AwF-Scenario-Dev" "--server-settings" "/opt/factorio/servers/dev-dump/server-settings.json" "--server-adminlist" "/opt/factorio/server-data/server-adminlist.json" "--server-banlist" "/opt/factorio/server-data/server-banlist.json" "--rcon-port" "39000" "--rcon-password" <private> 
   0.069 Read data path: /opt/factorio/servers/dev-dump/data
   0.069 Write data path: /opt/factorio/servers/dev-dump [1712549/1859925MB]
   0.069 Binaries path: /opt/factorio/servers/dev-dump/bin
   0.074 System info: [CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 8 cores, RAM: 31979 MB]
   0.074 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.074 Running in headless mode
   0.124 Loading mod core 0.0.0 (data.lua)
   0.160 Loading mod base 1.1.46 (data.lua)
   0.377 Loading mod base 1.1.46 (data-updates.lua)
   0.466 Checksum for core: 1319320002
   0.466 Checksum of base: 3758905726
   0.648 Prototype list checksum: 3034860339
   0.694 Info PlayerData.cpp:71: Local player-data.json available, timestamp 1637065599
   0.694 Info PlayerData.cpp:78: Cloud player-data.json unavailable
   0.696 Factorio initialised
   0.696 Info ServerSynchronizer.cpp:29: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   0.696 Info ServerMultiplayerManager.cpp:797: updateTick(4294967295) changing state from(Ready) to(PreparedToHostGame)
   0.696 Info ServerMultiplayerManager.cpp:797: updateTick(4294967295) changing state from(PreparedToHostGame) to(CreatingGame)
   1.620 Loading level.dat: 987424 bytes.
   1.620 Info Scenario.cpp:198: Map version 1.1.46-0
   1.647 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:7: [START] -----| Explosive Gaming Scenario Loader |-----
   1.647 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:8: [INFO] Setting up lua environment
   1.651 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:21: [INFO] Reading loader config
   1.651 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   1/ 63 (modules.factorio-control)
   1.653 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   2/ 63 (expcore.player_data)
   1.655 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   3/ 63 (modules.commands.me)
   1.655 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   4/ 63 (modules.commands.kill)
   1.657 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   5/ 63 (modules.commands.admin-chat)
   1.657 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   6/ 63 (modules.commands.admin-markers)
   1.658 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   7/ 63 (modules.commands.teleport)
   1.658 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   8/ 63 (modules.commands.cheat-mode)
   1.658 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file   9/ 63 (modules.commands.ratio)
   1.658 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  10/ 63 (modules.commands.interface)
   1.661 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  11/ 63 (modules.commands.help)
   1.662 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  12/ 63 (modules.commands.roles)
   1.663 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  13/ 63 (modules.commands.rainbow)
   1.663 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  14/ 63 (modules.commands.clear-inventory)
   1.663 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  15/ 63 (modules.commands.jail)
   1.664 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  16/ 63 (modules.commands.repair)
   1.664 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  17/ 63 (modules.commands.reports)
   1.665 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  18/ 63 (modules.commands.spawn)
   1.666 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  19/ 63 (modules.commands.warnings)
   1.667 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  20/ 63 (modules.commands.find)
   1.667 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  21/ 63 (modules.commands.home)
   1.667 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  22/ 63 (modules.commands.connect)
   1.668 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  23/ 63 (modules.commands.last-location)
   1.668 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  24/ 63 (modules.commands.protection)
   1.670 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  25/ 63 (modules.commands.spectate)
   1.672 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  26/ 63 (modules.commands.search)
   1.673 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  27/ 63 (modules.addons.chat-popups)
   1.673 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  28/ 63 (modules.addons.damage-popups)
   1.673 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  29/ 63 (modules.addons.death-logger)
   1.673 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  30/ 63 (modules.addons.advanced-start)
   1.674 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  31/ 63 (modules.addons.spawn-area)
   1.678 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  32/ 63 (modules.addons.compilatron)
   1.678 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  33/ 63 (modules.addons.scorched-earth)
   1.679 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  34/ 63 (modules.addons.pollution-grading)
   1.679 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  35/ 63 (modules.addons.station-auto-name)
   1.679 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  36/ 63 (modules.addons.discord-alerts)
   1.679 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  37/ 63 (modules.addons.chat-reply)
   1.680 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  38/ 63 (modules.addons.tree-decon)
   1.680 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  39/ 63 (modules.addons.afk-kick)
   1.681 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  40/ 63 (modules.addons.report-jail)
   1.681 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  41/ 63 (modules.addons.protection-jail)
   1.681 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  42/ 63 (modules.data.statistics)
   1.681 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  43/ 63 (modules.data.player-colours)
   1.682 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  44/ 63 (modules.data.greetings)
   1.682 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  45/ 63 (modules.data.quickbar)
   1.682 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  46/ 63 (modules.data.alt-view)
   1.683 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  47/ 63 (modules.data.tag)
   1.683 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  48/ 63 (modules.data.bonus)
   1.683 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  49/ 63 (modules.gui.readme)
   1.684 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  50/ 63 (modules.gui.rocket-info)
   1.686 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  51/ 63 (modules.gui.science-info)
   1.687 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  52/ 63 (modules.gui.autofill)
   1.688 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  53/ 63 (modules.gui.warp-list)
   1.690 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  54/ 63 (modules.gui.task-list)
   1.692 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  55/ 63 (modules.gui.player-list)
   1.693 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  56/ 63 (modules.gui.server-ups)
   1.695 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  57/ 63 (modules.commands.debug)
   1.698 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  58/ 63 (modules.gui.default-blueprints)
   1.698 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  59/ 63 (config.expcore.command_auth_admin)
   1.699 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  60/ 63 (config.expcore.command_auth_roles)
   1.699 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  61/ 63 (config.expcore.command_runtime_disable)
   1.699 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  62/ 63 (config.expcore.permission_groups)
   1.699 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:44: [INFO] Loading file  63/ 63 (config.expcore.roles)
   1.699 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:49: [INFO] Require Overwrite! No more requires can be made!
   1.700 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:53: [INFO] All files loaded with 0 errors:
   1.700 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/control.lua:55: [END] -----| Explosive Gaming Scenario Loader |-----
   1.700 Checksum for script /opt/factorio/servers/dev-dump/temp/currently-playing/control.lua: 2324750136
   1.700 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/utils/event_core.lua:44: [INFO] Entering on_init
   1.702 Script @/opt/factorio/servers/dev-dump/temp/currently-playing/utils/event_core.lua:52: [INFO] Entering runtime
   1.704 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:39000}))
   1.704 Hosting game at IP ADDR:({0.0.0.0:39000})
   1.704 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=4
   2.020 Info AuthServerConnector.cpp:68: Obtained serverPadlock for serverHash (djqQqFaG4NZrY3bosIu3Ik8TkQGf5bkc) from the auth server.
   2.020 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(CreatingGame) to(InGame)
   2.020 Info RemoteCommandProcessor.cpp:130: Starting RCON interface at IP ADDR:({0.0.0.0:39000})
   2.020 Info CommandLineMultiplayer.cpp:284: Maximum segment size = 100; minimum segment size = 25; maximum-segment-size peer count = 10; minimum-segment-size peer count = 20
   8.254 Time travel logging:
   8.237 <server> ran command: game.save_atlas()
   8.254 Error CrashHandler.cpp:633: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0x9f0a57, 0x9f112d, 0xd41025, 0xd416c1, 0xd41779, 0x46210, 0xd341e4, 0x12fc02a, 0x1340504, 0x1341f59, 0x13429f3, 0x134497b, 0x13458df, 0x5be6cf, 0, 0x5d049e
  17.526 Warning Logger.cpp:526: Symbols.size() == 25, usedSize == 15
#0  0x00000000009f112d in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /home/build/gcc-9.2/include/c++/9.2.0/bits/unique_ptr.h:154
#1  0x0000000000d41025 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /home/build/gcc-9.2/include/c++/9.2.0/bits/unique_ptr.h:353
#2  0x0000000000d416c1 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /home/build/gcc-9.2/include/c++/9.2.0/bits/unique_ptr.h:347
#3  0x0000000000d41779 in Logger::flush() at /tmp/factorio-build-YQ4r8E/src/Util/Logger.cpp:566
#4  0x0000000000046210 in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-YQ4r8E/src/Util/Logger.cpp:552
#5  0x0000000000d341e4 in GlobalContext::getMap() at /tmp/factorio-build-YQ4r8E/src/GlobalContext.cpp:2048
#6  0x00000000012fc02a in CrashHandler::writeStackTrace(CrashHandler::CrashReason) at /tmp/factorio-build-YQ4r8E/src/Util/CrashHandler.cpp:188
#7  0x0000000001340504 in CrashHandler::commonSignalHandler(int) at /tmp/factorio-build-YQ4r8E/src/Util/CrashHandler.cpp:635
#8  0x0000000001341f59 in CrashHandler::SignalHandler(int) at /tmp/factorio-build-YQ4r8E/src/Util/CrashHandler.cpp:650
#9  0x00000000013429f3 in ?? at ??:0
#10 0x000000000134497b in __gnu_cxx::__normal_iterator<std::unique_ptr<Atlas, std::default_delete<Atlas> >*, std::vector<std::unique_ptr<Atlas, std::default_delete<Atlas> >, std::allocator<std::unique_ptr<Atlas, std::default_delete<Atlas> > > > >::__normal_iterator(std::unique_ptr<Atlas, std::default_delete<Atlas> >* const&) at /home/build/gcc-9.2/include/c++/9.2.0/bits/stl_iterator.h:807
#11 0x00000000013458df in std::vector<std::unique_ptr<Atlas, std::default_delete<Atlas> >, std::allocator<std::unique_ptr<Atlas, std::default_delete<Atlas> > > >::end() at /home/build/gcc-9.2/include/c++/9.2.0/bits/stl_vector.h:827
#12 0x00000000005be6cf in AtlasSystem::save() at /tmp/factorio-build-YQ4r8E/src/Graphics/AtlasSystem.cpp:1892
#13 (nil) in LuaGameScript::processSaveAtlas() at /tmp/factorio-build-YQ4r8E/src/Script/LuaGameScript.cpp:8591
#14 0x00000000005d049e in LuaGameScript::processSaveAtlas() at /tmp/factorio-build-YQ4r8E/src/Script/LuaGameScript.cpp:8586
#15 (nil) in LuaContext::processSaveAtlas() at /tmp/factorio-build-YQ4r8E/src/Script/LuaContext.cpp:276
#16 0x00007ffc551fe6f0 in Game::postUpdate() at /tmp/factorio-build-YQ4r8E/src/Game.cpp:260
#17 0x00000000004068d0 in MainLoop::prepare() at /tmp/factorio-build-YQ4r8E/src/MainLoop.cpp:1005
#18 (nil) in MainLoop::mainLoopStepHeadless(MainLoop::HeavyMode) at /tmp/factorio-build-YQ4r8E/src/MainLoop.cpp:619
#19 0x0000000000000003 in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) at /tmp/factorio-build-YQ4r8E/src/MainLoop.cpp:389
#20 0x00007ffc551fe7c0 in hostMultiplayerGameInternal(cxxopts::ParseResult const&, bool) at /tmp/factorio-build-YQ4r8E/src/CommandLineMultiplayer.cpp:296 (discriminator 2)
#21 (nil) in CommandLineMultiplayer::hostCommandLineMultiplayerGame(cxxopts::ParseResult const&, Filesystem::Path const&, Filesystem::Path const&, bool) at /tmp/factorio-build-YQ4r8E/src/CommandLineMultiplayer.cpp:347 (discriminator 2)
#22 0x00007ffc551fe760 in main at /tmp/factorio-build-YQ4r8E/src/Main.cpp:654
#23 0x00007ffc551fe730 in ?? at ??:0
#24 0x00007ffc552c6918 in _start at ??:?
Stack trace logging done
  26.950 Warning Logger.cpp:526: Symbols.size() == 20, usedSize == 14
  26.950 Error CrashHandler.cpp:189: Map tick at moment of crash: 1
  26.950 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
  26.950 Uploading log file
  26.957 Info SystemUtil.cpp:554: Started /opt/factorio/servers/dev-dump/bin/x64/factorio; trampoline PID: 1172899

Re: [posila] [1.1.46] game.save_atlas throws SIGSEGV on headless

Posted: Tue Nov 16, 2021 3:33 pm
by posila
Thanks for the report.
Fixed for 1.1.47