Yes I'm sure that I'm using prefork-mpm. This is the output oh httpd -V: Server version: Apache/2.2.4 Server built: Apr 13 2007 17:44:09 Server's Module Magic Number: 20054458:3 Server loaded: APR 1.2.7, APR-Util 1.2.7 Compiled using: APR 1.2.7, APR-Util 1.2.7 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... ....
I isolated my problem. It seems that sometimes during xmlFreeDoc(doc) I get a Segmentation fault. xmlFreeDoc is a function of libxml2 which I use inside my module. I suppose that libxml2 uses malloc/free to alloc and free memory: is it possibile that there is some overlap of memory with apr poll (r->poll)? Marco > On Mon, 2007-07-30 at 16:14 +0200, [EMAIL PROTECTED] wrote: > > I discovered some segmentation faults in apache error log. > > So I wanted to understand the reason of these errors. > > I put these statements in my module: > > > > ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool, "0:[%ld] %s", > > (long)getpid()); > > > > and > > > > ap_log_perror(APLOG_MARK, APLOG_ERR, 0, r->pool, "1:[%ld] %s", > > (long)getpid(), q); > > > > where 1: is increased in each my following instructions. > > Then I checked my error log to see where the error was generated. > > In the error log I found: > > > > ... > > [Mon Jul 30 15:35:30 2007] [error] 5:[12172] sss > > [Mon Jul 30 15:35:30 2007] [error] 6:[12172] sss > > [Mon Jul 30 15:35:33 2007] [error] 0:[12172] > > [Mon Jul 30 15:35:35 2007] [error] 0:[12172] > > [Mon Jul 30 15:35:47 2007] [error] 0:[12172] > > [Mon Jul 30 15:35:48 2007] [notice] child pid 12172 exit signal > > Segmentation fault (11) > > > > It seems that different childs of apache uses the same pid in a few > > seconds.... ???..... > > Children don't "use" PIDs - these are assigned by the operating system. > Are you _shure_ your server doesn't use threads? > Iff so this means that the same child reaches state '0' of your logging > more than once. > > > What does it mean? > > I'm using apache 2.2.4 with this configuration parameters: > > > > <IfModule mpm_prefork_module> > > StartServers 100 > > MinSpareServers 50 > > MaxSpareServers 200 > > ServerLimit 512 > > MaxClients 512 > > MaxRequestsPerChild 256 > > </IfModule> > > This only is used iff your server uses the prefork-mpm. > > > Could you give me a hint to solve my problem? > > Best regards > > Enable core dumps and examine the core file - you might need to > recompile at least your module with debugging information enabled. > > HTH Ralf Mattes > > > Marco >