Hi I noticed the Samba (ver 2:4.13.13+dfsg-1~deb11u5) in my machine running OMV 6.8.0-1 (Shaitan) will segfault whenever I tried to move or copy a file from an EXT4 partition (mapped to a Windows network drive to Z:) to an BTRFS partition (mapped as Windows network drive Y:).
The panic error from the syslog is:
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.940638, 0] ../../lib/util/fault.c:159(smb_panic_log)
Sep 16 18:37:41 misato smbd[48795]: ===============================================================
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.942504, 0] ../../lib/util/fault.c:160(smb_panic_log)
Sep 16 18:37:41 misato smbd[48795]: INTERNAL ERROR: Signal 11: Segmentation fault in pid 48795 (4.13.13-Debian)
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.942568, 0] ../../lib/util/fault.c:164(smb_panic_log)
Sep 16 18:37:41 misato smbd[48795]: 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
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.942644, 0] ../../lib/util/fault.c:169(smb_panic_log)
Sep 16 18:37:41 misato smbd[48795]: ===============================================================
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.942678, 0] ../../lib/util/fault.c:170(smb_panic_log)
Sep 16 18:37:41 misato smbd[48795]: PANIC (pid 48795): Signal 11: Segmentation fault in 4.13.13-Debian
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.960135, 0] ../../lib/util/fault.c:274(log_stack_trace)
Sep 16 18:37:41 misato smbd[48795]: BACKTRACE: 28 stack frames:
Sep 16 18:37:41 misato smbd[48795]: #0 /lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x30) [0x7f7ecb76a220]
Sep 16 18:37:41 misato smbd[48795]: #1 /lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x26) [0x7f7ecb76a486]
Sep 16 18:37:41 misato smbd[48795]: #2 /lib/x86_64-linux-gnu/libsamba-util.so.0(+0x186a1) [0x7f7ecb76a6a1]
Sep 16 18:37:41 misato smbd[48795]: #3 /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140) [0x7f7ecb015140]
Sep 16 18:37:41 misato smbd[48795]: #4 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(vfs_offload_token_db_fetch_fsp+0x35) [0x7f7ecb53cd65]
Sep 16 18:37:41 misato smbd[48795]: #5 /usr/lib/x86_64-linux-gnu/samba/vfs/btrfs.so(+0x3155) [0x7f7ec65d5155]
Sep 16 18:37:41 misato smbd[48795]: #6 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x1f662c) [0x7f7ecb5f662c]
Sep 16 18:37:41 misato smbd[48795]: #7 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smb2_ioctl_network_fs+0x802) [0x7f7ecb5f70b2]
Sep 16 18:37:41 misato smbd[48795]: #8 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_process_ioctl+0x623) [0x7f7ecb5f4233]
Sep 16 18:37:41 misato smbd[48795]: #9 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch+0xe4c) [0x7f7ecb5e4c6c]
Sep 16 18:37:41 misato smbd[48795]: #10 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x1e5847) [0x7f7ecb5e5847]
Sep 16 18:37:41 misato smbd[48795]: #11 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x7d) [0x7f7ecb03170d]
Sep 16 18:37:41 misato smbd[48795]: #12 /lib/x86_64-linux-gnu/libtevent.so.0(+0xda77) [0x7f7ecb037a77]
Sep 16 18:37:41 misato smbd[48795]: #13 /lib/x86_64-linux-gnu/libtevent.so.0(+0xbc07) [0x7f7ecb035c07]
Sep 16 18:37:41 misato smbd[48795]: #14 /lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x94) [0x7f7ecb030df4]
Sep 16 18:37:41 misato smbd[48795]: #15 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f7ecb03109b]
Sep 16 18:37:41 misato smbd[48795]: #16 /lib/x86_64-linux-gnu/libtevent.so.0(+0xbba7) [0x7f7ecb035ba7]
Sep 16 18:37:41 misato smbd[48795]: #17 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x828) [0x7f7ecb5d38f8]
Sep 16 18:37:41 misato smbd[48795]: #18 /usr/sbin/smbd(+0xe715) [0x55beceb18715]
Sep 16 18:37:41 misato smbd[48795]: #19 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x7d) [0x7f7ecb03170d]
Sep 16 18:37:41 misato smbd[48795]: #20 /lib/x86_64-linux-gnu/libtevent.so.0(+0xda77) [0x7f7ecb037a77]
Sep 16 18:37:41 misato smbd[48795]: #21 /lib/x86_64-linux-gnu/libtevent.so.0(+0xbc07) [0x7f7ecb035c07]
Sep 16 18:37:41 misato smbd[48795]: #22 /lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x94) [0x7f7ecb030df4]
Sep 16 18:37:41 misato smbd[48795]: #23 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f7ecb03109b]
Sep 16 18:37:41 misato smbd[48795]: #24 /lib/x86_64-linux-gnu/libtevent.so.0(+0xbba7) [0x7f7ecb035ba7]
Sep 16 18:37:41 misato smbd[48795]: #25 /usr/sbin/smbd(main+0x1ddf) [0x55beceb12d1f]
Sep 16 18:37:41 misato smbd[48795]: #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f7ecae4dd0a]
Sep 16 18:37:41 misato smbd[48795]: #27 /usr/sbin/smbd(_start+0x2a) [0x55beceb12eba]
Sep 16 18:37:41 misato smbd[48795]: [2023/09/16 18:37:41.960627, 0] ../../source3/lib/util.c:838(smb_panic_s3)
Sep 16 18:37:41 misato smbd[48795]: smb_panic(): calling panic action [/usr/share/samba/panic-action 48795]
Sep 16 18:37:42 misato smbd[48795]: [2023/09/16 18:37:42.019699, 0] ../../source3/lib/util.c:845(smb_panic_s3)
Sep 16 18:37:42 misato smbd[48795]: smb_panic(): action returned status 0
Sep 16 18:37:42 misato smbd[48795]: [2023/09/16 18:37:42.019952, 0] ../../source3/lib/dumpcore.c:315(dump_core)
Sep 16 18:37:42 misato smbd[48795]: dumping core in /var/log/samba/cores/smbd
Sep 16 18:37:42 misato smbd[48795]:
Alles anzeigen
The panic will be resolved if I remove the `shadow:` option entries and `shadow_copy2` from the `/etc/samba/smb.conf, like the one below.
[NAS2]
path = /srv/dev-disk-by-uuid-SOME-UUID/Data/
guest ok = no
guest only = no
read only = no
browseable = yes
inherit acls = no
inherit permissions = no
ea support = no
store dos attributes = no
shadow:mountpoint = /srv/dev-disk-by-uuid-SOME-UUID/
shadow:snapdir = /srv/dev-disk-by-uuid-SOME-UUID/.snapshots/
shadow:basedir = /srv/dev-disk-by-uuid-SOME-UUID/Data/
shadow:sort = desc
shadow:format = _%Y%m%dT%H%M%S
shadow:delimiter = _
shadow:snapprefix = ^NAS2\(@hourly\)\{0,1\}\(@daily\)\{0,1\}\(@weekly\)\{0,1\}\(@monthly\)\{0,1\}\(@yearly\)\{0,1\}$
shadow:localtime = no
dfree command = /usr/sbin/omv-btrfs-dfree
dfree cache time = 30
vfs objects = btrfs shadow_copy2
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users =
invalid users =
read list =
write list =
Alles anzeigen
I am not quite sure if it is an Samba bug or its library is just a bit old and have compatibility issue with the btrfs driver the kernel use. I was considering updating the Samba and see if it can be resolved but it looks like I will ruin my apt package dependency if I do so. Samba will not panic if I just move/copy file within the btrfs partition. It also doesn't panic if I copy/move file from my Windows workstation to the btrfs partition. It seems only an problem if the copy is from a samba managed non-btrfs partition (in my case, an EXT4 partition) to a btrfs partition. Shall I create an issue in the github issue tracker?
The "deleting shadow copy from /etc/samba/smb.conf" is also not very convenient. As the file will be rewritten by omv engine when a configuration is changed. Could we have an option in the OMV's web UI to set the shadow_copy2 to off? For me, Samba snapshot and shadow_copy is completely useless and it would be great if there is an option in the setup to disable it.