box64 icon indicating copy to clipboard operation
box64 copied to clipboard

SEGFAULT running factorio headless server

Open arb103 opened this issue 1 year ago • 4 comments

Environment

Device: Raspberry Pi 4 Model B OS: Debian GNU/Linux 12 (bookworm) aarch64 Box64 version: Box64 with Dynarec v0.3.1 2c2b252d built on Oct 22 2024 19:33:04 Factorio headless server version: 2.08

Description

Running the latest version of factorio headless server results in the following error 47.422 Error CrashHandler.cpp:641: Received SIGSEGV

Reproduction

  1. Download https://factorio.com/get-download/2.0.8/headless/linux64 and extract it
  2. Run box64 bin/x64/factorio --start-server map.zip (map attached for convenience of not having to make a savefile yourself) map.zip
  3. Wait for it to SEGFAULT

My first try was with box64 from like two months ago, I tried again compiling box64 from latest commit with the same result

Conclusion

A brief forum search lead me to this post Relevant quote from it:

The biggest change is that it requires a newer glibc version 2.30.1

apt show libc6 shows I have glibc 2.36-9+rpt2+deb12u8, but box64 reports the following when starting the server:

Look for __res_nquery in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7f9745bc30
Look for __dn_expand in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7f974546e0

Is the x86_64 glibc that box64 emulates something I can update on my own or is it something I should ask for here?

arb103 avatar Oct 22 '24 23:10 arb103

I don't reproduce the issue. I download the 2.0.8 headless server and maunching it just worked for me. I have not tried on a Pi4 with PiOS tho, I was on a X13s running Armbian.

ptitSeb avatar Oct 23 '24 20:10 ptitSeb

Well, I tried compiling again after doing make clean just in case some existing file was messing with things but to no avail (same error) I've also tried with this .deb from the repository of third party builds linked in the installation instructions Here's the log, which I forgot in my first post:

log
Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096 Running on Cortex-A72 with 4 Cores
Will use Hardware counter measured at 54.0 MHz emulating 3.4 GHz
Params database has 93 entries
Params database has 94 entries
Box64 with Dynarec v0.3.1 2c2b252d built on Oct 23 2024 06:32:51
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 24 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/
Looking for /home/steam/factorio/bin/x64/factorio
Apply RC params for factorio
Applying BOX64_DYNAREC_BIGBLOCK=2
Applying BOX64_DYNAREC_FASTROUND=0
Applying BOX64_DYNAREC_SAFEFLAGS=0
Applying BOX64_DYNAREC_CALLRET=1
Applying BOX64_DYNAREC_ALIGNED_ATOMICS=1
Appling BOX64_DYNAREC_FORWARD=1024
argv[1]="--start-server"
argv[2]="/home/steam/factorio/data/saves/map.zip"
argv[3]="--server-settings"
argv[4]="/home/steam/factorio/server-settings.json"
argv[5]="--bind"
argv[6]="192.168.1.11:34197"
Rename process to "factorio"
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) libbsd.so.0
Look for __res_nquery in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7fb2adbc30
Look for __dn_expand in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7fb2ad46e0
 0.011 2024-10-23 21:24:26; Factorio 2.0.9 (build 79509, linux64, headless, space-age)
 0.031 Operating system: Linux (Debian 12)
 0.036 Program arguments: "/home/steam/factorio/bin/x64/factorio" "--start-server" "/home/steam/factorio/data/saves/map.zip" "--server-settings" "/home/steam/factorio/server-settings.json" "--bind" "192.168.1.11:34197" 
 0.036 Config path: /home/steam/factorio/config/config.ini
 0.037 Read data path: /home/steam/factorio/data
 0.037 Write data path: /home/steam/factorio [16016/29391MB]
 0.037 Binaries path: /home/steam/factorio/bin
 0.202 System info: [CPU:                    Box64 on Cortex-A72 @1.80 GHz, 4 cores, RAM: 7810 MB]
 0.206 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
 0.258 Running in headless mode
 0.259 Audio is disabled
 0.316 Info ModManager.cpp:434: FeatureFlag expansion-shaders = false
 0.316 Info ModManager.cpp:434: FeatureFlag freezing = false
 0.316 Info ModManager.cpp:434: FeatureFlag quality = false
 0.316 Info ModManager.cpp:434: FeatureFlag rail-bridges = false
 0.316 Info ModManager.cpp:434: FeatureFlag segmented-units = false
 0.316 Info ModManager.cpp:434: FeatureFlag space-travel = false
 0.316 Info ModManager.cpp:434: FeatureFlag spoiling = false
 0.475 Loading mod core 0.0.0 (data.lua)
 0.569 Loading mod base 2.0.9 (data.lua)
 1.385 Loading mod base 2.0.9 (data-updates.lua)
 1.701 Checksum for core: 2820763882
 1.701 Checksum of base: 1355320214
 3.466 Prototype list checksum: 1277818630
 3.644 Info PlayerData.cpp:66: Local player-data.json available, timestamp 1729638265
 3.644 Info PlayerData.cpp:73: Cloud player-data.json unavailable
 3.931 Factorio initialised
 3.946 Info ServerSynchronizer.cpp:20: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
 3.948 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(Ready) to(PreparedToHostGame)
 3.948 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(PreparedToHostGame) to(CreatingGame)
 3.957 Loading map /home/steam/factorio/data/saves/map.zip: 1717594 bytes.
 4.018 Loading level.dat: 888027 bytes.
 4.036 Info Scenario.cpp:178: Map version 2.0.8-1
 4.601 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
 4.654 Loading script.dat: 1224 bytes.
 4.686 Checksum for script __level__/control.lua: 3780939624
 4.719 Info UDPSocket.cpp:32: Opening socket at (IP ADDR:({192.168.1.11:34197}))
 4.722 Hosting game at IP ADDR:({192.168.1.11:34197})
 4.730 Info HttpSharedState.cpp:55: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6
2892308|SIGSEGV @0x350d1bd4 (???(/home/steam/factorio/bin/x64/factorio+0x8d1bd4)) (x64pc=0x300502f3/"???", rsp=0x7fb15fb668, stack=0x7fb0e02000:0x7fb1602000 own=(nil) fp=0x7fb15fb6b0), for accessing 0xa (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=0x1b1a7d0
RSP-0x20:0x000000003ac355e0 RSP-0x18:0x0000007fb15fb680 RSP-0x10:0x000000000327b218 RSP-0x08:0x0000007fb15fb6a0
RSP+0x00:0x000000000327ffad RSP+0x08:0x0000007fb15fb6c0 RSP+0x10:0x000000000315ad40 RSP+0x18:0x000000003ae4be60
RAX:0x000000003ae4bfc0 RCX:0x000000000315ad40 RDX:0x000000003ae4bfb0 RBX:0x000000003ae4be60 
RSP:0x0000007fb15fb668 RBP:0x0000007fb15fb6b0 RSI:0x000000003ae4bfb0 RDI:0x000000003ae4bfc0 
R8:0x0000000003250d58  R9:0x00000000ffffffff R10:0x0000000000000000 R11:0x000000000000004c 
R12:0x000000003b124b00 R13:0x000000003b125588 R14:0x000000003d6a3ba0 R15:0x000000003a5e33c0 
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053  x64opcode=C3 00 00 09 BB BF 37 00 (opcode=f8667868)

Please tell me if you think of something else I can do to help solve this

arb103 avatar Oct 24 '24 00:10 arb103

Can you run with BOX64_ROLLING_LOG=1 , it seems to crash in a function call and would like to know wich one.

ptitSeb avatar Oct 24 '24 06:10 ptitSeb

Here's the log with BOX64_ROLLING_LOG=1

log
Rolling log, showing last 16 function call on signals
Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096 Running on Cortex-A72 with 4 Cores
Will use Hardware counter measured at 54.0 MHz emulating 3.4 GHz
Params database has 93 entries
Params database has 94 entries
Box64 with Dynarec v0.3.1 2c2b252d built on Oct 23 2024 20:46:04
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 24 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/
Looking for /home/steam/factorio/bin/x64/factorio
Apply RC params for factorio
Applying BOX64_DYNAREC_BIGBLOCK=2
Applying BOX64_DYNAREC_FASTROUND=0
Applying BOX64_DYNAREC_SAFEFLAGS=0
Applying BOX64_DYNAREC_CALLRET=1
Applying BOX64_DYNAREC_ALIGNED_ATOMICS=1
Appling BOX64_DYNAREC_FORWARD=1024
argv[1]="--start-server"
argv[2]="/home/steam/factorio/data/saves/map.zip"
argv[3]="--server-settings"
argv[4]="/home/steam/factorio/server-settings.json"
argv[5]="--bind"
argv[6]="192.168.1.11:34197"
Rename process to "factorio"
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) libbsd.so.0
Look for __res_nquery in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7f86dcbc30
Look for __dn_expand in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7f86dc46e0
   0.011 2024-10-24 04:04:57; Factorio 2.0.9 (build 79509, linux64, headless, space-age)
   0.030 Operating system: Linux (Debian 12)
   0.035 Program arguments: "/home/steam/factorio/bin/x64/factorio" "--start-server" "/home/steam/factorio/data/saves/map.zip" "--server-settings" "/home/steam/factorio/server-settings.json" "--bind" "192.168.1.11:34197" 
   0.036 Config path: /home/steam/factorio/config/config.ini
   0.036 Read data path: /home/steam/factorio/data
   0.037 Write data path: /home/steam/factorio [16033/29391MB]
   0.037 Binaries path: /home/steam/factorio/bin
   0.762 System info: [CPU:                    Box64 on Cortex-A72 @1.80 GHz, 4 cores, RAM: 7810 MB]
   0.766 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.845 Running in headless mode
   0.846 Audio is disabled
   0.913 Info ModManager.cpp:434: FeatureFlag expansion-shaders = false
   0.913 Info ModManager.cpp:434: FeatureFlag freezing = false
   0.913 Info ModManager.cpp:434: FeatureFlag quality = false
   0.914 Info ModManager.cpp:434: FeatureFlag rail-bridges = false
   0.914 Info ModManager.cpp:434: FeatureFlag segmented-units = false
   0.914 Info ModManager.cpp:434: FeatureFlag space-travel = false
   0.914 Info ModManager.cpp:434: FeatureFlag spoiling = false
   1.148 Loading mod core 0.0.0 (data.lua)
   1.560 Loading mod base 2.0.9 (data.lua)
   5.910 Loading mod base 2.0.9 (data-updates.lua)
   8.255 Checksum for core: 2820763882
   8.255 Checksum of base: 1355320214
  28.812 Prototype list checksum: 1277818630
  30.003 Info PlayerData.cpp:66: Local player-data.json available, timestamp 1729638265
  30.003 Info PlayerData.cpp:73: Cloud player-data.json unavailable
  30.344 Factorio initialised
  30.372 Info ServerSynchronizer.cpp:20: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
  30.374 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(Ready) to(PreparedToHostGame)
  30.375 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(PreparedToHostGame) to(CreatingGame)
  30.384 Loading map /home/steam/factorio/data/saves/map.zip: 1717594 bytes.
  30.533 Loading level.dat: 888027 bytes.
  30.551 Info Scenario.cpp:178: Map version 2.0.8-1
  32.769 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
  32.837 Loading script.dat: 1224 bytes.
  32.943 Checksum for script __level__/control.lua: 3780939624
  32.981 Info UDPSocket.cpp:32: Opening socket at (IP ADDR:({192.168.1.11:34197}))
  32.985 Hosting game at IP ADDR:({192.168.1.11:34197})
  32.994 Info HttpSharedState.cpp:55: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6
Last calls
2902731|0x32df3f3: Calling memset(0x456F2A11, 0x0, 0x3F, ...) => return 0x456F2A11
2902731|0x32766c1: Calling memcpy(0x44C3BA18, 0x7F859AB410, 0xC, ...) => return 0x44C3BA18
2902731|0x327b218: Calling free(0x4239F0A0, 0xCC8418, 0x327B1BD, ...) => return 0x4239F0A0
2902731|0x327b218: Calling free(0x422745D0, 0xCC8418, 0x327B1BD, ...) => return 0x422745D0
2902731|0x327b218: Calling free(0x456F2990, 0xCC8418, 0x327B1BD, ...) => return 0x456F2990
2902731|0x327b218: Calling free(0x488233B0, 0xCC8418, 0x327B1BD, ...) => return 0x488233B0
2902731|0x327b218: Calling free(0x48952870, 0xCC8418, 0x327B1BD, ...) => return 0x48952870
2902731|0x327b218: Calling free(0x48923F60, 0xCC8418, 0x327B1BD, ...) => return 0x48923F60
2902731|0x327b218: Calling free(0x48865580, 0xCCA168, 0x327B1BD, ...) => return 0x48865580
2902731|0x327b218: Calling free(0x48839A70, 0xCCA220, 0x327B1BD, ...) => return 0x48839A70
2902731|0x327b218: Calling free(0x45132390, 0xCCA220, 0x327B1BD, ...) => return 0x45132390
2902731|0x327b218: Calling free(0x475EF020, 0xCCA0A0, 0x327B1BD, ...) => return 0x475EF020
2902731|0x327afc7: Calling malloc(0x2D8, 0xCC8DA0, 0x327AF42, ...) => return 0x45349280
2902731|0x327b01a: Calling memset(0x45349280, 0x0, 0x2D8, ...) => return 0x45349280
2902731|0x327fede: Calling memset(0x45349380, 0x0, 0x1B8, ...) => return 0x45349380
2902731|0x32dfc5b: Calling memcpy(0x456F29E0, 0x7F859AB370, 0x30, ...) => return 0x456F29E0
2902731|SIGSEGV @0x3503db54 (???(/home/steam/factorio/bin/x64/factorio+0x83db54)) (x64pc=0x300611d3/"???", rsp=0x7f859ab678, stack=0x7f851b2000:0x7f859b2000 own=(nil) fp=0x7f859ab6c0), for accessing 0xa (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=0x1b1a7d0
RSP-0x20:0x0000000045132390 RSP-0x18:0x0000007f859ab690 RSP-0x10:0x000000000327b218 RSP-0x08:0x0000007f859ab6b0
RSP+0x00:0x000000000327ffad RSP+0x08:0x0000007f859ab6d0 RSP+0x10:0x000000000315ad40 RSP+0x18:0x0000000045349280
RAX:0x00000000453493e0 RCX:0x000000000315ad40 RDX:0x00000000453493d0 RBX:0x0000000045349280 
RSP:0x0000007f859ab678 RBP:0x0000007f859ab6c0 RSI:0x00000000453493d0 RDI:0x00000000453493e0 
 R8:0x0000000003250d58  R9:0x00000000ffffffff R10:0x0000000000000000 R11:0x00000000000000d3 
R12:0x00000000454ef130 R13:0x00000000454efbb8 R14:0x0000000047b953e0 R15:0x0000000044ae0170 
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053  x64opcode=C3 00 00 50 CB 22 42 00 (opcode=f8667868)
  33.909 Error CrashHandler.cpp:641: Received SIGSEGV

arb103 avatar Oct 24 '24 07:10 arb103

Compiled from commit f651b7bf and tried again, same result. I tried running the server on a x86_64 machine to see what happens after Info HttpSharedState.cpp:55: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6 since it keeps failing at that point.

   1.455 Info AuthServerConnector.cpp:108: Obtained serverPadlock for serverHash (zhA9XM5ar8d7tWHgPeekarBzGaZdwgon) from the auth server.
   1.455 Info ServerMultiplayerManager.cpp:803: updateTick(46) changing state from(CreatingGame) to(InGame)

Some sort of hash function is my best guess. I ran it again on the arm64 machine with BOX64_DYNAREC=0, which I don't think is relevant to the issue except for the fact that it slows the program down enough that the connection fails. Because of this, the point where the server hash is made is not reached, and the crash is avoided.

 442.984 Info HttpSharedState.cpp:55: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6
 459.091 Error HttpSharedState.cpp:178: CURL failed: code:55, 37; OpenSSL SSL_write: Broken pipe, errno 32
 459.093 Info HttpSharedState.cpp:187: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6
 459.095 Info HttpSharedState.cpp:188: Status code: 0
 459.108 Info AuthServerConnector.cpp:34: Failed to reach auth server: code(520) message(OpenSSL SSL_write: Broken pipe, errno 32)
 459.123 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: Failed to reach auth server. Code: 520. Error: Unknown error.
 459.125 Info ServerMultiplayerManager.cpp:803: updateTick(46) changing state from(CreatingGame) to(InitializationFailed)
 459.127 Info CommandLineMultiplayer.cpp:211: Exit point.
 460.049 Info ServerMultiplayerManager.cpp:119: Disconnecting multiplayer connection.
 460.051 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(InitializationFailed) to(DisconnectingScheduled)
 460.968 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
 460.970 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(DisconnectingScheduled) to(Closed)
 476.728 Info UDPSocket.cpp:233: Closing socket
 476.730 Info UDPSocket.cpp:263: Socket closed
 476.735 Goodbye

The crash must be caused by something that happens right before Info AuthServerConnector.cpp:108: Obtained serverPadlock for serverHash (zhA9XM5ar8d7tWHgPeekarBzGaZdwgon) from the auth server. I'll ask in the factorio forums about what is happening at that point to provide more information, but I hope this helps narrow it down.

arb103 avatar Nov 05 '24 12:11 arb103

running with BOX64_SHOWBT=1 also seems to show something related to cryptography being the culprit

NativeBT: /home/steam/factorio/bin/x64/factorio() [0x34a56650]
NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7fad6047b0]
NativeBT: /home/steam/factorio/bin/x64/factorio() [0x35047b54]
NativeBT: [0x7f85b2ce60]
EmulatedBT: box64(memset+0) [0x300611c0]
EmulatedBT: /home/steam/factorio/bin/x64/factorio(CRYPTO_gcm128_init+101) [0x32bdfad]
EmulatedBT: /home/steam/factorio/bin/x64/factorio(aesni_gcm_init_key+94) [0x328edec]
EmulatedBT: ??? [(nil)]

arb103 avatar Nov 07 '24 06:11 arb103

I found an old version of box64 installed in my system with which the issue does not ocurr, it was compiled from commit 3db2362c Box64 with Dynarec v0.2.7 3db2362c built on May 6 2024 10:21:39 This seems to be a regression There's been

git rev-list 3db2362..HEAD --count
1284

commits since that one From what commits would it make sense to compile and try to reproduce the issue? I'll start with tag v0.2.8 since that's the next one chronologically from

git describe --tags 3db2362
v0.2.6-650-g3db2362c

arb103 avatar Dec 07 '24 00:12 arb103

v0.2.8 compiled from commit 8545d050 still worked Box64 with Dynarec v0.2.8 8545d050 built on Dec 6 2024 21:57:52 v0.3.0 compiled from commit 62695cee fails Box64 with Dynarec v0.3.0 62695cee built on Dec 6 2024 22:41:06 the issue started somewhere between these two commits there were 335 commits between these two, I'll start checking out the halfway point between working/non-working commits until I can narrow it down to one commit

arb103 avatar Dec 07 '24 02:12 arb103

267bffb0 is the last working version Box64 with Dynarec v0.2.9 267bffb0 built on Dec 7 2024 03:30:44 8c5752de and onwards fails Box64 with Dynarec v0.2.9 8c5752de built on Dec 7 2024 03:02:02 @ptitseb is there anything I can do to help diagnose why factorio fails to run from that commit onwards?

arb103 avatar Dec 07 '24 06:12 arb103

Thank you for the hard bisecting! try again with BOX64_AVX=0 on latest box64.

ksco avatar Dec 07 '24 06:12 ksco

running b735a866 with BOX64_AVX=0 is succesful, I'd love for avx to work but having the server running at all is more than enough for me, thanks! here are logs of it running

log
Will not expose AVX capabilities
Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096 Running on Cortex-A72 with 4 Cores 
Will use Hardware counter measured at 54.0 MHz emulating 3.4 GHz
Params database has 96 entries
Params database has 97 entries
Box64 with Dynarec v0.3.2 b735a866 built on Dec  7 2024 04:30:57
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 24 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/
Looking for /home/steam/factorio/bin/x64/factorio
Apply RC params for factorio.
Applying BOX64_DYNAREC_BIGBLOCK=2
Applying BOX64_DYNAREC_FASTROUND=0
Applying BOX64_DYNAREC_SAFEFLAGS=0
Applying BOX64_DYNAREC_CALLRET=1
Applying BOX64_DYNAREC_ALIGNED_ATOMICS=1
Appling BOX64_DYNAREC_FORWARD=1024
argv[1]="--start-server"
argv[2]="/home/steam/factorio/data/saves/map.zip"
argv[3]="--server-settings"
argv[4]="/home/steam/factorio/server-settings.json"
argv[5]="--bind"
argv[6]="192.168.1.11:34197"
Rename process to "factorio"
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) libbsd.so.0
Look for __res_nquery in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7fa8f0bcb0
Look for __dn_expand in loaded elfs
Found symbol with version GLIBC_2.17, value = 0x7fa8f04760
  0.011 2024-12-07 05:38:38; Factorio 2.0.23 (build 80769, linux64, headless, space-age)
  0.030 Operating system: Linux (Debian 12)
  0.036 Program arguments: "/home/steam/factorio/bin/x64/factorio" "--start-server" "/home/steam/factorio/data/saves/map.zip" "--server-settings" "/home/steam/factorio/server-settings.json" "--bind" "192.168.1.11:34197"
  0.036 Config path: /home/steam/factorio/config/config.ini
  0.037 Read data path: /home/steam/factorio/data
  0.037 Write data path: /home/steam/factorio [11063/29391MB]
  0.037 Binaries path: /home/steam/factorio/bin
  0.129 System info: [CPU:                    Box64 on Cortex-A72 @1.80 GHz, 4 cores, RAM: 7809 MB]
  0.133 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
  0.182 Running in headless mode
  0.182 Audio is disabled
  0.243 Info ModManager.cpp:434: FeatureFlag expansion-shaders = false
  0.243 Info ModManager.cpp:434: FeatureFlag freezing = false
  0.243 Info ModManager.cpp:434: FeatureFlag quality = false
  0.244 Info ModManager.cpp:434: FeatureFlag rail-bridges = false
  0.244 Info ModManager.cpp:434: FeatureFlag segmented-units = false
  0.244 Info ModManager.cpp:434: FeatureFlag space-travel = false
  0.244 Info ModManager.cpp:434: FeatureFlag spoiling = false
  0.391 Loading mod core 0.0.0 (data.lua)
  0.478 Loading mod base 2.0.23 (data.lua)
  1.230 Loading mod base 2.0.23 (data-updates.lua)
  1.479 Checksum for core: 2271797277
  1.479 Checksum of base: 2653859856
  3.247 Prototype list checksum: 2902124721
  3.512 Info PlayerData.cpp:66: Local player-data.json available, timestamp 1733557590
  3.512 Info PlayerData.cpp:73: Cloud player-data.json unavailable.
  3.922 Factorio initialized.
  3.938 Info ServerSynchronizer.cpp:20: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
  3.940 Info ServerMultiplayerManager.cpp:806: updateTick(18446744073709551615) changing state from(Ready) to(PreparedToHostGame)
  3.941 Info ServerMultiplayerManager.cpp:806: updateTick(18446744073709551615) changing state from(PreparedToHostGame) to(CreatingGame)
  3.950 Loading map /home/steam/factorio/data/saves/map.zip: 1374568 bytes.
  4.039 Loading level.dat: 888523 bytes.
  4.061 Info Scenario.cpp:178: Map version 2.0.23-0
  4.497 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
  4.510 Loading script.dat: 1211 bytes.
  4.546 Checksum for script __level__/control.lua: 758477413
  4.576 Info UDPSocket.cpp:32: Opening socket at (IP ADDR:({192.168.1.11:34197}))
  4.579 Hosting game at IP ADDR:({192.168.1.11:34197})
  4.587 Info HttpSharedState.cpp:55: Downloading https://auth.factorio.com/generate-server-padlock-2?api_version=6
  5.501 Info AuthServerConnector.cpp:108: Obtained serverPadlock for serverHash (xxx) from the auth server.
  5.502 Info ServerMultiplayerManager.cpp:806: updateTick(46) changing state from(CreatingGame) to(InGame)
  5.565 Info ServerRouter.cpp:664: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197, pingpong3.factorio.com:34197, pingpong4.factorio.com:34197) for own address
  5.571 Info UDPSocket.cpp:44: Opening socket for broadcast
  5.577 Warning UDPSocket.cpp:166: Failed to open IPv6 socket (Address family not supported by protocol), continuing with IPv4 only
  5.591 Info CommandLineMultiplayer.cpp:288: Maximum segment size = 100; minimum segment size = 25; maximum-segment-size peer count = 10; minimum-segment-size peer count = 20
  5.722 Info ServerRouter.cpp:547: Own address is IP ADDR:({xxx.xxx.xxx.xxx:7647}) (confirmed by pingpong1)
  5.805 Info ServerRouter.cpp:547: Own address is IP ADDR:({xxx.xxx.xxx.xxx:7647}) (confirmed by pingpong2)
  5.855 Info ServerRouter.cpp:547: Own address is IP ADDR:({xxx.xxx.xxx.xxx:7647}) (confirmed by pingpong4)
  6.455 Info MatchingServer.cpp:123: Matching server game `19843639` has been created.
  6.473 Info ServerMultiplayerManager.cpp:738: Matching server connection resumed
/quit
  19.342 Quitting: remote-quit.
  19.342 Info MainLoop.cpp:435: Saving map as /home/steam/factorio/data/saves/map.zip
  19.632 Info MainLoop.cpp:446: Saving progress: 0.245700%
  19.652 Info MainLoop.cpp:446: Saving progress: 100.000000%
  19.748 Info ServerMultiplayerManager.cpp:119: Disconnecting multiplayer connection.
  19.749 Info ServerMultiplayerManager.cpp:806: updateTick(46) changing state from(InGame) to(DisconnectingScheduled)
  19.782 Info ServerMultiplayerManager.cpp:806: updateTick(46) changing state from(DisconnectingScheduled) to(Disconnecting)
  19.816 Info ServerMultiplayerManager.cpp:806: updateTick(46) changing state from(Disconnecting) to(Disconnected)
  19.816 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
  19.817 Info ServerMultiplayerManager.cpp:806: updateTick(46) changing state from(Disconnected) to(Closed)
  19.817 Info ServerMultiplayerManager.cpp:166: Deleting active scenario (global = true).
  20.012 Info HttpSharedState.cpp:55: Downloading https://multiplayer.factorio.com/remove-game/19843639
  20.524 Info UDPSocket.cpp:233: Closing socket
  20.524 Info UDPSocket.cpp:263: Socket closed
  20.524 Info UDPSocket.cpp:233: Closing socket
  20.562 Info UDPSocket.cpp:233: Closing socket
  20.562 Info UDPSocket.cpp:263: Socket closed
  20.880 Goodbye
Sigfault/Segbus while quitting, exiting silently

That last line Sigfault/Segbus while quitting, exiting silently looks worrying but the server runs well, the savefile is not corrupted and the exit code is 0, so I'll choose to ignore it for now. Should this be closed as solved, or should it remain open until AVX works? I'm fine with either.

arb103 avatar Dec 07 '24 09:12 arb103

It should remains as open as it's a AVX/AVX2 issue, maybe @ptitSeb ca have a look on this later?

ksco avatar Dec 07 '24 09:12 ksco

Yeah, I'll check that later, I would like AVX to just work.

ptitSeb avatar Dec 07 '24 09:12 ptitSeb

Haven't tried versions in between, but I can confirm that as of 16bdcc0c factorio headless runs fine on my Raspberry Pi 4 Model B without BOX64_AVX=0. I believe this can now be closed.

arb103 avatar May 19 '25 14:05 arb103

Sounds good to me :D

ptitSeb avatar May 19 '25 14:05 ptitSeb