ZFS , Samba , 0x8007003B

After looking into this for a while I wanted to help people stumblink on, this issue.

When you add a share on your zfs pool by using :

zfs create -o mountpoint=/storage33 -o sharesmb=on MarksV/storage33

Then:
chmod +777 /storage33

Users will be able to map the drive. Things look to be working fine at this point but whne your drives are fast enough, and you start doing transaction intensive things your stransfers will stop and on windows you will get : 0x8007003B error.

When looking in your /var/log/samba logs you will see:

[2019/07/04 17:55:46.996683,  0] ../../source3/param/loadparm.c:3362(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/markv_storage6 failed. Permission denied

And for the moments when you get the transfer errors you’ll see samba crashes:


[2019/07/04 17:55:46.997696,  0] ../../lib/util/fault.c:79(fault_report)
  ===============================================================
[2019/07/04 17:55:46.997744,  0] ../../lib/util/fault.c:80(fault_report)
  INTERNAL ERROR: Signal 11 in pid 30685 (4.10.0-Ubuntu)
  Please read the Trouble-Shooting section of the Samba HOWTO
[2019/07/04 17:55:46.997783,  0] ../../lib/util/fault.c:82(fault_report)
  ===============================================================
[2019/07/04 17:55:46.997809,  0] ../../source3/lib/util.c:824(smb_panic_s3)
  PANIC (pid 30685): internal error
[2019/07/04 17:55:46.999399,  0] ../../lib/util/fault.c:261(log_stack_trace)
  BACKTRACE: 32 stack frames:
   #0 /lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x30) [0x7fb64c15c490]
   #1 /lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x18) [0x7fb64c0da378]
   #2 /lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2d) [0x7fb64c15c57d]
   #3 /lib/x86_64-linux-gnu/libsamba-util.so.0(+0x167dd) [0x7fb64c15c7dd]
   #4 /lib/x86_64-linux-gnu/libpthread.so.0(+0x13f40) [0x7fb64b9b2f40]
   #5 /lib/x86_64-linux-gnu/libc.so.6(+0x1860a1) [0x7fb64b9160a1]
   #6 /lib/x86_64-linux-gnu/libsamba-util.so.0(push_ucs2_talloc+0x1e) [0x7fb64c1542de]
   #7 /usr/lib/x86_64-linux-gnu/samba/libcliauth.so.0(E_md4hash+0x32) [0x7fb64bd71152]
   #8 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(create_volume_objectid+0x3a) [0x7fb64c2d4c0a]
   #9 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0xb30e0) [0x7fb64c27e0e0]
   #10 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smb2_ioctl_filesys+0x4ec) [0x7fb64c32d57c]
   #11 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_process_ioctl+0x5a0) [0x7fb64c32c9d0]
   #12 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch+0xcb1) [0x7fb64c31e111]
   #13 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch_immediate+0x4c) [0x7fb64c31e79c]
   #14 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_immediate_handler+0x139) [0x7fb64b981709]
   #15 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_immediate+0x23) [0x7fb64b981733]
   #16 /lib/x86_64-linux-gnu/libtevent.so.0(+0xc44b) [0x7fb64b98744b]
   #17 /lib/x86_64-linux-gnu/libtevent.so.0(+0xa6c7) [0x7fb64b9856c7]
   #18 /lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x91) [0x7fb64b9809f1]
   #19 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7fb64b980c7b]
   #20 /lib/x86_64-linux-gnu/libtevent.so.0(+0xa667) [0x7fb64b985667]
   #21 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x76f) [0x7fb64c30e1af]
   #22 /usr/sbin/smbd(+0xd3c0) [0x56417201e3c0]
   #23 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x7f) [0x7fb64b9812cf]
   #24 /lib/x86_64-linux-gnu/libtevent.so.0(+0xc65f) [0x7fb64b98765f]
   #25 /lib/x86_64-linux-gnu/libtevent.so.0(+0xa6c7) [0x7fb64b9856c7]
   #26 /lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x91) [0x7fb64b9809f1]
   #27 /lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7fb64b980c7b]
   #28 /lib/x86_64-linux-gnu/libtevent.so.0(+0xa667) [0x7fb64b985667]
   #29 /usr/sbin/smbd(main+0x1be6) [0x564172019bf6]
   #30 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fb64b7b6b6b]
   #31 /usr/sbin/smbd(_start+0x2a) [0x564172019eca]
[2019/07/04 17:55:46.999594,  0] ../../source3/lib/util.c:836(smb_panic_s3)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 30685]
[2019/07/04 17:55:47.001483,  0] ../../source3/lib/util.c:844(smb_panic_s3)
  smb_panic(): action returned status 0
[2019/07/04 17:55:47.001532,  0] ../../source3/lib/dumpcore.c:318(dump_core)
  coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern[2019/07/04 17:55:47.276399,  0] ../../source3/param/loadparm.c:3362(process_usershare_file)

The solution for me , after messing with permissions for a while, was to add the users that are goiong to be using the shares to the group :

sambashare

which is usually reserved for on system user shares that are now aparenly used by zfs to do it’s samba magic.

sudo usermod -a -G sambashare someone

Is this classified a specific ubuntu server issue? A specific samba issue? A zfs issue?
I’m adding it here in the hopes other people who are in the same board end up here.

Restart samba afterwards.

Regards.
A

Stumbling… The same boat… Why can’t I edit this…

Hi,

Better documentation belongs on the Ubuntu Wiki.
Workarounds to a Samba bug belong on that particular bug report.

Thank you.