[Pkg-openldap-devel] Bug#860947: Bug#860947: slapd: Slapd fails to stop sometimes

Ryan Tandy ryan at nardis.ca
Sun Apr 23 19:21:11 UTC 2017


On Sun, Apr 23, 2017 at 09:34:00AM +0200, GALAMBOS Daniel wrote:
>Which I forgot to mention is that the slapd process uses one CPU core to
>100 percent when this happens.

Noted. But you don't observe that CPU usage during normal operation? I'm 
assuming this loop gets triggered when you ask slapd to shut down?

>We use Heimdal, so I installed cyrus-sasl2-dbg,cyrus-sasl2-heimdal-dbg
>(i didn't notice the missing symbols from the first stacktrace)

Thanks.

>Frame #1  (counting from zero):
>(gdb) info locals
>plugcount = 1
>pluglist = 0x7f326c4ca040 <plain_client_plugins>
>mech = 0x7f312413b950
>mp = 0x7f312412e090
>result = <optimized out>
>version = 4
>lupe = 0
>
>Which seems weird as we use GSSAPI. But I'm not familiar with the sasl
>and slapd source, so it may be okay.

I'm not really familiar with the cyrus-sasl code either, but it looks 
like it might just be scanning/loading all the available plugins, and 
you happened to stop it at this point.

>#4  0x00007f3271b297b1 in sasl_client_init (callbacks=callbacks at entry=0x0) at ../../lib/client.c:311
>        ret = <optimized out>
>        ep_list = {{entryname = 0x7f3271b36bbd "sasl_client_plug_init", add_plugin = 0x7f3271b28e80 <sasl_client_add_plugin>}, {entryname = 0x7f3271b36bd3 "sasl_canonuser_init",
>            add_plugin = 0x7f3271b27590 <sasl_canonuser_add_plugin>}, {entryname = 0x0, add_plugin = 0x0}}
>#5  0x00007f327279fb3c in ldap_int_sasl_init () at cyrus.c:98
>        sasl_initialized = 1
>        sasl_initialized = 1

This looks strange to me. ldap_int_sasl_init sets sasl_initialized to 1 
_after_ sasl_client_init returns, and shouldn't call it again after 
that. So I have to wonder whether this somehow got called from multiple 
threads... That also suggests to me that this particular thread might be 
getting stuck inside sasl_client_init, maybe.

What does your config look like on this server? Do you perhaps have 
multiple syncrepl clients all using GSSAPI?

If you can catch slapd during this loop again, maybe you could capture 
multiple stack traces? It would be really good if we could identify 
which stack frame contains the loop - especially whether it's in slapd 
or in cyrus-sasl.



More information about the Pkg-openldap-devel mailing list