New comment by wangp on void-packages repository https://github.com/void-linux/void-packages/issues/27565#issuecomment-753282396 Comment: My findings so far, on Raspberry Pi 3B. ### samba-4.13.2_1 Works. ### samba-4.13.2_2 Fails. ``` smbd version 4.13.2 started. Copyright Andrew Tridgell and the Samba Team 1992-2020 svcctl_init_winreg: Could not open SYSTEM\CurrentControlSet\Services - NT_STATUS_INVALID_HANDLE dcesrv_init_ep_server: Failed to init endpoint server 'svcctl': NT_STATUS_UNSUCCESSFUL dcesrv_init: Failed to init DCE/RPC endpoint servers: NT_STATUS_UNSUCCESSFUL main: Failed to setup RPC server: NT_STATUS_UNSUCCESSFUL exit_daemon: daemon failed to start: Samba cannot setup ep pipe, error code 13 ``` ### samba-4.13.2_3 Fails as previously reported. ### gdb on samba-4.13.2_3 ``` GNU gdb (GDB) 10.1 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 "armv7l-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/smbd... Reading symbols from /usr/lib/debug//usr/bin/smbd... (gdb) run -F -S --no-process-group Starting program: /usr/bin/smbd -F -S --no-process-group [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib32/libthread_db.so.1". smbd version 4.13.2 started. Copyright Andrew Tridgell and the Samba Team 1992-2020 [Detaching after fork from child process 3952] [Detaching after fork from child process 3953] [Detaching after fork from child process 3954] Failed to open /etc/samba/private/secrets.tdb =============================================================== INTERNAL ERROR: could not open secrets db in pid 3949 (4.13.2) If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting =============================================================== PANIC (pid 3949): could not open secrets db in 4.13.2 BACKTRACE: 0 stack frames: dumping core in /var/log/samba/cores/smbd Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x762418a4 in __GI_abort () at abort.c:79 #2 0x76f62104 in dump_core () at ../../source3/lib/dumpcore.c:338 #3 0x76f45790 in smb_panic_s3 (why=why@entry=0x767d13a0 "could not open secrets db") at ../../source3/lib/util.c:849 #4 0x76b96308 in smb_panic (why=0x767d13a0 "could not open secrets db") at ../../lib/util/fault.c:184 #5 0x766a5044 in get_global_sam_sid () at ../../source3/passdb/machine_sid.c:204 #6 get_global_sam_sid () at ../../source3/passdb/machine_sid.c:186 #7 0x766a517c in sid_check_is_our_sam (sid=sid@entry=0x7effeba0) at ../../source3/passdb/machine_sid.c:237 #8 0x766a51e0 in sid_check_is_in_our_sam (sid=) at ../../source3/passdb/machine_sid.c:250 #9 0x7668e160 in sid_check_object_is_for_passdb (sid=sid@entry=0x7effec10) at ../../source3/lib/util_sid_passdb.c:33 #10 0x76699228 in pdb_sid_to_id (sid=0x7effec10, id=0x7effec08) at ../../source3/passdb/pdb_interface.c:1243 #11 0x76695068 in pdb_create_builtin (rid=rid@entry=544) at ../../source3/passdb/pdb_util.c:111 #12 0x76695258 in create_builtin_administrators (dom_sid=dom_sid@entry=0x0) at ../../source3/passdb/pdb_util.c:160 #13 0x76490e00 in finalize_local_nt_token (result=result@entry=0x455930, session_info_flags=1) at ../../source3/auth/token_util.c:707 #14 0x764913a0 in create_local_nt_token_from_info3 (mem_ctx=mem_ctx@entry=0x455428, is_guest=, info3=0x448498, extra=extra@entry=0x4557ac, ntok=, ntok@entry=0x455428) at ../../source3/auth/token_util.c:413 #15 0x7651c564 in create_local_token (mem_ctx=mem_ctx@entry=0x453e50, server_info=0x455780, session_key=session_key@entry=0x0, smb_username=, session_info_out=, session_info_out@entry=0x7efff084) at ../../source3/auth/auth_util.c:590 #16 0x7651e7e8 in make_new_session_info_guest (mem_ctx=mem_ctx@entry=0x0, _server_info=0x765931d4 , _session_info=0x765931d8 ) at ../../source3/auth/auth_util.c:1398 #17 0x7651eb4c in init_guest_session_info (mem_ctx=0x0) at ../../source3/auth/auth_util.c:1741 #18 init_guest_session_info (mem_ctx=mem_ctx@entry=0x0) at ../../source3/auth/auth_util.c:1734 #19 0x00404f2c in main (argc=, argv=) at ../../source3/smbd/server.c:2051 (gdb) ``` ### strace on samba-4.13.2_3 The command is: `strace -o /tmp/strace.log /usr/bin/smbd -F -S --no-process-group` Note that I deleted `/etc/samba/private/secrets.tdb` for this run, but the result is similar if the file already exists. Trimmed output: ``` ... 4039 openat(AT_FDCWD, "/etc/samba/private/secrets.tdb", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 8 4039 fcntl64(8, F_GETFD) = 0 4039 fcntl64(8, F_SETFD, FD_CLOEXEC) = 0 4039 fcntl64(8, F_SETLKW64, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0 4039 read(8, "", 168) = 0 4039 _llseek(8, 0, [0], SEEK_SET) = 0 4039 ftruncate64(8, 0) = 0 4039 write(8, "TDB file\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 696) = 696 ... 4039 openat(AT_FDCWD, "/etc/samba/private/secrets.tdb", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 23 4039 fcntl64(23, F_GETFD) = 0 4039 fcntl64(23, F_SETFD, FD_CLOEXEC) = 0 4039 fcntl64(23, F_SETLKW64, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0 4039 read(23, "TDB file\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 168) = 168 4039 fstat64(23, {st_mode=S_IFREG|0600, st_size=430080, ...}) = 0 4039 close(23) = 0 4039 write(2, "Failed to open /etc/samba/privat"..., 46) = 46 4039 write(1, "================================"..., 64) = 64 4039 getpid() = 4039 4039 write(1, "INTERNAL ERROR: could not open s"..., 63) = 63 4039 write(1, "If you are running a recent Samb"..., 201) = 201 4039 write(1, "================================"..., 64) = 64 4039 getpid() = 4039 4039 write(1, "PANIC (pid 4039): could not open"..., 54) = 54 ``` edit: I needed to pass `--no-process-group` to avoid an error message when starting smbd from a user shell ("exit_daemon: daemon failed to start: Failed to create session, error code 1") but it shouldn't affect the results.