Hi,
the attached patch (hopefully) fixes
https://fedorahosted.org/sssd/ticket/2810
(gdb) bt
#0 0x00007f9e8dde21d7 in ipa_get_ad_acct_send (ar=0x7f9e9cc2ff80, override_attrs=0x0,
be_req=<optimized out>, ipa_ctx=<optimized out>, ev=0x7f9e9cbf0670,
mem_ctx=<optimized out>)
at src/providers/ipa/ipa_subdomains_id.c:648
#1 ipa_srv_ad_acct_lookup_step (req=req@entry=0x7f9e9cc81860) at
src/providers/ipa/ipa_subdomains_id.c:1426
#2 0x00007f9e8dde2fbd in ipa_srv_ad_acct_send (ar=<optimized out>,
override_attrs=<optimized out>, be_req=0x7f9e9ec9c400, ipa_ctx=0x7f9e9cc1c300,
ev=0x7f9e9cbf0670, mem_ctx=<optimized out>)
at src/providers/ipa/ipa_subdomains_id.c:1406
#3 ipa_subdomain_account_get_original_step (req=req@entry=0x7f9e9cc69c60,
ar=<optimized out>) at src/providers/ipa/ipa_subdomains_id.c:277
#4 0x00007f9e8dde35d1 in ipa_subdomain_account_got_override (subreq=0x0) at
src/providers/ipa/ipa_subdomains_id.c:254
#5 0x00007f9e8dde9f9a in ipa_get_ad_override_done (subreq=0x0) at
src/providers/ipa/ipa_views.c:414
#6 0x00007f9e8d4f49b5 in generic_ext_search_handler (subreq=0x0, opts=<optimized
out>) at src/providers/ldap/sdap_async.c:1662
#7 0x00007f9e8d4f6592 in sdap_get_generic_op_finished (op=<optimized out>,
reply=<optimized out>, error=<optimized out>, pvt=<optimized out>) at
src/providers/ldap/sdap_async.c:1546
#8 0x00007f9e8d4f599d in sdap_process_message (ev=<optimized out>, sh=<optimized
out>, msg=0x7f9e9dc833e0) at src/providers/ldap/sdap_async.c:352
#9 sdap_process_result (ev=<optimized out>, pvt=<optimized out>) at
src/providers/ldap/sdap_async.c:196
#10 0x00007f9e9825e30b in epoll_event_loop_once () from /lib64/libtevent.so.0
#11 0x00007f9e9825c7d7 in std_event_loop_once () from /lib64/libtevent.so.0
#12 0x00007f9e98258fbd in _tevent_loop_once () from /lib64/libtevent.so.0
#13 0x00007f9e9825915b in tevent_common_loop_wait () from /lib64/libtevent.so.0
#14 0x00007f9e9825c777 in std_event_loop_wait () from /lib64/libtevent.so.0
#15 0x00007f9e9bb92853 in server_loop (main_ctx=0x7f9e9cbf1ac0) at src/util/server.c:668
#16 0x00007f9e9c407d52 in main (argc=8, argv=<optimized out>) at
src/providers/data_provider_be.c:3005
(gdb) p clist
$1 = (struct sdap_id_conn_ctx **) 0x7f9e9dc89ba0
(gdb) p clist[0]
$2 = (struct sdap_id_conn_ctx *) 0x7f9e9cc72ee0
(gdb) p clist[1]
$3 = (struct sdap_id_conn_ctx *) 0x0
(gdb)
I don't have a good idea how to reproduce except simulate the failure in
gdb, sorry... at least I verified that after setting the context to NULL:
(gdb) set clist[1] = 0
the request runs to completion and SSSD doesn't crash anymore. So I think
we should just add a check..
I tried to set the AD server offline and do some lookups, but the context
was always initialized for me..