Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#40610 - [ldb] [samba] Samba ldbsearch core dump

Attached to Project: Arch Linux
Opened by Matt Daubenspeck (mellofone) - Friday, 30 May 2014, 15:57 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 10 March 2015, 20:09 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Description: Following Samba's wiki to setup an Active Directory server with Samba4, there is a command to search the SAM database and it core dumps

# ldbsearch --modules-path=/usr/lib/samba/ldb/ -H /var/lib/samba/private/sam.ldb '(invocationid=*)' --cross-ncs objectguid
Aborted (core dumped)

The ldbsearch command runs fine by itself, but it won't properly pick up the proper module without --modules-path included, and doing so core dumps.

Additional info:
* package version(s):

* config and/or log files etc.
Running the command with strace log file is attached. I couldn't figure out how to run it in gdb with all of the proper ldbsearch switches, but I can certainly do so if someone knows how.

Steps to reproduce:
   samba-error (109.5 KiB)
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Tuesday, 10 March 2015, 20:09 GMT
Reason for closing:  Fixed
Comment by Matt Daubenspeck (mellofone) - Wednesday, 11 June 2014, 14:51 GMT
The upgrade to samba 4.1.8-1 made no difference.
Comment by Tobias Powalowski (tpowa) - Monday, 16 June 2014, 08:01 GMT
Pleas report this upstream.
Comment by Matt Daubenspeck (mellofone) - Thursday, 04 September 2014, 18:12 GMT
I opened a bug with Samba and their first suggestion was to compile from source and test, which was successful, however, that includs building ldb* from the included source. I still get core dumps when using ldbsearch with the ldb package. If I edit the samba4 PKDBUILD and remove ldb and tdb from makedepends, then change the bundled-libraries configure option to build ldb and tdb from the samba source, makepkg and install, everything seems to work as it should.
Comment by DJ Lucas (DJ_Lucas) - Friday, 26 December 2014, 06:01 GMT
I suspect that this is related to ldb/tdb/samba version mismatch. After updating ldb the other day, smbd was dumping with a similar error message regarding dsdb. I would have reported that as a bug, but figured it was self inflicted as I was messing with the DLZ module and built 4.1.14-1 before you had it packaged. The original report was likely a similar ldb mismatch. Matt, what is your current status? Also, any particular reason not to have used the Arch wiki article on this? If there is anything I can do to correct, or otherwise improve in it, I'm all ears.
Comment by Matt Daubenspeck (mellofone) - Friday, 06 March 2015, 16:27 GMT
Sorry for the delay. I did use the Arch wiki, which sets up the actual initial AD DC properly. However, when I went to add an additional Samba server as an AD Member to the domain, that's when the errors came with ldbsearch. Samba's wiki to do so is here:

I see none of that information is in their wiki anymore, as I think some of the manual steps that USED to be required are fixed now. However, any time I try to use ldbsearch/ldbedit, that's when the core dumps happened.

I have not tried redoing everything from scratch starting with the newest Samba 4.2 packages, but creating my own 4.1.x PKGBUILD's making the above listed changes made everything work as expected.
Comment by DJ Lucas (DJ_Lucas) - Friday, 06 March 2015, 23:34 GMT
Hey, thanks for the response. I'm thinking this one is probably fixed just by age...just a matter of the various samba maintainers working closely together (talloc, tdb, ldb, etc.) as I haven't seen the issue since 4.1.14 IIRC, but I haven't upgraded to 4.2.0 yet due to complications with other packages (not in Arch).
Comment by Matt Daubenspeck (mellofone) - Tuesday, 10 March 2015, 19:33 GMT
This is INDEED the case. I just rolled a quick and dirty VM to create a new Samba 4.2 AD setup and everything worked perfectly. The above ldbsearch command now completes normally. Great! I'll request that this bug be closed.