Post subject: "Couldn't connect to socket" when trying to launch Starbound
Joined: 6/17/2020
Posts: 1
Game: Starbound; Version: 1.4 "Bounty Hunter; Downloaded from steam but moved to a different folder, so DRM-free
LibTAS version 1.3.5; OS: Ubuntu 20.04 LTS
I am trying to TAS the game Starbound, however, I have no luck. The game folder is moved to a different location and works completely free from steam. Outside of LibTAS, launching the run-client.sh file launches the game normally. Launching the bin file does not work. I have configured LibTAS like so:
Game executable: "/home/kitty/TAS/Starbound/Starbound (Game)/linux/starbound"
Library path: "/home/kitty/TAS/Starbound/Starbound (Game)/linux"
Trying to start and attach gdb gives this:
Reading symbols from /home/kitty/TAS/Starbound/Starbound (Game)/linux/starbound...
Signal        Stop	Print	Pass to program	Description
SIGUSR1       No	No	Yes		User defined signal 1
Signal        Stop	Print	Pass to program	Description
SIGUSR2       No	No	Yes		User defined signal 2
Signal        Stop	Print	Pass to program	Description
SIGPWR        No	No	Yes		Power fail/restart
Signal        Stop	Print	Pass to program	Description
SIGXCPU       No	No	Yes		CPU time limit exceeded
Signal        Stop	Print	Pass to program	Description
SIG35         No	No	Yes		Real-time event 35
Signal        Stop	Print	Pass to program	Description
SIG36         No	No	Yes		Real-time event 36
Starting program: /home/kitty/TAS/Starbound/Starbound (Game)/linux/starbound \'/home/kitty/TAS/Starbound/Starbound \(Game\)/linux/run-client.sh\'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Attempt 1: Couldn't connect to socket.
Attempt 2: Couldn't connect to socket.
Attempt 3: Couldn't connect to socket.
Attempt 4: Couldn't connect to socket.
Attempt 5: Couldn't connect to socket.
Attempt 6: Couldn't connect to socket.
Attempt 7: Couldn't connect to socket.
Attempt 8: Couldn't connect to socket.
Attempt 9: Couldn't connect to socket.
Attempt 10: Couldn't connect to socket.
^C
Program received signal SIGINT, Interrupt.
__lll_lock_wait (futex=futex@entry=0x1d57fa0 <init_lock>, private=0)
    at lowlevellock.c:52
52	lowlevellock.c: No such file or directory.
(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff6179d40 (LWP 18550)):
#0  __lll_lock_wait (futex=futex@entry=0x1d57fa0 <init_lock>, private=0) at lowlevellock.c:52
#1  0x00007ffff760e235 in __GI___pthread_mutex_lock (mutex=mutex@entry=0x1d57fa0 <init_lock>) at ../nptl/pthread_mutex_lock.c:135
#2  0x00000000015741c0 in je_malloc_mutex_lock (tsdn=0x0, mutex=0x1d57fa0 <init_lock>) at include/jemalloc/internal/mutex.h:94
#3  malloc_init_hard () at src/jemalloc.c:1401
#4  0x0000000001575af5 in malloc_init () at src/jemalloc.c:302
#5  ialloc_body (slow_path=true, usize=<synthetic>, tsdn=<synthetic>, zero=false, size=<optimised>) at src/jemalloc.c:1498
#6  je_malloc (size=<optimised>) at src/jemalloc.c:1562
#7  0x0000000000a534d9 in operator new(unsigned long) ()
#8  0x00007ffff7d4c487 in ?? () from /usr/bin/libtas.so
#9  0x00007ffff7d4ecc9 in open () from /usr/bin/libtas.so
#10 0x000000000159dd4c in os_overcommits_proc () at src/pages.c:217
#11 je_pages_boot () at src/pages.c:245
#12 0x0000000001574077 in malloc_init_hard_a0_locked () at src/jemalloc.c:1281
#13 0x0000000001574234 in malloc_init_hard () at src/jemalloc.c:1408
#14 0x0000000001575af5 in malloc_init () at src/jemalloc.c:302
#15 ialloc_body (slow_path=true, usize=<synthetic>, tsdn=<synthetic>, zero=false, size=<optimised>) at src/jemalloc.c:1498
--Type <RET> for more, q to quit, c to continue without paging--
#16 je_malloc (size=<optimised>) at src/jemalloc.c:1562
#17 0x0000000000a534d9 in operator new(unsigned long) ()
#18 0x00007ffff7ce6fed in ?? () from /usr/bin/libtas.so
#19 0x00007ffff7ce7318 in ?? () from /usr/bin/libtas.so
#20 0x00007ffff7ce71da in dlsym () from /usr/bin/libtas.so
#21 0x00007ffff6bece6e in ?? () from /lib/x86_64-linux-gnu/libGLdispatch.so.0
#22 0x00007ffff6beb25d in ?? () from /lib/x86_64-linux-gnu/libGLdispatch.so.0
#23 0x00007ffff7fe0b8a in ?? () from /lib64/ld-linux-x86-64.so.2
#24 0x00007ffff7fe0c91 in ?? () from /lib64/ld-linux-x86-64.so.2
#25 0x00007ffff7fd013a in ?? () from /lib64/ld-linux-x86-64.so.2
#26 0x0000000000000003 in ?? ()
#27 0x00007fffffffe139 in ?? ()
#28 0x00007fffffffe174 in ?? ()
#29 0x00007fffffffe199 in ?? ()
#30 0x0000000000000000 in ?? ()
Launching without gdb only shows the "Couldn't connect to socket" messages. Can someone help me with this?
keylie
He/Him
Editor, Emulator Coder, Expert player (2822)
Joined: 3/17/2013
Posts: 391
So, jemalloc opens some file during init (looks like it is "/proc/sys/vm/overcommit_memory"), but libtas allocates some memory in its "open" hook, resulting in a deadlock. I will look at it.