Created attachment 18304 [details] gdb backtrace While setting up a samba DC with bind_dlz i noticed named segfaulting in heim_get_debug_dest() when loading dlz_bind9_18.so. The behaviour is reproducible down to Alpine v3.17 (samba-4.16). In Alpine v.3.16 (samba-4.15) it works. Doesn't matter if DC is provisioned or not. It also works with recent version of samba in Gentoo Linux and glibc. So this issue is probably related to musl libc. Steps to reproduce: install alpine (tested VM and LXC) apk add samba-dc apk add bind enable dlopen in named.conf: dlz "AD DNS Zone" { database "dlopen /usr/lib/samba/bind9/dlz_bind9_18.so"; }; start named
Created attachment 18305 [details] valgrind output
Thanks for the valgrind and gdb info. Are those the Samba 4.19.6 / bind 9.18 combination? looks different to https://bugzilla.samba.org/show_bug.cgi?id=15643.
(In reply to Douglas Bagnall from comment #2) yes, i've tested the following combinations: Alpine/named/samba/result 3.16/9.16.48/4.15.13/works 3.17/9.18.24/4.16.11/fails 3.18/9.18.24/4.18.9/fails 3.19/9.18.24/4.18.9/fails 3.20/9.18.27/4.19.6/fails There were major changes in heimdal tree in transition from 4.15 to 4.16 (also tree moved to third_party). Building apk for samba-4.20.1 with abuild failed at first try (NameError: name 'MODE_755' is not defined), but this is another issue i guess.
building bind against heimdal instead of MIT krb5 solves this issue