apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject sms_trivial locking Re: missing apr_pool_child_cleanup_set when using SMS?
Date Fri, 27 Jul 2001 05:50:58 GMT
Justin Erenkrantz wrote:

>On Wed, Jul 25, 2001 at 10:29:35AM -0700, Brian Pane wrote:
>>Lately the httpd won't build when configured with
>>--enable-sms, because of unresolvable references to
>>apr_pool_child_cleanup_set in file_io/unix/open.c.
>>Is there supposed to be an implementation of this
>>function in the sms-pools code, or am I missing
>I just committed what I think it should be.  Check it out and let 
>me know if it doesn't work.  We *really* need people to look at
>the code and see if they can find segfaults in the SMS code now.
Thanks, it compiles now.

But there's a problem with the SMS lock management.
According to gprof, every call to apr_sms_trivial_malloc
acquires and releases a lock.

Ths logic in apr_sms_post_init and apr_sms_thread_register
looks broken.  Every time an SMS is created, it gets registered
with the thread that creates it.  And registration with even
a single thread results in the creation of a lock for the SMS.
Isn't apr_sms_thread_register supposed to create a lock for
the SMS if and only if the count of threads registered with
the SMS is greater than 1?


View raw message