Bug 46763 - Improve treatment of jk_log_lock.
Summary: Improve treatment of jk_log_lock.
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: mod_jk (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2009-02-24 20:14 UTC by Eiji Takahashi
Modified: 2009-12-20 23:50 UTC (History)
0 users

patch for apache-2.0/mod_jk.c (2.74 KB, patch)
2009-02-24 20:14 UTC, Eiji Takahashi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eiji Takahashi 2009-02-24 20:14:07 UTC
Created attachment 23305 [details]
patch for apache-2.0/mod_jk.c

Hi, folks.

If the graceful restart occurs, jk_log_lock that an old child process has is deleted by the parent process and the new one is made.
When an old child process writes the request log after the parent process restarted, the following logs are written in error_log 
because old jk_log_lock has already been deleted. 
# An old child process doesn't stop until the reply is returned.

[Mon Feb 16 14:38:57 2009] [error] (22)Invalid argument: apr_global_mutex_lock(jk_log_lock) failed
[Mon Feb 16 14:38:57 2009] [error] (43)Identifier removed: apr_global_mutex_unlock(jk_log_lock) failed

To avoid output logs, I modified the code to reuse jk_log_lock by using apr_pool_userdata_set/get() ( just like other modules. for instance, mod_ssl etc. ).

Comment 1 Mladen Turk 2009-02-24 23:32:19 UTC
Applied to the trunk.
Comment 2 Mladen Turk 2009-12-20 23:50:54 UTC
Closing this issue