[Date Prev][Date Next] [Chronological] [Thread] [Top]

OpenLDAP 1.2.x -- what if ldap_pvt_thread_create fails?

I've been working on a problem where ldap_pvt_thread_create failed in
connection.c, and subsequently slapd crashed, leaving the data file in
a less than healthy state.  While I'm able to recover the data files,
I noted several "ldap_pvt_thread_create failed (1)" messages in the
syslog just before the crash.

This brings a couple of questions:

If ldap_pvt_thread_create fails, this would seem to be benign.  Is there any
reason to believe that, as it is currently written, this could lead to some
events that would cause slapd to crash?

Secondly, what are the correct actions to take if ldap_pvt_thread_create
fails to create a thread to service the new connection?  Is this right?

	ldap_pvt_thread_mutex_lock( &active_threads_mutex );
	ldap_pvt_thread_mutex_unlock( &active_threads_mutex );
	close_connection( conn, conn->c_connid, -1 );

Is there anything else needed to properly close down the connection at
that point?