Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

steamcmd failed with "Fatal error: futex robust_list not initialized by pthreads" #1034

Open
yyf-0404 opened this issue Mar 11, 2025 · 11 comments

Comments

@yyf-0404
Copy link

yyf-0404 commented Mar 11, 2025

I installed pre-build packages of box86 and box64 in the arm64v8 ubuntu docker container and configured binfmts by following this link.

root@orangepiaipro-20t:~/steamcmd# BOX86_LOG=1 BOX86_SHOWSEGV=1 BOX86_SHOWBT=1 BOX86_TRACE_FILE=logs.txt ./steamcmd.sh
BOX86 Trace redirected to "logs.txt"
Box86 with Dynarec v0.3.9 fa59e748 built on Feb 13 2025 06:33:33
Redirecting stderr to '/root/Steam/logs/stderr.txt'
Logging directory: '/root/Steam/logs'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[  0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logo
Steam Console Client (c) Valve Corporation - version 1741637596
-- type 'quit' to exit --
Loading Steam API...IPC function call IClientUtils::GetSteamRealm took too long: 2197 msec
Fatal error: futex robust_list not initialized by pthreads
src/common/framefunction.cpp (238) : Assertion Failed: CFrameFunctionMgr::~CFrameFunctionMgr: non static FrameFunction[Bootstrapper HTTP Client] still registered

logs.txt

Debug level is 1
Show Segfault signal even if a signal handler is present
Show Backtrace for signals
Dynarec for ARMv8, with extension: HALF FAST_MULT EDSP NEON VFPv4 SWP IDIVA AES PMULL PageSize:4096 Running on unknown aarch64 cpu with 4 Cores
Params database has 32 entries
BOX86: Warning, program break not found
Using default BOX86_LD_LIBRARY_PATH: ./:lib/:lib32/:x86/:i686/
Using default BOX86_PATH: ./:bin/
Counted 15 Env var
Looking for /root/steamcmd/linux32/steamcmd
steam detected
Rename process to "steamcmd"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using native(wrapped) libm.so.6
Using emulated /root/steamcmd/linux32/crashhandler.so
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x60099aa4 (0x2d5b0)
Using emulated /root/steamcmd/linux32/steamconsole.so
Using emulated /root/steamcmd/linux32/libtier0_s.so
Using emulated /root/steamcmd/linux32/libvstdlib_s.so
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x60452d34 (0x21f10)
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x606a9694 (0x38310)
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x602c7504 (0x3f2e0)
Using emulated /root/steamcmd/linux32/steamclient.so
Warning: Global Symbol ZSTD_trace_compress_end not found, cannot apply R_386_GLOB_DAT @0x66edf01c ((nil)) in /root/steamcmd/linux32/steamclient.so
Warning: Global Symbol ZSTD_trace_compress_begin not found, cannot apply R_386_GLOB_DAT @0x66edf018 ((nil)) in /root/steamcmd/linux32/steamclient.so
Warning: Global Symbol ZSTD_trace_decompress_begin not found, cannot apply R_386_GLOB_DAT @0x66edf024 ((nil)) in /root/steamcmd/linux32/steamclient.so
Warning: Global Symbol ZSTD_trace_decompress_end not found, cannot apply R_386_GLOB_DAT @0x66edf020 ((nil)) in /root/steamcmd/linux32/steamclient.so
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x66e37c90 (0xbdad80)
11460|SIGSEGV @0x49420900 (???(0x49420900)) (x86pc=0x66285036/"/root/steamcmd/linux32/steamclient.so + 0x1b2a036", esp=0x4906086c, stack=0x48f61000:0x49061000 own=0x48f61000 fp=0x49060834), for accessing 0x1 (code=1/prot=0), db=0x4970a9c8(0x494208fc:0x494209e8/0x66285036:0x66285076//root/steamcmd/linux32/steamclient.so + 0x1b2a036:clean, hash:934a0bf5/934a0bf5)
EAX:0x00000001 ECX:0x000003e0 EDX:0x66f74b40 EBX:0x66edea80
ESP:0x4906086c EBP:0x66f23614 ESI:0x652b371c EDI:0x00000000
ESP-0x10:0x00000000 ESP-0x0c:0x00000000 ESP-0x08:0x81d90003 ESP-0x04:0x66285036
ESP+0x00:0x6529e23e ESP+0x04:0x652b371c ESP+0x08:0x490608a4 ESP+0x0c:0x490608a8
Native bactrace:
        /root/steamcmd/linux32/steamcmd() [0x6296b968]
        /lib/arm-linux-gnueabihf/libc.so.6(+0x27540) [0x40862540]
11460|Double SIGSEGV (code=1, pc=0x49420900, addr=0x1)!
Using emulated /root/steamcmd/linux32/crashhandler.so
Warning: Weak Symbol _ZGTtnaj not found, cannot apply R_386_JMP_SLOT 0x67020aa4 (0x2d5b0)
@ptitSeb
Copy link
Owner

ptitSeb commented Mar 11, 2025

This error "Fatal error: futex robust_list not initialized by pthreads" is a steam error when the mutex don't have the expected glibc behaviour.
You are on a non-standard system here, it seems.

@yyf-0404
Copy link
Author

This error "Fatal error: futex robust_list not initialized by pthreads" is a steam error when the mutex don't have the expected glibc behaviour. You are on a non-standard system here, it seems.

My host uses the ubuntu 22.04 image provided by Orangepi, and the docker container uses the official ubuntu 20.04 image of arm64/v8 platform. Can this error be resolved by adding some dependencies?

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 11, 2025

This error "Fatal error: futex robust_list not initialized by pthreads" is a steam error when the mutex don't have the expected glibc behaviour. You are on a non-standard system here, it seems.

My host uses the ubuntu 22.04 image provided by Orangepi, and the docker container uses the official ubuntu 20.04 image of arm64/v8 platform. Can this error be resolved by adding some dependencies?

Not really. It's steam checking if an offset in some inner syscall structure is the expected value...
You can use box32 option of box64, instead of box86, as it's designed to ignore/workaround this error. But box32 is still experimental and so expect more crashes compare to box86. It should run SteamCMD fine tho.

@yyf-0404
Copy link
Author

This error "Fatal error: futex robust_list not initialized by pthreads" is a steam error when the mutex don't have the expected glibc behaviour. You are on a non-standard system here, it seems.

My host uses the ubuntu 22.04 image provided by Orangepi, and the docker container uses the official ubuntu 20.04 image of arm64/v8 platform. Can this error be resolved by adding some dependencies?

Not really. It's steam checking if an offset in some inner syscall structure is the expected value... You can use box32 option of box64, instead of box86, as it's designed to ignore/workaround this error. But box32 is still experimental and so expect more crashes compare to box86. It should run SteamCMD fine tho.

What should I do to enable box32 option of box64? I didn't find it in box64/docs/compile.md. And how to configure binfmts for box32 in the docker container after installing?

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 11, 2025

Mmm, indeed, I need to add some hint there on how to add box32.

You can use ccmake . from the build folder to alter config option -you might need to sudo apt install cmake-curses-gui first). You can then add BOX32 and BOX32_BINFMT options (and then press 'c' to configure and 'g' to generate the new makefile).

@yyf-0404
Copy link
Author

yyf-0404 commented Mar 11, 2025

Mmm, indeed, I need to add some hint there on how to add box32.

You can use ccmake . from the build folder to alter config option -you might need to sudo apt install cmake-curses-gui first). You can then add BOX32 and BOX32_BINFMT options (and then press 'c' to configure and 'g' to generate the new makefile).

I've added the box32 option and removed box86, but a new error Segmentation fault appears

root@orangepiaipro-20t:/# ./root/steamcmd/steamcmd.sh
[BOX64] Box64 with Dynarec v0.3.5 d4a539b9 built on Mar 11 2025 18:32:36
[BOX64] Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2
[BOX64] Running on unknown aarch64 cpu with 4 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 48.0 MHz emulating 3.0 GHz
[BOX64] steamcmd detected
[BOX64] Detected 48bits at least of address space
[BOX64] Counted 13 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
[BOX64] Looking for /root/steamcmd/linux32/steamcmd
[BOX32] Using Box32 to load 32bits elf
[BOX32] Memory higher than 32bits reserved
[BOX32] Rename process to "steamcmd"
[BOX32] Using native(wrapped) libdl.so.2
[BOX32] Using native(wrapped) librt.so.1
[BOX32] Using native(wrapped) libm.so.6
[BOX32] Using native(wrapped) libpthread.so.0
[BOX32] Using native(wrapped) libc.so.6
[BOX32] Using native(wrapped) ld-linux.so.2
[BOX32] FillBlock triggered a segfault at 0xffffffffffffffff from 0x34ad6778
[BOX32] FillBlock at 0x401c6000 triggered a segfault, canceling
[BOX32] 0032|SIGSEGV @0x34ad6778 (???(/root/steamcmd/linux32/steamcmd+0x2d6778)) (x64pc=0x401c6032/"/root/steamcmd/linux32/steamcmd + 0x1c6000 + 0x32", rsp=0x3080f750, stack=0x30010000:0x30810000 own=(nil) fp=(nil)), for accessing 0xffffffffffffffff (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
RSP-0x20:0x0000000000000000 RSP-0x18:0x0000000000000000 RSP-0x10:0x0000000000000000 RSP-0x08:0x0000000000000000
RSP+0x00:0x30000080401c6010 RSP+0x08:0x000000013080f75c RSP+0x10:0x0000000130000080 RSP+0x18:0x000000003080f835
RAX:0x0000000000000001 RCX:0x000000003080f768 RDX:0x0000000030000080 RBX:0x000000003080f768
RSP:0x000000003080f750 RBP:0x0000000000000000 RSI:0x0000000000000001 RDI:0x0000000000000000
 R8:0x0000000000000000  R9:0x0000000000000000 R10:0x0000000000000000 R11:0x0000000000000000
R12:0x0000000000000000 R13:0x0000000000000000 R14:0x0000000000000000 R15:0x0000000000000000
ES:0x002b CS:0x0023 SS:0x002b DS:0x002b FS:0x0000 GS:0x0033  x86opcode=8B 1C 24 C3 90 90 00 00 (opcode=f9000281)
./root/steamcmd/steamcmd.sh: line 76:    32 Segmentation fault      (core dumped) $DEBUGGER "$STEAMEXE" "$@"

When I run steamcmd repeatedly, Segmentation fault increases

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 11, 2025

I don't reproduce the issue on my side

Image

It just update and start correctly. The segfault you pasted doesn't make sense to me: RSP is correct, the opcode is a mov ebx, [esp] and yet there is an access to 0xffffffffffffffff wich, realy, doesn't make sense.
Can you run with BOX64_SHOWBT=1 also so might have a bit more details?

@yyf-0404
Copy link
Author

yyf-0404 commented Mar 11, 2025

I ran a new docker container, reinstalled box64, box32 and steamcmd ,add run with BOX64_SHOWBT=1, nothing seemed to have changed.

root@orangepiaipro-20t:~/steamcmd# BOX64_SHOWBT=1 ./steamcmd.sh
[BOX64] Box64 with Dynarec v0.3.5 fb701d8e built on Mar 11 2025 20:08:26
[BOX64] Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2
[BOX64] Running on unknown aarch64 cpu with 4 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 48.0 MHz emulating 3.0 GHz
[BOX64] steamcmd detected
[BOX64] Detected 48bits at least of address space
[BOX64] Counted 15 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
[BOX64] Looking for /root/steamcmd/linux32/steamcmd
[BOX64] BOX64ENV: Variables overridden via env and/or RC file:
        BOX64_SHOWBT=1
[BOX32] Using Box32 to load 32bits elf
[BOX32] Memory higher than 32bits reserved
[BOX32] Rename process to "steamcmd"
[BOX32] Using native(wrapped) librt.so.1
[BOX32] Using native(wrapped) libdl.so.2
[BOX32] Using native(wrapped) libpthread.so.0
[BOX32] Using native(wrapped) libm.so.6
[BOX32] Using native(wrapped) libc.so.6
[BOX32] Using native(wrapped) ld-linux.so.2
[BOX32] FillBlock triggered a segfault at 0xffffffffffffffff from 0x34ad6778
[BOX32] FillBlock at 0x4002a7f4 triggered a segfault, canceling
[BOX32] EmulatedBT: /root/steamcmd/linux32/steamcmd(_start+32) [0x4002a826]
[BOX32] 0031|SIGSEGV @0x34ad6778 (???(/root/steamcmd/linux32/steamcmd+0x2d6778)) (x64pc=0x4002a826/"/root/steamcmd/linux32/steamcmd/_start + 0x32", rsp=0x3080f730, stack=0x30010000:0x30810000 own=(nil) fp=(nil)), for accessing 0xffffffffffffffff (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
RSP-0x20:0x0000000000000000 RSP-0x18:0x0000000000000000 RSP-0x10:0x0000000000000000 RSP-0x08:0x0000000000000000
RSP+0x00:0x300000804002a804 RSP+0x08:0x000000013080f73c RSP+0x10:0x000000003080f810 RSP+0x18:0x3080f83f3080f830
RAX:0x0000000000000001 RCX:0x000000003080f740 RDX:0x0000000030000080 RBX:0x000000003080f740
RSP:0x000000003080f730 RBP:0x0000000000000000 RSI:0x0000000000000001 RDI:0x0000000000000000
 R8:0x0000000000000000  R9:0x0000000000000000 R10:0x0000000000000000 R11:0x0000000000000000
R12:0x0000000000000000 R13:0x0000000000000000 R14:0x0000000000000000 R15:0x0000000000000000
ES:0x002b CS:0x0023 SS:0x002b DS:0x002b FS:0x0000 GS:0x0033  x86opcode=8B 1C 24 C3 90 90 90 90 (opcode=f9000281)
./steamcmd.sh: line 38:    31 Segmentation fault      (core dumped) $DEBUGGER "$STEAMEXE" "$@"

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 11, 2025

I still don't understand what could be happening there...

Can run steamcmd with gdb? and do "bt" when the segfault happens?

@amitojsingh366
Copy link

@ptitSeb here you go

(gdb) start
Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Temporary breakpoint 1 (-qualified main if $_inferior == 1) pending.
Starting program: /home/steam/.local/share/Steam/steamcmd/linux32/steamcmd 
warning: Error disabling address space randomization: Operation not permitted
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Failed to read a valid object file image from memory.
[New LWP 936]
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/root/Steam/logs/stderr.txt'
Logging directory: '/root/Steam/logs'
[New LWP 937]
[  0%] Checking for available updates...
[New LWP 938]
[----] Verifying installation...
[LWP 937 exited]
UpdateUI: skip show logo
Steam Console Client (c) Valve Corporation - version 1741737873
-- type 'quit' to exit --
Loading Steam API...[New LWP 939]
[New LWP 940]
[New LWP 941]
[New LWP 942]
[LWP 941 exited]
[LWP 942 exited]
[New LWP 943]
[New LWP 944]
[LWP 944 exited]
[New LWP 945]
IPC function call IClientUtils::GetSteamRealm took too long: 182 msec
Fatal error: futex robust_list not initialized by pthreads

Thread 6 "IPC:CSteamEngin" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 940]
0x0000ffff8c462dd8 in ?? ()
(gdb) bt
#0  0x0000ffff8c462dd8 in ?? ()
#1  0x0000ffff8a81d730 in ?? ()
#2  0x0000000000000002 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

@amitojsingh366
Copy link

Update: using box86 v0.3.6 prevents this error. There is a new error which is probably a path issue:

Steam Console Client (c) Valve Corporation - version 1741737873
-- type 'quit' to exit --
Loading Steam API...Error: Symbol execvpe not found, cannot apply R_386_JMP_SLOT 0x66bcaea8 (0xbd6540) in /root/steamcmd/linux32/steamclient.so
Error: relocating Plt symbols in elf steamclient.so
dlmopen steamclient.so failed: Cannot dlopen("steamclient.so"/0x63ed8cc8, 2)

Error: Symbol execvpe not found, cannot apply R_386_JMP_SLOT 0x66bcaea8 (0xbd6540) in /root/steamcmd/linux32/steamclient.so
Error: relocating Plt symbols in elf steamclient.so
dlmopen steamclient.so failed: Cannot dlopen("steamclient.so"/0x63ed8cc8, 2)

src/common/steam/client_api.cpp (589) : ClientAPI_InitGlobalInstance: InternalAPI_Init_Internal failed, most likely because you are missing a 32-bit dependency of steamclient.so (the Steam client is a 32-bit app).

FAILED (1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants