Description
When running svnserve in inetd mode and using SASL authentication, a segmentation violation occurs. When running in inetd mode, svnserve doesn't allocate a new pool for processing a request. In other modes, svnserve uses a new pool for each request. Using a single pool causes all cleanup callbacks to be registered on the same pool. During APR shutdown, these callbacks are called in registration order. This results in sasl_done() being called prior to sasl_dispose(), which violates the API requirements for sasl_done(), which should always be the last sasl_ function called. The net result is that sasl_done() calls dlclose() for any authentication modules loaded by sasl, and then sasl_dispose() tries to call module-specific shutdown functions which are unaccessable. This results in a SIGSEGV. I believe that if APR called the pool cleanup functions in the reverse of the registration order, this issue would go away. It can be worked around in Subversion itself by allocating a subpool for handling the single inetd request.
Original issue reported by ajkloss