Bug 282491 - net/samba419: ldbedit crashes when Samba is built against databases/ldb28
Summary: net/samba419: ldbedit crashes when Samba is built against databases/ldb28
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Samba Team
URL:
Keywords:
Depends on: 282760
Blocks:
  Show dependency treegraph
 
Reported: 2024-11-02 14:18 UTC by ml
Modified: 2024-11-14 15:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (samba)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ml 2024-11-02 14:18:29 UTC
On FreeBSD 14.1 (but I think this does not matter) with Samba 4.19, ldbedit crashes:
# ldbedit -H /var/db/samba4/private/sam.ldb
Abort trap (core dumped)

Stacktrace:
> (gdb) bt
> #0  thr_kill () at thr_kill.S:4
> #1  0x000000082516d404 in __raise (s=s@entry=6) at /usr/src/lib/libc/gen/raise.c:50
> #2  0x00000008252209d9 in abort () at /usr/src/lib/libc/stdlib/abort.c:64
> #3  0x0000000822bd4c45 in ?? () from /usr/local/lib/libtalloc.so.2
> #4  0x0000000822bd4b8a in _talloc_get_type_abort () from /usr/local/lib/libtalloc.so.2
> #5  0x0000000868bd7d70 in partition_metadata_open (module=0x13695b81da60, create=false) at ../../source4/dsdb/samdb/ldb_modules/partition_metadata.c:243
> #6  0x0000000868bd7978 in partition_metadata_init (module=0x13695b81da60) at ../../source4/dsdb/samdb/ldb_modules/partition_metadata.c:316
> #7  0x0000000868bd4889 in partition_reload_if_required (module=0x13695b81da60, data=0x13695b81dd80, parent=0x0) at ../../source4/dsdb/samdb/ldb_modules/partition_init.c:411
> #8  0x0000000868bd1d2a in partition_read_lock (module=0x13695b81da60) at ../../source4/dsdb/samdb/ldb_modules/partition.c:1492
> #9  0x000000082239be6a in ldb_next_read_lock () from /usr/local/lib/libldb.so.2
> #10 0x000000087510170a in schema_read_lock (module=0x13695b81f0e0) at ../../source4/dsdb/samdb/ldb_modules/schema_load.c:614
> #11 0x000000082239be6a in ldb_next_read_lock () from /usr/local/lib/libldb.so.2
> #12 0x0000000873425587 in samba_dsdb_init (module=0x13695b81d240) at ../../source4/dsdb/samdb/ldb_modules/samba_dsdb.c:483
> #13 0x000000082239b4ad in ldb_load_modules () from /usr/local/lib/libldb.so.2
> #14 0x0000000822397dbc in ldb_connect () from /usr/local/lib/libldb.so.2
> #15 0x00000008218a5a22 in ?? () from /usr/local/lib/ldb/libldb-cmdline.so
> #16 0x00000000002027b7 in ?? ()
> #17 0x0000000825141a6a in __libc_start1 (argc=5, argv=0x821159938, env=0x821159968, cleanup=<optimized out>, mainX=0x202740) at /usr/src/lib/libc/csu/libc_start1.c:157
> #18 0x00000000002026d0 in ?? ()


This can be worked around, by compiling Samba with "SAMBA4_BUNDLED_LDB=yes" (which of course can have some side effects).
Comment 1 ml 2024-11-02 14:20:16 UTC
BTW, I'm using 2024Q4, so:
# pkg info|grep ldb
ldb28-2.8.1                    LDAP-like embedded database
Comment 2 Mateusz Piotrowski freebsd_committer freebsd_triage 2024-11-04 14:59:12 UTC
Thanks for the report. I'm starting to think that perhaps databases/ldb28 is not ready to be used in place of the bundled ldb.