Hello, On Sat, May 31, 2025 at 09:32:21PM +0100, Diego Nieto Cid wrote: > > I'll try to attach gdb to the connecting socat to see if I can find > where it's hanging. But if something rings a bell (like /dev/null usage > maybe) I'm all ears :) >
I attach the gdb backtraces of the three processes: listening-parent, listening-forked and connecting side. Thanks, Diego
demo@debian:~$ gdb --pid=19714 $(which socat) gdb: warning: A handler for the OS ABI "GNU/Hurd" is not built into this configuration of GDB. Attempting to continue with the default i386 settings. GNU gdb (Debian 16.3-1) 16.3 Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/socat... Reading symbols from /usr/lib/debug/.build-id/99/05b22efa65003340cfcb4aa4312f5cee3e4b67.debug... Attaching to program: /usr/bin/socat, process 19714 [New Thread 19714.1] [New Thread 19714.2] Reading symbols from /lib/x86_64-gnu/libwrap.so.0... (No debugging symbols found in /lib/x86_64-gnu/libwrap.so.0) Reading symbols from /lib/x86_64-gnu/libssl.so.3... (No debugging symbols found in /lib/x86_64-gnu/libssl.so.3) Reading symbols from /lib/x86_64-gnu/libcrypto.so.3... (No debugging symbols found in /lib/x86_64-gnu/libcrypto.so.3) Reading symbols from /lib/x86_64-gnu/libc.so.0.3... Reading symbols from /usr/lib/debug/.build-id/dc/68653f6b68ad7a984f1f5fe78b081b430c1b0c.debug... Reading symbols from /lib/x86_64-gnu/libpthread.so.0.3... Reading symbols from /usr/lib/debug/.build-id/93/ca9047ae869b4b56e83026eb907c29ac4adf49.debug... Reading symbols from /lib/x86_64-gnu/libz.so.1... (No debugging symbols found in /lib/x86_64-gnu/libz.so.1) Reading symbols from /lib/x86_64-gnu/libzstd.so.1... (No debugging symbols found in /lib/x86_64-gnu/libzstd.so.1) Reading symbols from /lib/ld-x86-64.so.1... Reading symbols from /usr/lib/debug/.build-id/b7/c7e226b632a14e34d41f2a0d6096e478a2d481.debug... Reading symbols from /lib/x86_64-gnu/libmachuser.so.1... Reading symbols from /usr/lib/debug/.build-id/fc/9abe553625fd1bab0b68343388a53c5e109e9d.debug... Reading symbols from /lib/x86_64-gnu/libhurduser.so.0.3... Reading symbols from /usr/lib/debug/.build-id/56/5d6d46f9b9e9e55cf13a88c752810b2723cc84.debug... (gdb) thread apply all bt Thread 2 (Thread 19714.2): #0 0x000000010180eaec in __GI___mach_msg_trap () at ./build-tree/hurd-amd64-libc/mach/mach_msg_trap.S:2 #1 0x000000010180f1ae in __GI___mach_msg (msg=msg@entry=0x102389f20, option=option@entry=3, send_size=48, rcv_size=rcv_size@entry=4096, rcv_name=rcv_name@entry=14, timeout=timeout@entry=0, notify=0) at ./mach/msg.c:111 #2 0x000000010180f6f1 in __mach_msg_server_timeout (demux=demux@entry=0x10183e230 <msgport_server>, max_size=4096, rcv_name=14, option=option@entry=0, timeout=timeout@entry=0) at ./mach/msgserver.c:146 #3 0x000000010180f7ca in __mach_msg_server (demux=demux@entry=0x10183e230 <msgport_server>, max_size=<optimized out>, rcv_name=<optimized out>) at ./mach/msgserver.c:191 #4 0x000000010183e2c0 in _hurd_msgport_receive (arg=<optimized out>) at ./hurd/msgportdemux.c:50 #5 0x0000000101a4c588 in entry_point (self=0x2000000011a0, start_routine=0x10183e270 <_hurd_msgport_receive>, arg=0x0) at ./htl/pt-create.c:73 #6 0x0000000000000000 in ?? () Backtrace stopped: Cannot access memory at address 0x10238c000 Thread 1 (Thread 19714.1): #0 0x000000010180eaec in __GI___mach_msg_trap () at ./build-tree/hurd-amd64-libc/mach/mach_msg_trap.S:2 #1 0x000000010180f1ae in __GI___mach_msg (msg=msg@entry=0x0, option=option@entry=1282, send_size=send_size@entry=0, rcv_size=rcv_size@entry=0, rcv_name=rcv_name@entry=10, timeout=timeout@entry=4294966296, notify=0) at ./mach/msg.c:111 #2 0x000000010192291f in __sleep (seconds=seconds@entry=2147483647) at ../sysdeps/mach/sleep.c:40 #3 0x000000010003ae90 in Sleep (seconds=seconds@entry=2147483647) at ./sycls.c:1390 #4 0x000000010002413a in _xioopen_listen (xfd=xfd@entry=0x2000000020b0, xioflags=xioflags@entry=45, us=<optimized out>, us@entry=0x1010975b0, uslen=<optimized out>, uslen@entry=10, opts=opts@entry=0x200000002460, pf=pf@entry=1, socktype=1, proto=0, level=4) at ./xio-listen.c:391 #5 0x00000001000247b6 in xioopen_listen (xfd=xfd@entry=0x2000000020b0, xioflags=xioflags@entry=45, us=us@entry=0x1010975b0, uslen=uslen@entry=10, opts=opts@entry=0x200000002460, opts0=0x200000002890, pf=1, socktype=1, proto=0) at ./xio-listen.c:56 #6 0x0000000100025039 in xioopen_unix_listen (argc=<optimized out>, argv=<optimized out>, opts=0x200000002460, xioflags=45, xxfd=0x2000000020b0, groups=<optimized out>, abstract=0, dummy2=0, dummy3=0) at ./xio-unix.c:189 #7 0x0000000100017c85 in xioopen_single (xfd=xfd@entry=0x2000000020b0, xioflags=xioflags@entry=45) at ./xioopen.c:610 #8 0x0000000100017e54 in xioopen_dual (xfd=0x2000000020b0, xioflags=45) at ./xioopen.c:470 #9 xioopen (addr=<optimized out>, xioflags=45) at ./xioopen.c:404 #10 0x00000001000166a3 in socat (address1=<optimized out>, address2=0x10109903e "STDOUT") at ./socat.c:643 #11 0x0000000100013127 in main (argc=<optimized out>, argv=0x101098d08) at ./socat.c:394 (gdb)
demo@debian:~$ gdb --pid=19746 $(which socat) gdb: warning: A handler for the OS ABI "GNU/Hurd" is not built into this configuration of GDB. Attempting to continue with the default i386 settings. GNU gdb (Debian 16.3-1) 16.3 Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/socat... Reading symbols from /usr/lib/debug/.build-id/99/05b22efa65003340cfcb4aa4312f5cee3e4b67.debug... Attaching to program: /usr/bin/socat, process 19746 [New Thread 19746.1] [New Thread 19746.2] Reading symbols from /lib/ld-x86-64.so.1... Reading symbols from /usr/lib/debug/.build-id/b7/c7e226b632a14e34d41f2a0d6096e478a2d481.debug... (gdb) thread apply all bt Thread 2 (Thread 19746.2): #0 0x000000010180eaec in _start () from /lib/ld-x86-64.so.1 #1 0x000000010180f1ae in process_dl_debug (dl_debug=0xe <error: Cannot access memory at address 0xe>, state=<optimized out>) at ./elf/rtld.c:2446 #2 0x000000010180f6f1 in _dl_start (arg=0x0) at ./elf/rtld.c:565 #3 0x000000010183e2c0 in ?? () #4 0x0000000000000000 in ?? () Thread 1 (Thread 19746.1): #0 0x000000010180eaec in _start () from /lib/ld-x86-64.so.1 #1 0x000000010180f1ae in process_dl_debug (dl_debug=0x1 <error: Cannot access memory at address 0x1>, state=<optimized out>) at ./elf/rtld.c:2446 #2 0x0000000101837db8 in ?? () #3 0x0000000000000000 in ?? () (gdb)
demo@debian:~$ gdb --pid=19745 $(which socat) gdb: warning: A handler for the OS ABI "GNU/Hurd" is not built into this configuration of GDB. Attempting to continue with the default i386 settings. GNU gdb (Debian 16.3-1) 16.3 Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/socat... Reading symbols from /usr/lib/debug/.build-id/99/05b22efa65003340cfcb4aa4312f5cee3e4b67.debug... Attaching to program: /usr/bin/socat, process 19745 [New Thread 19745.1] [New Thread 19745.2] Reading symbols from /lib/x86_64-gnu/libwrap.so.0... (No debugging symbols found in /lib/x86_64-gnu/libwrap.so.0) Reading symbols from /lib/x86_64-gnu/libssl.so.3... (No debugging symbols found in /lib/x86_64-gnu/libssl.so.3) Reading symbols from /lib/x86_64-gnu/libcrypto.so.3... (No debugging symbols found in /lib/x86_64-gnu/libcrypto.so.3) Reading symbols from /lib/x86_64-gnu/libc.so.0.3... Reading symbols from /usr/lib/debug/.build-id/dc/68653f6b68ad7a984f1f5fe78b081b430c1b0c.debug... Reading symbols from /lib/x86_64-gnu/libpthread.so.0.3... Reading symbols from /usr/lib/debug/.build-id/93/ca9047ae869b4b56e83026eb907c29ac4adf49.debug... Reading symbols from /lib/x86_64-gnu/libz.so.1... (No debugging symbols found in /lib/x86_64-gnu/libz.so.1) Reading symbols from /lib/x86_64-gnu/libzstd.so.1... (No debugging symbols found in /lib/x86_64-gnu/libzstd.so.1) Reading symbols from /lib/ld-x86-64.so.1... Reading symbols from /usr/lib/debug/.build-id/b7/c7e226b632a14e34d41f2a0d6096e478a2d481.debug... Reading symbols from /lib/x86_64-gnu/libmachuser.so.1... Reading symbols from /usr/lib/debug/.build-id/fc/9abe553625fd1bab0b68343388a53c5e109e9d.debug... Reading symbols from /lib/x86_64-gnu/libhurduser.so.0.3... Reading symbols from /usr/lib/debug/.build-id/56/5d6d46f9b9e9e55cf13a88c752810b2723cc84.debug... (gdb) thread apply all bt Thread 2 (Thread 19745.2): #0 0x000000010180eaec in __GI___mach_msg_trap () at ./build-tree/hurd-amd64-libc/mach/mach_msg_trap.S:2 #1 0x000000010180f1ae in __GI___mach_msg (msg=msg@entry=0x10238af30, option=option@entry=3, send_size=48, rcv_size=rcv_size@entry=4096, rcv_name=rcv_name@entry=14, timeout=timeout@entry=0, notify=0) at ./mach/msg.c:111 #2 0x000000010180f6f1 in __mach_msg_server_timeout (demux=demux@entry=0x10183e230 <msgport_server>, max_size=4096, rcv_name=14, option=option@entry=0, timeout=timeout@entry=0) at ./mach/msgserver.c:146 #3 0x000000010180f7ca in __mach_msg_server (demux=demux@entry=0x10183e230 <msgport_server>, max_size=<optimized out>, rcv_name=<optimized out>) at ./mach/msgserver.c:191 #4 0x000000010183e2c0 in _hurd_msgport_receive (arg=<optimized out>) at ./hurd/msgportdemux.c:50 #5 0x0000000101a4c588 in entry_point (self=0x2000000011a0, start_routine=0x10183e270 <_hurd_msgport_receive>, arg=0x0) at ./htl/pt-create.c:73 #6 0x0000000000000000 in ?? () Backtrace stopped: Cannot access memory at address 0x10238c000 Thread 1 (Thread 19745.1): #0 0x000000010180eaec in __GI___mach_msg_trap () at ./build-tree/hurd-amd64-libc/mach/mach_msg_trap.S:2 #1 0x000000010180f1ae in __GI___mach_msg (msg=msg@entry=0x101097500, option=option@entry=1026, send_size=send_size@entry=0, rcv_size=rcv_size@entry=64, rcv_name=16, timeout=timeout@entry=0, notify=0) at ./mach/msg.c:111 #2 0x0000000101837db8 in _hurd_select (nfds=<optimized out>, pollfds=pollfds@entry=0x0, readfds=readfds@entry=0x101097690, writefds=writefds@entry=0x1010976b0, exceptfds=exceptfds@entry=0x1010976d0, timeout=<optimized out>, sigmask=<optimized out>) at ./hurd/hurdselect.c:423 #3 0x000000010196b194 in __GI___select (nfds=nfds@entry=1, readfds=readfds@entry=0x101097690, writefds=writefds@entry=0x1010976b0, exceptfds=exceptfds@entry=0x1010976d0, timeout=timeout@entry=0x0) at ../sysdeps/mach/hurd/select.c:42 #4 0x0000000100039a54 in Select (n=n@entry=1, readfds=readfds@entry=0x101097690, writefds=writefds@entry=0x1010976b0, exceptfds=exceptfds@entry=0x1010976d0, timeout=timeout@entry=0x0) at ./sycls.c:841 #5 0x00000001000336f2 in xiopoll (fds=fds@entry=0x101097780, nfds=nfds@entry=4, timeout=timeout@entry=0x0) at ./sysutils.c:569 #6 0x0000000100015570 in _socat () at ./socat.c:974 #7 0x0000000100016805 in socat (address1=<optimized out>, address2=<optimized out>) at ./socat.c:725 #8 0x0000000100013127 in main (argc=<optimized out>, argv=0x101098d08) at ./socat.c:394 (gdb)