Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

bug? outgoing.pl core dumping randomly

Quote Reply
bug? outgoing.pl core dumping randomly
I need some help. plz and thx. I just ran across outgoing.pl exiting on signal 11 (core dumped) when I happened to be running top and saw perl eating up to 100% CPU on outgoing.pl and then got the core dump message in the server's log/messages file. I then tried running it from the command line and same thing. But an hour later it was fine and ran normally. Now I was looking through the messages log for other core dumps and found a bunch, but totally random (on the 9th twice, 10th six times, 11th three times, 12th twice, 13th five times and 14th six times). So it's been going on for a while.

I have no clue where to begin looking for what might be causing this, outgoing is set to run every 15 minutes and I've not yet started it under mod_perl. When I did get the error when running it from the command line, I got an out of memory error. I have 1G ram and 500M swap on the machine and there's always plenty free. My outgoing.pl is listed at v1.27 and GMail is 2.06 upgrade.

Where can/should I start to figure this out?
Quote Reply
Re: [JerryP] bug? outgoing.pl core dumping randomly In reply to
Try running outgoing.pl with debug turned on. That should hopefully output some useful information.

Adrian
Quote Reply
Re: [brewt] bug? outgoing.pl core dumping randomly In reply to
Good idea and you just gave me another one. When I ran it with -v I got four lines of preparing query and the message stats with 0 bounces, replies, forwards. So, I went ahead and sent a message I know would bounce to give it something to work on, and voila, segfault and core dump. I did it twice and it's reproducible, I don't want to do this a lot since it's running live now.

Running it with a bounce and -v it gets to this line:

<-------------- Email parsed. at /www/cgi-bin/mail/admin/GT/Mail.pm line 205.

then after about a minute I get the out of memory message and about 30 seconds later I get the core dump.

What should I look for now?
Quote Reply
Re: [JerryP] bug? outgoing.pl core dumping randomly In reply to
Try it with debug turned on.

Adrian
Quote Reply
Re: [brewt] bug? outgoing.pl core dumping randomly In reply to
Isn't that what the -v does (line 58 of outgoing) when running from the command line? Cuz that's what I did to get the output above.
Quote Reply
Re: [JerryP] bug? outgoing.pl core dumping randomly In reply to
Hi,

Do you have Digest::MD5 or MIME::Base64 modules installed? Try making sure these modules are installed (if they aren't Gossamer Mail falls back to perl version of the code which is slower).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] bug? outgoing.pl core dumping randomly In reply to
According to 'perldoc perllocal' they are both installed.
Quote Reply
Re: [Alex] bug? outgoing.pl core dumping randomly In reply to
Okay, found out what's happening. It's prolly in part due to some of the changes we made dealing with multiple domains and keeping a standard template for each domain, but not entirely.

What happened was that outgoing.pl could not get a template set (not even default) when it called GMail.pm to load the template. So GMail goes ahead and and runs the error routine, which in turn tries to call the language file (but doesn't have a template set), and of course there is error checking in that, which in turns calls back for an error which calls that language file again... you get the picture, it's quite a nasty loop it gets caught in. Fortunately the OS was pretty good at handling these core dumps so the server never crashed crashed, but it's not hard to see how it could. I ended up with a 500MB core dump file.

My guess is there might be some code missing in the error handling to make sure it's not looping itself over and over again...