AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1375952
Accepted
nstuyvesant
nstuyvesant
Asked: 2021-11-17 10:38:37 +0800 CST2021-11-17 10:38:37 +0800 CST 2021-11-17 10:38:37 +0800 CST

当连接的 macOS 客户端重新启动时,Samba 4.13.14-Ubuntu 出现恐慌

  • 772

刚刚通过以下方式全新安装了Ubuntu Server 21.10,然后是Samba 4.13.14-Ubuntu:

sudo apt install samba avahi-daemon

每当连接到 Samba 的 macOS 客户端重新启动时,我都会收到以下电子邮件:

The Samba 'panic action' script, /usr/share/samba/panic-action,
was called for PID 24963 (/usr/sbin/smbd).

This means there was a problem with the program, such as a segfault.
Below is a backtrace for this process generated with gdb, which shows
the state of the program at the time the error occurred.  The Samba log
files may contain additional information about the problem.

If the problem persists, you are encouraged to first install the
samba-dbgsym package, which contains the debugging symbols for the Samba
binaries.  Then submit the provided information as a bug report to
Ubuntu by visiting this link:
https://launchpad.net/ubuntu/+source/samba/+filebug

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fb71b7be70f in __GI___wait4 (pid=25382, stat_loc=stat_loc@entry=0x7ffd2c2bb578, options=options@entry=0, usage=usage@entry=0x0) at ..
/sysdeps/unix/sysv/linux/wait4.c:30
#0  0x00007fb71b7be70f in __GI___wait4 (pid=25382, stat_loc=stat_loc@entry=0x7ffd2c2bb578, options=options@entry=0, usage=usage@entry=0x0) a
t ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007fb71b7be68b in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc@entry=0x7ffd2c2bb578, options=options@entry=0) at waitpid.c
:38
#2  0x00007fb71b72594b in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:171
#3  0x00007fb71bc4842f in smb_panic_s3 () from /lib/x86_64-linux-gnu/libsmbconf.so.0
#4  0x00007fb71bcb8fdb in smb_panic () from /lib/x86_64-linux-gnu/libsamba-util.so.0
#5  0x00007fb71bcb92b5 in ?? () from /lib/x86_64-linux-gnu/libsamba-util.so.0
#6  <signal handler called>
#7  0x0000000000000000 in ?? ()
#8  0x00007fb71b26448f in dbwrap_record_delete () from /usr/lib/x86_64-linux-gnu/samba/libdbwrap.so.0
#9  0x00007fb71be805e5 in smbXsrv_session_logoff () from /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0
#10 0x00007fb71be62e17 in ?? () from /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0
#11 0x00007fb71b8ff8ea in tevent_common_invoke_immediate_handler () from /lib/x86_64-linux-gnu/libtevent.so.0
#12 0x00007fb71b8ff90e in tevent_common_loop_immediate () from /lib/x86_64-linux-gnu/libtevent.so.0
#13 0x00007fb71b905760 in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#14 0x00007fb71b903afb in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#15 0x00007fb71b8feb28 in _tevent_loop_once () from /lib/x86_64-linux-gnu/libtevent.so.0
#16 0x00007fb71b8fee0b in tevent_common_loop_wait () from /lib/x86_64-linux-gnu/libtevent.so.0
#17 0x00007fb71b903a8b in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#18 0x00007fb71be4cc38 in smbd_process () from /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0
#19 0x000055cc54ea793d in smbd_accept_connection (ev=0x55cc551e1c20, fde=<optimized out>, flags=<optimized out>, private_data=<optimized out
>) at ../../source3/smbd/server.c:1014

#20 0x00007fb71b8ff4a1 in tevent_common_invoke_fd_handler () from /lib/x86_64-linux-gnu/libtevent.so.0
#21 0x00007fb71b90597f in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#22 0x00007fb71b903afb in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#23 0x00007fb71b8feb28 in _tevent_loop_once () from /lib/x86_64-linux-gnu/libtevent.so.0
#24 0x00007fb71b8fee0b in tevent_common_loop_wait () from /lib/x86_64-linux-gnu/libtevent.so.0
#25 0x00007fb71b903a8b in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#26 0x000055cc54ea5c3b in smbd_parent_loop (parent=0x55cc551f5040, ev_ctx=0x55cc551e1c20) at ../../source3/smbd/server.c:1361
#27 main (argc=<optimized out>, argv=<optimized out>) at ../../source3/smbd/server.c:2214
A debugging session is active.

/var/log/samba/log.smbd 显示:

[2021/11/17 11:21:31.378403,  0] ../../lib/util/fault.c:159(smb_panic_log)
  ===============================================================
[2021/11/17 11:21:31.378525,  0] ../../lib/util/fault.c:160(smb_panic_log)
  INTERNAL ERROR: Signal 11: Segmentation fault in pid 24963 (4.13.14-Ubuntu)
[2021/11/17 11:21:31.378565,  0] ../../lib/util/fault.c:164(smb_panic_log)
  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
[2021/11/17 11:21:31.378595,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2021/11/17 11:21:31.378621,  0] ../../lib/util/fault.c:170(smb_panic_log)
  PANIC (pid 24963): Signal 11: Segmentation fault in 4.13.14-Ubuntu
[2021/11/17 11:21:31.379046,  0] ../../lib/util/fault.c:274(log_stack_trace)
  BACKTRACE: 4 stack frames:
   #0 /lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x34) [0x7fb71bcb63f4]
   #1 /lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2a) [0x7fb71bcb8fca]
   #2 /lib/x86_64-linux-gnu/libsamba-util.so.0(+0x232b5) [0x7fb71bcb92b5]
   #3 /lib/x86_64-linux-gnu/libc.so.6(+0x46520) [0x7fb71b717520]
[2021/11/17 11:21:31.379162,  0] ../../source3/lib/util.c:838(smb_panic_s3)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 24963]
gdb: warning: Couldn't determine a path for the index cache directory.
30  ../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
[2021/11/17 11:21:32.341990,  0] ../../source3/lib/util.c:845(smb_panic_s3)
  smb_panic(): action returned status 0
[2021/11/17 11:21:32.342045,  0] ../../source3/lib/dumpcore.c:317(dump_core)
  coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern

我的客户是 macOS Monterey,在他们的 /etc/nsmb.conf 中有以下内容:

signing_required = no
protocol_vers_map=6
port445=no_netbios

我的 Ubuntu Server 21.10 的 /etc/samba/smb.conf:

[global]
allow dns updates = disabled
bind interfaces only = Yes
client min protocol = SMB3_02
dcerpc endpoint servers = rpcecho
delete veto files = Yes
disable netbios = Yes
disable spoolss = Yes
dns forwarder = 192.168.1.1
dns proxy = No
enhanced browsing = No
# Next line requires catia (needed if no Windows clients?)
fruit:encoding = native
fruit:metadata = stream
# Next line never worked which is why I configure Avahi to set the icon
;fruit:model = Macmini7
# Do not use NFS access control entries
fruit:nfs_aces = No
# Enable extended attributes (requires streams_xattr)
fruit:resource = xattr
# Next line is already the default
;fruit:zero_file_id = Yes
host msdfs = No
inherit acls = Yes
inherit permissions = Yes
interfaces = lan
lm announce = No
load printers = No
log file = /var/log/samba/log.smbd
log level = 2
logging = file
max log size = 10000
# Next 2 lines defer mDNS config to Avahi
mdns name = mdns
multicast dns register = No
name resolve order = host bcast
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = "*New Password:*" %n\n "*Reenter New Password:*" %n\n "*Password changed.*"
passwd program = /usr/bin/passwd %u
printcap cache time = 0
printcap name = /dev/null
printing = bsd
restrict anonymous = 2
rpc_daemon:spoolssd = disabled
rpc_server:epmapper = disabled
rpc_server:winreg = disabled
rpc_server:lsarpc = disabled
rpc_server:samr = disabled
rpc_server:netlogon = disabled
rpc_server:netdfs = disabled
rpc_server:dssetup = disabled
rpc_server:wkssvc = disabled
rpc_server:spoolss = disabled
rpc_server:svcctl = disabled
rpc_server:ntsvcs = disabled
rpc_server:eventlog = disabled
rpc_server:initshutdown = disabled
rpc_server:mdssvc = disabled
server max protocol = SMB3_11
server min protocol = SMB3_02
# Next line experimental until 4.15
server multi channel support = Yes
server role = standalone server
server services = rpc, smb
server string = %h server (Samba 4.13.14, Ubuntu 21.10)
show add printer wizard = No
smb ports = 445
unix password sync = Yes
use sendfile = Yes
veto files = /._*/.DS_Store/
vfs objects = catia fruit streams_xattr

[homes]
browseable = No
comment = Home Directory
fruit:time machine = No
guest ok = No
spotlight = No
valid users = %S
writable = Yes

[Backup]
comment = Time Machine
fruit:time machine = Yes
guest ok = No
path = /external/%U
spotlight = No
valid users = %U
writable = Yes

为了完整起见,这是我的 /etc/avahi/services/samba.service:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">Saint James</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=Macmini7</txt-record>
 </service>
 <service>
   <type>_adisk._tcp</type>
   <txt-record>sys=waMa=0,adVF=0x100</txt-record>
   <txt-record>dk0=adVN=Backup,adVF=0x82</txt-record>
 </service>
</service-group>

macOS Monterey 客户端仅需要文件共享和 Time Machine(无 Windows 客户端、无打印、无 Active Directory、无 DFS)。

有人看到这个吗?

apt
  • 2 2 个回答
  • 596 Views

2 个回答

  • Voted
  1. Rinzwind
    2021-11-17T13:23:57+08:002021-11-17T13:23:57+08:00

    不,您需要从源代码安装。您可以从 PPA 获得的最佳版本是 4.14(“samba 最新 PPA”在 178 个工作日内未更新)。

    恐慌(pid 1772):信号 11:4.13.14-Ubuntu 中的分段错误

    在此错误上方和下方多行几行,您可能会得到更好的结果。这一行没有让我找到有同样问题的其他人。

    分段错误是安全错误,因此将被反向移植到所有受支持的版本中。samba 的错误很常见;我在每个 samba 版本中都看到过它们,而且4.15.2也不是完美的,所以从源代码安装可能无法解决您的问题。所以最好提交错误报告并等待更新。

    • 1
  2. Best Answer
    nstuyvesant
    2022-01-05T09:21:07+08:002022-01-05T09:21:07+08:00

    问题是我的 smb.conf 中的这一行...

    server multi channel support = Yes
    

    显然,这个实验性功能在 4.15 之前不能很好地工作(当我使用 macOS 客户端时,其他类型可能也会发生)。关闭它可以解决问题。

    • 1

相关问题

  • 如何编写 shell 脚本来安装应用程序列表?

  • 如何查看存档中可用的软件包的所有版本?

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve