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

Re: OpenLDAP 1.2.x -- what if ldap_pvt_thread_create fails?

At 08:26 AM 7/23/00 -0500, Randy Kunkee wrote:
>This brings a couple of questions:
>If ldap_pvt_thread_create fails, this would seem to be benign.

Resource exhaustion is not 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?

Yes.  In general, if not handled properly, there is every reason to
believe that a resource exhaustion will result in a crash.

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

Shutdown cleanly if at all possible.

>Is this right?

Likely insufficient and, given 2.0 use of pools, likely not
the appropriate approach.  Likely the work should be queued
and the server marked for immediate shutdown.

Which reminds me, I was going to implement "slow" v. "immediate"
shutdown... (immediate => abandon all outstanding operations).
Guess that will just have to wait for 2.1.