Hello there,
I am running the latest samba version 4.18.5 on Ubuntu 22.04 with all OS
updates applied before compiling the thing.
The samba server runs for a while, several days sometimes even a couple
of weeks. All of a sudden clients have trouble connecting to some shares.
The strange thing is that a good number of clients can still connect and
seem to work all right while others can't.
After killing all samba processes and starting anew everything is back
to normal and all clients who just had trouble can connect again.
No errors in syslog that would point somewhere and the log.smbd file
shows the following.
------------------------
PANIC: assert failed at ../../source3/smbd/fd_handle.c(39): (fh->fd ==
-1) || (fh->fd == AT_FDCWD)
[2023/08/08 13:58:02.625780, 0] ../../lib/util/fault.c:173(smb_panic_log)
==============================================================[2023/08/08
13:58:02.625803, 0] ../../lib/util/fault.c:174(smb_panic_log)
INTERNAL ERROR: assert failed: (fh->fd == -1) || (fh->fd == AT_FDCWD)
in pid 3708663 (4.18.5)
[2023/08/08 13:58:02.625820, 0] ../../lib/util/fault.c:178(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
[2023/08/08 13:58:02.625837, 0] ../../lib/util/fault.c:183(smb_panic_log)
==============================================================[2023/08/08
13:58:02.625851, 0] ../../lib/util/fault.c:184(smb_panic_log)
PANIC (pid 3708663): assert failed: (fh->fd == -1) || (fh->fd ==
AT_FDCWD) in 4.18.5
[2023/08/08 13:58:02.627108, 0] ../../lib/util/fault.c:292(log_stack_trace)
BACKTRACE: 40 stack frames:
#0
/usr/local/bafs1-samba/lib/private/libgenrand-samba4.so(log_stack_trace+0x32)
[0x7f5407fa5caa]
#1
/usr/local/bafs1-samba/lib/private/libgenrand-samba4.so(smb_panic_log+0x1dd)
[0x7f5407fa5c27]
#2
/usr/local/bafs1-samba/lib/private/libgenrand-samba4.so(smb_panic+0x1c)
[0x7f5407fa5c46]
#3
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(+0x58c09)
[0x7f5408423c09]
#4 /usr/local/bafs1-samba/lib/private/libtalloc-samba4.so(+0x39d8)
[0x7f54083259d8]
#5 /usr/local/bafs1-samba/lib/private/libtalloc-samba4.so(+0x3d5a)
[0x7f5408325d5a]
#6
/usr/local/bafs1-samba/lib/private/libtalloc-samba4.so(_talloc_free+0x10c)
[0x7f5408327132]
#7
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(+0x6ebe7)
[0x7f5408439be7]
#8
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(file_free+0x5b)
[0x7f540843a120]
#9
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(vfs_default_durable_reconnect+0x1b51)
[0x7f5408503e1c]
#10
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(+0x68f25)
[0x7f5408433f25]
#11
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(smb_vfs_call_durable_reconnect+0x131)
[0x7f540848e84a]
#12
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(+0x104c79)
[0x7f54084cfc79]
#13
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(smbd_smb2_request_process_create+0x7a1)
[0x7f54084cd94b]
#14
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(smbd_smb2_request_dispatch+0x1688)
[0x7f54084be847]
#15
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(+0xf88d6)
[0x7f54084c38d6]
#16
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(+0xf8a0c)
[0x7f54084c3a0c]
#17
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(tevent_common_invoke_fd_handler+0x125)
[0x7f54081d1f4a]
#18 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x14605)
[0x7f54081dd605]
#19 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x14d15)
[0x7f54081ddd15]
#20 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x11372)
[0x7f54081da372]
#21
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(_tevent_loop_once+0x126)
[0x7f54081d09e0]
#22
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(tevent_common_loop_wait+0x29)
[0x7f54081d0d54]
#23 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x1141b)
[0x7f54081da41b]
#24
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(_tevent_loop_wait+0x2f)
[0x7f54081d0dfb]
#25
/usr/local/bafs1-samba/lib/private/libsmbd-base-samba4.so(smbd_process+0xd81)
[0x7f54084a3e7a]
#26 /usr/local/bafs1-samba/sbin/smbd(+0xa227) [0x56307b448227]
#27
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(tevent_common_invoke_fd_handler+0x125)
[0x7f54081d1f4a]
#28 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x14605)
[0x7f54081dd605]
#29 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x14d15)
[0x7f54081ddd15]
#30 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x11372)
[0x7f54081da372]
#31
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(_tevent_loop_once+0x126)
[0x7f54081d09e0]
#32
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(tevent_common_loop_wait+0x29)
[0x7f54081d0d54]
#33 /usr/local/bafs1-samba/lib/private/libtevent-samba4.so(+0x1141b)
[0x7f54081da41b]
#34
/usr/local/bafs1-samba/lib/private/libtevent-samba4.so(_tevent_loop_wait+0x2f)
[0x7f54081d0dfb]
#35 /usr/local/bafs1-samba/sbin/smbd(+0xafd7) [0x56307b448fd7]
#36 /usr/local/bafs1-samba/sbin/smbd(main+0x19b1) [0x56307b44b30a]
#37 /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f5407d68d90]
#38 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)
[0x7f5407d68e40]
#39 /usr/local/bafs1-samba/sbin/smbd(_start+0x25) [0x56307b444ba5]
-----------------
Any help is greatly apreciated
Best regards
Rob