[Samba] samba 4.5.1 tdb panic with ZFS

Andrew Bartlett abartlet at samba.org
Tue Dec 6 19:12:33 UTC 2016


On Tue, 2016-12-06 at 14:48 +0000, Brian Candler via samba wrote:
> I am trying to install samba 4.5.1 from source, as a domain
> controller 
> only, under Ubuntu 16.04, with ZFS filesystem (actually inside an
> lxd 
> container with ZFS backing).

Sadly while Samba contains all the moving parts required (like the ZFS
ACL module, backing Samba onto NFSv4 ACLs), we haven't had an skilled
and enthusiastic (for ZFS) python developer who can implement the < 100
lines or so required, and then the (larger) set of tests. 

Sorry,

Andrew Bartlett

> Out-of-the-box, samba-tool domain provision does not like the
> filesystem:
> 
> ERROR(<class 'samba.provision.ProvisioningError'>): Provision failed
>> ProvisioningError: Your filesystem or build does not support posix
> ACLs, 
> which s3fs requires.  Try the mounting the filesystem with the 'acl'
> option.
> 
> It seems that s3fs requires POSIX ACLs, and ZFS supports NFSv4 ACLs
> by 
> default.  Some people recommend using "--use-ntvfs" but that is 
> deprecated and indeed removed from samba 4.5.
> 
> I found a page which said to set some zfs attributes: 
> https://morph027.gitlab.io/post/zfs-on-linux-and-samba4-acl/
> 
> root at proxmox:~# zfs set acltype=posixacl 
> vms/subvol-107-disk-1root at proxmox:~# zfs set aclinherit=passthrough 
> vms/subvol-107-disk-1 So I set those on my container, but I now get
>> different error:
> 
> root at wrn-dc1:~# samba-tool domain provision --server-role=dc 
> --use-rfc2307 --dns-backend=SAMBA_INTERNAL --realm=AD.EXAMPLE.NET 
> --domain=AD
> Administrator password will be set randomly!
> You are not root or your system do not support xattr, using tdb
> backend 
> for attributes.
> not using extended attributes to store ACLs and other metadata. If
> you 
> intend to use this provision in production, rerun the script as root
> on 
> a system supporting xattrs.
> Looking up IPv4 addresses
> Looking up IPv6 addresses
> No IPv6 address will be assigned
> Setting up secrets.ldb
> Setting up the registry
> Setting up the privileges database
> Setting up idmap db
> Setting up SAM db
> Setting up sam.ldb partitions and settings
> Setting up sam.ldb rootDSE
> Pre-loading the Samba 4 and AD schema
> Adding DomainDN: DC=ad,DC=example,DC=net
> Adding configuration container
> Setting up sam.ldb schema
> Setting up sam.ldb configuration data
> Setting up display specifiers
> Modifying display specifiers
> Adding users container
> Modifying users container
> Adding computers container
> Modifying computers container
> Setting up sam.ldb data
> Setting up well known security principals
> Setting up sam.ldb users and groups
> Setting up self join
> xattr_tdb_removexattr() failed to get vfs_handle->data!
> Security context active token stack underflow!
> PANIC (pid 23231): Security context active token stack underflow!
> BACKTRACE: 46 stack frames:
>   #0 /usr/local/samba/lib/libsmbconf.so.0(log_stack_trace+0x1f) 
> [0x7f7904837ca6]
>   #1 /usr/local/samba/lib/libsmbconf.so.0(smb_panic_s3+0x6d) 
> [0x7f7904837af7]
>   #2 /usr/local/samba/lib/libsamba-util.so.0(smb_panic+0x28) 
> [0x7f791747174b]
>   #3 
> /usr/local/samba/lib/private/libsmbd-base-
> samba4.so(sec_ctx_active_token+0x94) 
> [0x7f7900b5d639]
>   #4 
> /usr/local/samba/lib/private/libsmbd-base-
> samba4.so(get_current_nttok+0x2e) 
> [0x7f7900b43f20]
>   #5 /usr/local/samba/lib/private/libsmbd-base-
> samba4.so(try_chown+0x78) 
> [0x7f7900b6fd88]
>   #6 
> /usr/local/samba/lib/private/libsmbd-base-
> samba4.so(set_nt_acl+0x3a9) 
> [0x7f7900b7023c]
>   #7 /usr/local/samba/lib/private/libsmbd-base-samba4.so(+0x280180) 
> [0x7f7900c8c180]
>   #8 
> /usr/local/samba/lib/private/libsmbd-base-
> samba4.so(smb_vfs_call_fset_nt_acl+0x58) 
> [0x7f7900b63903]
>   #9 /usr/local/samba/lib/vfs/acl_xattr.so(+0x4ee1) [0x7f78f243aee1]
>   #10 /usr/local/samba/lib/vfs/acl_xattr.so(+0x576e) [0x7f78f243b76e]
>   #11 
> /usr/local/samba/lib/private/libsmbd-base-
> samba4.so(smb_vfs_call_fset_nt_acl+0x58) 
> [0x7f7900b63903]
>   #12 
> /usr/local/samba/lib/python2.7/site-
> packages/samba/samba3/smbd.so(+0x20e4) 
> [0x7f7900fe40e4]
>   #13 
> /usr/local/samba/lib/python2.7/site-
> packages/samba/samba3/smbd.so(+0x2f7f) 
> [0x7f7900fe4f7f]
>   #14 python(PyEval_EvalFrameEx+0x6da2) [0x4cada2]
>   #15 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #16 python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
>   #17 python(PyEval_EvalFrameEx+0x5d8f) [0x4c9d8f]
>   #18 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #19 python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
>   #20 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #21 python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
>   #22 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #23 python() [0x4de8b8]
>   #24 python(PyObject_Call+0x43) [0x4b0cb3]
>   #25 python(PyEval_EvalFrameEx+0x2ad1) [0x4c6ad1]
>   #26 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #27 python() [0x4de6fe]
>   #28 python(PyObject_Call+0x43) [0x4b0cb3]
>   #29 python(PyEval_EvalFrameEx+0x2ad1) [0x4c6ad1]
>   #30 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #31 python() [0x4de6fe]
>   #32 python(PyObject_Call+0x43) [0x4b0cb3]
>   #33 python(PyEval_EvalFrameEx+0x2ad1) [0x4c6ad1]
>   #34 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #35 python() [0x4de6fe]
>   #36 python(PyObject_Call+0x43) [0x4b0cb3]
>   #37 python(PyEval_EvalFrameEx+0x2ad1) [0x4c6ad1]
>   #38 python(PyEval_EvalCodeEx+0x255) [0x4c2765]
>   #39 python(PyEval_EvalCode+0x19) [0x4c2509]
>   #40 python() [0x4f1def]
>   #41 python(PyRun_FileExFlags+0x82) [0x4ec652]
>   #42 python(PyRun_SimpleFileExFlags+0x191) [0x4eae31]
>   #43 python(Py_Main+0x68a) [0x49e14a]
>   #44 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) 
> [0x7f79189f4830]
>   #45 python(_start+0x29) [0x49d9d9]
> Can not dump core: corepath not set up
> 
> Does anyone else have samba 4.5 running with ZFS and if so how? 
> Otherwise I guess I need to rebuild this platform with a different 
> filesystem...
> 
> Thanks,
> 
> Brian.
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba mailing list