ldb 1.3.2 fails some tests

Timur I. Bakeyev timur at freebsd.org
Sun Mar 4 15:43:36 UTC 2018


On 4 March 2018 at 08:15, Andrew Bartlett <abartlet at samba.org> wrote:

> On Sun, 2018-03-04 at 06:32 +0100, Timur I. Bakeyev wrote:
> >
> > So, array of attributes schemas gets two definitions for "cn" attribute
> with different handlers. I'm not sure, if this is a correct behavior at all,
> > but current code allows such an addition through the
> ltdb_attributes_load()->ldb_schema_attribute_fill_with_syntax() sequence,
> while
> > doing proper definition replacement in the ldb_schema_attribute_add_with_
> syntax().
>
> The from-DB load tries to avoid the attribute load becoming O(n^2) by
> not calling the 'check if it already exists' case, so that much is
> deliberate.
>
> How it gets declared twice is the next thing to work out.
>

This is exposed by the test, so conditions are a bit artificial. If that
would help - here is the call stack:

#0  ltdb_attributes_load (module=0x614390) at ../ldb_tdb/ldb_cache.c:227
#1  0x00007ffff5740ded in ltdb_cache_load (module=0x614390) at
../ldb_tdb/ldb_cache.c:488
#2  0x00007ffff5740acf in ltdb_cache_reload (module=0x614390) at
../ldb_tdb/ldb_cache.c:374
#3  0x00007ffff573fde2 in ltdb_reindex (module=0x614390) at
../ldb_tdb/ldb_index.c:2621
#4  0x00007ffff57368c1 in ltdb_modified (module=0x614390, dn=0x6154c0) at
../ldb_tdb/ldb_tdb.c:396
#5  0x00007ffff5736f4a in ltdb_add_internal (module=0x614390,
ltdb=0x614120, msg=0x6153b0, check_single_value=true) at
../ldb_tdb/ldb_tdb.c:605
#6  0x00007ffff573700d in ltdb_add (ctx=0x615760) at
../ldb_tdb/ldb_tdb.c:632
#7  0x00007ffff57390e8 in ltdb_callback (ev=0x614fd0, te=0x615820, t=...,
private_data=0x615760) at ../ldb_tdb/ldb_tdb.c:1693
#8  0x00007ffff735bb3c in tevent_common_loop_timer_delay (ev=0x614fd0) at
../lib/tevent/tevent_timed.c:369
#9  0x00007ffff735de41 in epoll_event_loop_once (ev=0x614fd0,
location=0x7ffff77ae72d "../common/ldb.c:639") at
../lib/tevent/tevent_epoll.c:915
#10 0x00007ffff735abca in std_event_loop_once (ev=0x614fd0,
location=0x7ffff77ae72d "../common/ldb.c:639") at
../lib/tevent/tevent_standard.c:114
#11 0x00007ffff7354500 in _tevent_loop_once (ev=0x614fd0,
location=0x7ffff77ae72d "../common/ldb.c:639") at ../lib/tevent/tevent.c:725
#12 0x00007ffff77a52cb in ldb_wait (handle=0x614f30, type=LDB_WAIT_ALL) at
../common/ldb.c:639
#13 0x00007ffff77a50df in ldb_autotransaction_request (ldb=0x613a00,
req=0x614e60) at ../common/ldb.c:577
#14 0x00007ffff77a7cd8 in ldb_add (ldb=0x613a00, message=0x6145e0) at
../common/ldb.c:1807
#15 0x00000000004095dc in ldb_unique_index_test_setup (state=0x60f020) at
../tests/ldb_mod_op_test.c:3066
#16 0x00007ffff79bb08f in cmocka_run_one_test_or_fixture
(function_name=0x40d078 "test_ldb_unique_index_duplicate_logging",
test_func=0x0,
    setup_func=0x4094fd <ldb_unique_index_test_setup>, teardown_func=0x0,
state=0x60f020, heap_check_point=0x7ffff7bbed20 <global_allocated_blocks>)
    at ../third_party/cmocka/cmocka.c:2621
#17 0x00007ffff79bb269 in cmocka_run_one_tests (test_state=0x60f010) at
../third_party/cmocka/cmocka.c:2706
#18 0x00007ffff79bb6d4 in _cmocka_run_group_tests (group_name=0x40d0ca
"tests", tests=0x7fffffffe4b0, num_tests=2, group_setup=0x0,
group_teardown=0x0)
    at ../third_party/cmocka/cmocka.c:2839
#19 0x000000000040b2db in main (argc=1, argv=0x7fffffffe5e8) at
../tests/ldb_mod_op_test.c:3766

With regards,
Timur.


More information about the samba-technical mailing list