Github messages for voidlinux
 help / color / mirror / Atom feed
From: wangp <wangp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: Samba aborts on Raspberry Pi 3B 
Date: Fri, 01 Jan 2021 08:57:46 +0100	[thread overview]
Message-ID: <20210101075746.chXgbJ_dzpBfTVQcDpaQxmdWk4ULRxJQgHKODkKd2W4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27565@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 7196 bytes --]

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 <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 "armv7l-linux-gnueabihf".
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/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=<optimized out>) 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=<optimized out>, info3=0x448498, extra=extra@entry=0x4557ac, ntok=<optimized out>, 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=<optimized out>, session_info_out=<optimized 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 <guest_server_info>, _session_info=0x765931d8 <guest_info>) 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=<optimized out>, argv=<optimized out>) 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.

  parent reply	other threads:[~2021-01-01  7:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31  0:01 [ISSUE] " wangp
2020-12-31  3:56 ` ahesford
2020-12-31  5:39 ` ericonr
2020-12-31 14:10 ` Anachron
2020-12-31 14:11 ` Anachron
2020-12-31 15:56 ` ahesford
2020-12-31 17:18 ` hortimech
2020-12-31 17:44 ` ahesford
2021-01-01  7:54 ` wangp
2021-01-01  7:57 ` wangp [this message]
2021-01-01 13:53 ` Anachron
2021-01-01 13:58 ` ahesford
2021-01-01 14:03 ` hortimech
2021-01-01 14:15 ` Anachron
2021-01-01 14:27 ` ahesford
2021-01-01 18:30 ` Anachron
2021-01-01 18:40 ` hortimech
2021-01-02  0:28 ` wangp
2021-01-02  0:41 ` ericonr
2021-01-02  0:42 ` ericonr
2021-01-02 11:12 ` andry-dev
2021-01-02 13:12 ` wangp
2021-01-02 19:06 ` ahesford
2021-01-05  3:42 ` [ISSUE] [CLOSED] " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210101075746.chXgbJ_dzpBfTVQcDpaQxmdWk4ULRxJQgHKODkKd2W4@z \
    --to=wangp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).