
On Wed, Apr 25, 2001 at 11:24:29AM +0100, I wrote:
In any case, if the MTA was the problem I wouldn't have expected the qrunner process to be using lots of CPU - surely it would just be blocked consuming nothing?
I've done some further investigation myself by inserting syslog statements deep into the code until I could find the bit that is "hanging".
When qrunner starts it processed a few toadmin and tolist jobs fine. It is getting stuck on torequest jobs.
It turns out that someone had sent a huge MIME encoded attachment to the -request address. It got stuck inside MailCommandHandler::ParseMailCommands between the arrows appending the complete junk to the response email. I've commented out the loop since it probably isn't all that beneficial anyway. Maybe it would be a good idea to set an arbitrary limit on the number of lines that will be appended to avoid this problem happening? Alternatively, maybe messages longer than a certain number of lines should not even be processed? In its current form it acts as quite a good DoS on a mailman list.
if not self.__dispatch.has_key(cmd):
self.AddError(line, prefix='Command? ')
if self.__errors >= MAXERRORS:
self.AddError('\nToo many errors encountered; '
'the rest of the message is ignored:')
---> for line in lines[linecount+1:]: self.AddToResponse(line, trunc=0, prefix='> ') <---
break
I hope my understanding of this problem is correct and the above information is useful. I don't think I've got to the bottom of the CPU usage problem, but this was certainly part of it.
-- Mike Crowe <mac@fysh.org>