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
