您好,我们正在运行集成了 Microsoft Active Directory 的 Samba 服务器 4.6.2。将 CentOS 7.3 升级到 7.4 版后,我们的 Samba 服务器开始抛出错误。有些用户无法将文件从桌面复制到服务器。
Samba 崩溃并出现核心转储,重启后,半个小时内一切都运行正常,然后 Samba 又开始记录错误。即使重启服务器后,Samba 也开始抛出错误。我读过操作方法部分,但这里只提供了基本的故障排除步骤,没有提供任何与此类似严重错误相关的信息。
我们使用的是 CentOS 7.4,最新内核版本为 3.10.0-693.2.2.el7.x86_64。我们的文件服务器有 16GB 内存和 4 个 CPU 核心。我很乐意为您提供任何帮助。
这是我的日志文件(/var/log/messages):
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.362559, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.362980, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.363008, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.363034, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.388115, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.388174, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.388212, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 17:49:31 fs03 smbd[2160]: [2017/09/21 17:49:31.388238, 0] ../source3/lib/sysquotas.c:461(sys_get_quota)
Sep 21 17:49:31 fs03 smbd[2160]: sys_path_to_bdev() failed for path [.]!
Sep 21 19:34:38 fs03 smbd[4287]: [2017/09/21 19:34:38.472673, 0] ../source3/lib/popt_common.c:67(popt_s3_talloc_log_fn)
Sep 21 19:34:38 fs03 smbd[4287]: smb2_write failed: fnum 3657905683, file IT/tmp-files/10G (7), length=65536 offset=0 nwritten=-1: NT_STATUS_NETWORK_BUSY#012Bad talloc magic value - wrong talloc version used/mixed
Sep 21 19:34:38 fs03 smbd[4287]: smb2_write failed: fnum 3657905683, file IT/tmp-files/10G (7), length=65536 offset=0 nwritten=-1: NT_STATUS_NETWORK_BUSY
Sep 21 19:34:38 fs03 smbd[4287]: [2017/09/21 19:34:38.473097, 0] ../source3/lib/util.c:791(smb_panic_s3)
Sep 21 19:34:38 fs03 smbd[4287]: PANIC (pid 4287): Bad talloc magic value - wrong talloc version used/mixed
Sep 21 19:34:38 fs03 smbd[4287]: [2017/09/21 19:34:38.623999, 0] ../source3/lib/util.c:902(log_stack_trace)
Sep 21 19:34:38 fs03 smbd[4287]: BACKTRACE: 8 stack frames:
Sep 21 19:34:38 fs03 smbd[4287]: #0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fbb77e336ba]
Sep 21 19:34:38 fs03 smbd[4287]: #1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fbb77e33790]
Sep 21 19:34:38 fs03 smbd[4287]: #2 /lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fbb79f0e95f]
Sep 21 19:34:38 fs03 smbd[4287]: #3 /lib64/libtalloc.so.2(_talloc_get_type_abort+0x102) [0x7fbb76c6b702]
Sep 21 19:34:38 fs03 smbd[4287]: #4 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3c67) [0x7fbb75857c67]
Sep 21 19:34:38 fs03 smbd[4287]: #5 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3341) [0x7fbb75857341]
Sep 21 19:34:38 fs03 smbd[4287]: #6 /lib64/libpthread.so.0(+0x7e25) [0x7fbb7a36de25]
Sep 21 19:34:38 fs03 smbd[4287]: #7 /lib64/libc.so.6(clone+0x6d) [0x7fbb7657f34d]
Sep 21 19:34:38 fs03 smbd[4287]: [2017/09/21 19:34:38.624209, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 21 19:34:38 fs03 smbd[4287]: dumping core in /var/log/samba/cores/smbd
Sep 21 19:34:38 fs03 smbd[4287]:
Sep 21 19:35:41 fs03 systemd-logind: New session 29 of user root.
Sep 21 19:35:41 fs03 systemd: Started Session 29 of user root.
Sep 21 19:35:41 fs03 systemd: Starting Session 29 of user root.
Sep 21 19:35:46 fs03 smbd[24327]: [2017/09/21 19:35:46.448052, 0] ../source3/lib/popt_common.c:67(popt_s3_talloc_log_fn)
Sep 21 19:35:46 fs03 smbd[24327]: [2017/09/21 19:35:46.448577, 0] ../source3/lib/util.c:791(smb_panic_s3)
Sep 21 19:35:46 fs03 smbd[24327]: PANIC (pid 24327): Bad talloc magic value - wrong talloc version used/mixed
Sep 21 19:35:46 fs03 smbd[24327]: [2017/09/21 19:35:46.448961, 0] ../source3/lib/util.c:902(log_stack_trace)
Sep 21 19:35:46 fs03 smbd[24327]: BACKTRACE: 8 stack frames:
Sep 21 19:35:46 fs03 smbd[24327]: #0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fbb77e336ba]
Sep 21 19:35:46 fs03 smbd[24327]: #1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fbb77e33790]
Sep 21 19:35:46 fs03 smbd[24327]: #2 /lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fbb79f0e95f]
Sep 21 19:35:46 fs03 smbd[24327]: #3 /lib64/libtalloc.so.2(_talloc_get_type_abort+0x102) [0x7fbb76c6b702]
Sep 21 19:35:46 fs03 smbd[24327]: #4 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3c67) [0x7fbb75857c67]
Sep 21 19:35:46 fs03 smbd[24327]: #5 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3341) [0x7fbb75857341]
Sep 21 19:35:46 fs03 smbd[24327]: #6 /lib64/libpthread.so.0(+0x7e25) [0x7fbb7a36de25]
Sep 21 19:35:46 fs03 smbd[24327]: #7 /lib64/libc.so.6(clone+0x6d) [0x7fbb7657f34d]
Sep 21 19:35:46 fs03 smbd[24327]: [2017/09/21 19:35:46.449544, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 21 19:35:46 fs03 smbd[24327]: dumping core in /var/log/samba/cores/smbd
Sep 21 19:35:46 fs03 smbd[24327]:
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.975028, 0] ../source3/lib/popt_common.c:67(popt_s3_talloc_log_fn)
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.975395, 0] ../source3/lib/util.c:791(smb_panic_s3)
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.975415, 0] ../source3/lib/popt_common.c:67(popt_s3_talloc_log_fn)
Sep 21 19:50:41 fs03 smbd[25068]: PANIC (pid 25068): Bad talloc magic value - wrong talloc version used/mixed#012Bad talloc magic value - wrong talloc version used/mixed
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.975577, 0] ../source3/lib/util.c:791(smb_panic_s3)
Sep 21 19:50:41 fs03 smbd[25068]: PANIC (pid 25068): Bad talloc magic value - wrong talloc version used/mixed
Sep 21 19:50:41 fs03 smbd[25068]:
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.975974, 0] ../source3/lib/util.c:902(log_stack_trace)
Sep 21 19:50:41 fs03 smbd[25068]: BACKTRACE: 8 stack frames:
Sep 21 19:50:41 fs03 smbd[25068]: #0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fbb77e336ba]
Sep 21 19:50:41 fs03 smbd[25068]: #1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fbb77e33790]
Sep 21 19:50:41 fs03 smbd[25068]: #2 /lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fbb79f0e95f]
Sep 21 19:50:41 fs03 smbd[25068]: BACKTRACE: 8 stlib64/libtalloc.so.2(_talloc_get_type_abort+0x102) [0x7fbb76c6b702]
Sep 21 19:50:41 fs03 smbd[25068]: #4 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3c67) [0x7fbb75857c67]
Sep 21 19:50:41 fs03 smbd[25068]: #0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fbb77e336ba]
Sep 21 19:50:41 fs03 smbd[25068]: #5 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3341) [0x7fbb75857341]
Sep 21 19:50:41 fs03 smbd[25068]: #1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fbb77e33790]
Sep 21 19:50:41 fs03 smbd[25068]: #1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fbb77e33790]
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.976485, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 21 19:50:41 fs03 smbd[25068]: #5 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3341) [0x7fbb75857341]
Sep 21 19:50:41 fs03 smbd[25068]: #6 /lib64/libpthread.so.0(+0x7e25) [0x7fbb7a36de25]
Sep 21 19:50:41 fs03 smbd[25068]:
Sep 21 19:50:41 fs03 smbd[25068]: #6 /lib64/libpthread.so.0(+0x7e25) [0x7fbb7a36de25]
Sep 21 19:50:41 fs03 smbd[25068]: #7 /lib64/libc.so.6(clone+0x6d) [0x7fbb7657f34d]
Sep 21 19:50:41 fs03 smbd[25068]: [2017/09/21 19:50:41.976862, 0] ../source3/lib/dumpcore.c:273(dump_core)
Sep 21 19:50:41 fs03 smbd[25068]: dump_core() called recursive
Sep 21 19:57:18 fs03 smbd[27177]: [2017/09/21 19:57:18.950112, 0] ../lib/util/fault.c:78(fault_report)
Sep 21 19:57:18 fs03 smbd[27177]: [2017/09/21 19:57:18.951433, 0] ../lib/util/fault.c:81(fault_report)
Sep 21 19:57:18 fs03 smbd[27177]: ===============================================================
Sep 21 19:57:18 fs03 smbd[27177]: [2017/09/21 19:57:18.970608, 0] ../source3/lib/util.c:902(log_stack_trace)
Sep 21 19:57:18 fs03 smbd[27177]: BACKTRACE: 12 stack frames:
Sep 21 19:57:18 fs03 smbd[27177]: #0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fbb77e336ba]
Sep 21 19:57:18 fs03 smbd[27177]: BACKTRACE: 12 stack frames:#012smb2_write failed: fnum 3359156866, file IT/tmp-files/10G (5), length=65536 offset=0 nwritten=-1: NT_STATUS_NETWORK_BUSY
Sep 21 19:57:18 fs03 smbd[27177]:
Sep 21 19:57:18 fs03 smbd[27177]: [2017/09/21 19:57:18.972518, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 21 19:57:18 fs03 smbd[27177]: dumping core in /var/log/samba/cores/smbd
Sep 21 19:57:18 fs03 smbd[27177]:
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 journal: out of memory [2273]
Sep 22 09:27:51 fs03 smbd[2273]: [2017/09/22 09:27:51.248367, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 22 09:27:51 fs03 smbd[2273]: dumping core in /var/log/samba/cores/smbd
Sep 22 09:27:51 fs03 smbd[2273]:
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 journal: out of memory [2275]
Sep 22 09:27:52 fs03 smbd[2275]: [2017/09/22 09:27:52.305728, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 22 09:27:52 fs03 smbd[2275]: dumping core in /var/log/samba/cores/smbd
Sep 22 09:27:52 fs03 smbd[2275]:
Sep 22 09:27:53 fs03 smbd[2280]: [2017/09/22 09:27:53.036463, 0] ../lib/util/charset/codepoints.c:16630(get_conv_handle)
Sep 22 09:27:53 fs03 smbd[2280]: dos charset 'CP850' unavailable - using ASCII
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 journal: out of memory [2280]
Sep 22 09:28:12 fs03 smbd[2280]: [2017/09/22 09:28:12.927151, 0] ../source3/lib/dumpcore.c:315(dump_core)
Sep 22 09:28:12 fs03 smbd[2280]: dumping core in /var/log/samba/cores/smbd
Sep 22 09:28:12 fs03 smbd[2280]:
这是我的 smbd 信息:
[root@fs03 ~]# smbd -i
smbd version 4.6.2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2017
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[data]"
Processing section "[data2]"
Processing section "[data3]"
Processing section "[data4]"
Processing section "[data5]"
Processing section "[data6]"
added interface eth0 ip=10.10.xxx.xx bcast=10.10.xxx.255 netmask=255.255.255.0
INFO: Profiling turned OFF from pid 15718
ERROR: smbd is already running. File /run/smbd.pid exists and process id 1623 is running.
[root@fs03 ~]#
这是我的 samba 日志文件:
[2017/09/22 11:05:34.330357, 0] ../source3/lib/popt_common.c:67(popt_s3_talloc_log_fn)
Bad talloc magic value - wrong talloc version used/mixed
[2017/09/22 11:05:34.330438, 0] ../source3/lib/util.c:791(smb_panic_s3)
PANIC (pid 23023): Bad talloc magic value - wrong talloc version used/mixed
[2017/09/22 11:05:34.330758, 0] ../source3/lib/util.c:902(log_stack_trace)
BACKTRACE: 8 stack frames:
#0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fd1088416ba]
#1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fd108841790]
#2 /lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fd10a91c95f]
#3 /lib64/libtalloc.so.2(_talloc_get_type_abort+0x102) [0x7fd107679702]
#4 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3c67) [0x7fd106265c67]
#5 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3341) [0x7fd106265341]
#6 /lib64/libpthread.so.0(+0x7e25) [0x7fd10ad7be25]
#7 /lib64/libc.so.6(clone+0x6d) [0x7fd106f8d34d]
[2017/09/22 11:05:34.330915, 0] ../source3/lib/dumpcore.c:315(dump_core)
dumping core in /var/log/samba/cores/smbd
[2017/09/22 11:05:44.061157, 0] ../source3/lib/popt_common.c:67(popt_s3_talloc_log_fn)
Bad talloc magic value - wrong talloc version used/mixed
[2017/09/22 11:05:44.061224, 0] ../source3/lib/util.c:791(smb_panic_s3)
PANIC (pid 23229): Bad talloc magic value - wrong talloc version used/mixed
[2017/09/22 11:05:44.061545, 0] ../source3/lib/util.c:902(log_stack_trace)
BACKTRACE: 8 stack frames:
#0 /lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fd1088416ba]
#1 /lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fd108841790]
#2 /lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fd10a91c95f]
#3 /lib64/libtalloc.so.2(_talloc_get_type_abort+0x102) [0x7fd107679702]
#4 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3c67) [0x7fd106265c67]
#5 /usr/lib64/samba/libmessages-dgm-samba4.so(+0x3341) [0x7fd106265341]
#6 /lib64/libpthread.so.0(+0x7e25) [0x7fd10ad7be25]
#7 /lib64/libc.so.6(clone+0x6d) [0x7fd106f8d34d]
[2017/09/22 11:05:44.061655, 0] ../source3/lib/dumpcore.c:315(dump_core)
dumping core in /var/log/samba/cores/smbd
答案1
请参阅我的回答: CentOS 7.4/Samba 4.6.2 升级后 Windows PC 被要求输入密码吗?
解决方案是在 smb.conf 的全局部分中添加:
ntlm auth = yes
这可能与您的问题有关。NTLMv1 与 NTLMv2 之间存在问题,Samba 4.6.2 发行说明中提到了这一点。