You may have noticed my server down a bit yesterday.

I was trying to install mod_throttle on my server. It installed quickly/easily on another server but not mine. When installed and enabled (regardless of whether it was installed as a static module or as a DSO), apache would start up but any request would cause a segmentation fault.

I started apache up in single process mode (httpd -X) and did a gdb httpd <pid> to try and track down the problem.

I tracked it down to this call within my mod_perl code:

my $cookies = Apache::Cookie->fetch;

GDB was telling me it was happening here:

ApacheCookie_new

I confirmed this by doing this quick and dirty hack:

my $cookies = $r->header_in(’Cookie’);
my %cookielist = map { m@^\s*([^\=]+)=(.*)\s*@ } split(/\;/,$cookies);

It worked…but then I realized I was fetching cookies from many other modules…I realized that this error was only happening in the module that was being used as a PerlAccessHandler. Strange!

Anyway, I changed back my hack and wrote my simple throttling that did exactly what I wanted. Oh well.

And, BTW, I noticed on Google, while searching for gdb. that they had some extra links relevant to certain sites. Check out the links below the GDB result…they include mailing list info, download links, etc:

google search for gdb

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
 
Loading ... Loading ...