Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread jean-frederic clere
Jeff Trawick wrote: See attached patch. Given a module with map-to-storage hook which leaves r-filename NULL, and config like the following, you get segfault on platforms that don't like strlen(NULL). Location /silly/foo RewriteEngine On RewriteCond %{SERVER_PORT} ^8080$ RewriteRule (.*)

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Jeff Trawick
On Fri, 10 Sep 2004 09:34:14 +0200, jean-frederic clere [EMAIL PROTECTED] wrote: Jeff Trawick wrote: See attached patch. Given a module with map-to-storage hook which leaves r-filename NULL, and config like the following, you get segfault on platforms that don't like strlen(NULL).

Re: Seg fault: Possible race conditions in mod_mem_cache.c

2004-09-10 Thread Jeff Trawick
Looking more closely at the implication of the submitted patch, I don't think we want to lock decrement_refcount() with a global mutex affecting the whole cache. Yes, it fixes the double free, I think you should commit your last patch ASAP, and then somebody can work out a redesign of the

make the server not to start in case the Initialization is a failure

2004-09-10 Thread siba.dora
Hi All, I am trying to write a sample Plugin on APACHE 2.0 which does some initialization. I am attaching the code portion for the same. static void mod_register_hooks(apr_pool_t *p) { ap_hook_child_init(mod_init_Child, NULL,NULL, APR_HOOK_FIRST); ap_hook_check_user_id

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Geoffrey Young
Jeff Trawick wrote: See attached patch. Given a module with map-to-storage hook which leaves r-filename NULL, and config like the following, you get segfault on platforms that don't like strlen(NULL). given that, I understand this part -if (strcmp(r-filename, ofilename) == 0) {

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Geoffrey Young
odd to me that rewrite's translate_name hook, used for processing server config directives, can update r-filename permanently even when it declines that's a common idiom for we mod_perl people :) actually, I take that back (not enough coffee yet) - we do that with r-uri (like everyone else)

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Jeff Trawick
On Fri, 10 Sep 2004 08:19:10 -0400, Geoffrey Young [EMAIL PROTECTED] wrote: Jeff Trawick wrote: See attached patch. Given a module with map-to-storage hook which leaves r-filename NULL, and config like the following, you get segfault on platforms that don't like strlen(NULL). given

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Jeff Trawick
On Fri, 10 Sep 2004 08:27:57 -0400, Geoffrey Young [EMAIL PROTECTED] wrote: odd to me that rewrite's translate_name hook, used for processing server config directives, can update r-filename permanently even when it declines that's a common idiom for we mod_perl people :) actually, I

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Geoffrey Young
I'm afraid I don't understand. yeah, I'm sorry, that's my fault :) I should have taken the time to analyze the code in context and follow it all through. having done that, the only thing that comes to mind is I wonder how much logic can be skipped if r-filename is NULL and you assign it

ap_log_perror behaviour and LogLevel?

2004-09-10 Thread Nick Kew
This has been nagging me for a while, first with reference to mod_diagnostics, and now with mod_filter. log_error_core takes a server_rec argument. If that argument is NULL, it will return without logging anything unless loglevel is APLOG_NOTICE or greater than ap_default_loglevel.

Re: Smart filtering Module

2004-09-10 Thread Nick Kew
OK, following on from a couple of weeks ago, I've committed mod_filter to cvs. That includes mod_filter.c and relevant documentation, which are more-or-less in sync. Please review. Assuming the work gets and survives wider review, the next stage in this work is closer integration with

Re: cvs commit: httpd-2.0/modules/proxy proxy_balancer.c proxy_util.c mod_proxy.h

2004-09-10 Thread William A. Rowe, Jr.
You introduce a race between multiple listening threads attempting to initialize the scoreboard together. post_config or child_init should solve the problem, no? At 03:16 AM 9/10/2004, [EMAIL PROTECTED] wrote: mturk 2004/09/10 01:16:26 Modified:modules/proxy proxy_balancer.c

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread William A. Rowe, Jr.
At 05:24 AM 9/10/2004, Jeff Trawick wrote: On Fri, 10 Sep 2004 09:34:14 +0200, jean-frederic clere [EMAIL PROTECTED] wrote: Jeff Trawick wrote: See attached patch. Given a module with map-to-storage hook which leaves r-filename NULL, and config like the following, you get segfault on

Re: cvs commit: httpd-2.0/modules/proxy proxy_balancer.c proxy_util.c mod_proxy.h

2004-09-10 Thread Mladen Turk
William A. Rowe, Jr. wrote: You introduce a race between multiple listening threads attempting to initialize the scoreboard together. post_config or child_init should solve the problem, no? Yes, I see that (now that you've mentioned :)). I'll use the child_init to initialize all balancers.

Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r-filename

2004-09-10 Thread Jeff Trawick
On Fri, 10 Sep 2004 09:01:48 -0500, William A. Rowe, Jr. [EMAIL PROTECTED] wrote: At 05:24 AM 9/10/2004, Jeff Trawick wrote: On Fri, 10 Sep 2004 09:34:14 +0200, jean-frederic clere [EMAIL PROTECTED] wrote: Jeff Trawick wrote: See attached patch. Given a module with map-to-storage hook

[PATCH] Re: Seg fault: race conditions in mod_mem_cache.c

2004-09-10 Thread Jean-Jacques Clar
The following patch is a rework ofthe refcount and cleanup fields in mod_mem_cache.c. I replaced the cleanup field with a bit set in refcount. This is done to prevent race conditions when refcount is accessed on two different threads/CPUS. The complete description was done on thatmail thread

Re: make the server not to start in case the Initialization is a failure

2004-09-10 Thread Ian Holsman
[EMAIL PROTECTED] wrote: Hi All, I am trying to write a sample Plugin on APACHE 2.0 which does some initialization. I am attaching the code portion for the same. static void mod_register_hooks(apr_pool_t *p) { ap_hook_child_init(mod_init_Child, NULL,NULL, APR_HOOK_FIRST);

Re: [PATCH] Re: Seg fault: race conditions in mod_mem_cache.c

2004-09-10 Thread Greg Marr
At 06:53 PM 9/10/2004, Jean-Jacques Clar wrote: I replaced the cleanup field with a bit set in refcount. This is done to prevent race conditions when refcount is accessed on two different threads/CPUS. +#define OBJECT_CLEANUP_BIT 0x00F0 0x00F0 isn't a bit, it's 4 bits: 0x0010 |

Re: make the server not to start in case the Initialization is a failure

2004-09-10 Thread Sander Temme
On Sep 10, 2004, at 4:37 PM, Ian Holsman wrote: can you init the config file in a post-config hook instead of the child? that can cause the apache to not start. ... since calling exit() will make the parent go away. FWIW.. you haven't considered the case where init-child is executed on a running