Steve Hay wrote: [...]
As you can see, the fname member is (presumably correctly) set to the error_log path, but the mutex member is NULL.
I may be wrong here, but it looks like the apr_file_t *logfile in modperl_common_log.c is set by modperl_trace_logfile_set(), which is called from modperl_hook_post_config(). The value being passed to modperl_trace_logfile_set() is an apr_file_dup() of s->error_log:
apr_file_t *dup; MP_RUN_CROAK(apr_file_dup(&dup, s->error_log, pconf), "mod_perl core post_config"); modperl_trace_logfile_set(dup);
I walked through apr_file_dup() and watched what happened. s->error_log has a (valid) mutex member, but the dup of it does not. Inside apr_file_dup(), all the members of **new_file are NULL'ed by the apr_pcalloc() call, and only some are then set to their correct values. mutex is not one of them, so it just gets left NULL.
Perfect, so you've uncovered a yet another bug in apr, on unix it does create the mutex, see: apr/file_io/unix/filedup.c: _file_dup
So fix apr/file_io/win32/filedup.c: apr_file_dup to create the mutex, looking at the function above and apr_file_setaside in apr/file_io/win32/filedup.c, which does:
if (old_file->mutex) {
apr_thread_mutex_create(&((*new_file)->mutex),
APR_THREAD_MUTEX_DEFAULT, p);
apr_thread_mutex_destroy(old_file->mutex);
}
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
