On 12/02/2009 09:09 PM, Rainer Jung wrote:
> Platform: Solaris 8 (sic!)
> MPM: worker dynamically loaded
> APR etc: Bundled
> PCRE: 7.8
>
> During testing of 2.3.4 I noticed crashes after restart.
>
> I did a build with lots of modules, especially including mod_logio. The
> scoreboard uses in ap_increment_counts() the optional function
> ap_logio_get_last_bytes() from mod_logio if available.
>
> In my case after restart the memory location of mod_logio and the
> address of the optional function changed, but the scoreboard still tries
> to call to the original address retrieved after the initial start.
>
> I don't know about the full implementation of the optional functions,
> but it seems either
>
> APR_REGISTER_OPTIONAL_FN(ap_logio_get_last_bytes);
>
> in register_hooks in mod_logio needs to run after restarts too, or there
> is a problem resulting in an unwanted change of load order of the
> modules during restart. I did not edit the config files between start
> and restart.
>
> The problem happens with normal restarts and graceful restarts.
>
> Wild guess: it might have to do with dynamic MPM loading.
I am not so sure. I guess the problem is that we call
APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
only in ap_calc_scoreboard_size which is IMHO not called at restarts.
Does the following totally untested patch fix your issue?
Index: scoreboard.c
===================================================================
--- scoreboard.c (Revision 886294)
+++ scoreboard.c (Arbeitskopie)
@@ -284,6 +284,8 @@
apr_status_t rv;
#endif
+ pfn_ap_logio_get_last_bytes =
APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
+
if (ap_scoreboard_image) {
running_gen = ap_scoreboard_image->global->running_generation;
ap_scoreboard_image->global->restart_time = apr_time_now();
Regards
RĂ¼diger