Qmail-Scanner Race Condition

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
jjjheimer
Forum User
Forum User
Posts: 13
Joined: Tue Dec 14, 2004 1:54 pm

Qmail-Scanner Race Condition

Unread post by jjjheimer »

Hey guys, I need some help solving an issue I've create with scott's clamd, spamassassin and the qmail-scanner. I was attempting to drive high scoring spam into the ground when I created a scenario that leads to a race condition in qmail. It spawns qmail-scanner-queue files like crazy. I've now got a backlog of email queueing up on the server so I figured this was normal until I noticed that over 1000 processes were running and the same messages where being clamd'd and spamd'd over and over. The qmail-scanner-queue.pl was configured with clamd_scan_scanner, spamassassin and perlscan_scanner. Thinking out loud - I wonder if perlscan may be the source of the problem.

Thanks, jjj


(edit - spelling)
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Make sure you dont have duplicates of the qmail-queue wrapper. That could cause a loop like that.
jjjheimer
Forum User
Forum User
Posts: 13
Joined: Tue Dec 14, 2004 1:54 pm

Unread post by jjjheimer »

I did at one point have a qmail-queue and a qmail-queue.orig and they appeared to be same size. These are created by the qmail-scanner-reconfiure script right? When I removed qmail-queue.orig and started qmail the logs recorded a problem because it was missing.
jjjheimer
Forum User
Forum User
Posts: 13
Joined: Tue Dec 14, 2004 1:54 pm

Unread post by jjjheimer »

I found some info from another thread - I guess this is a common issue.

The plan is to:
Remove qmail-scanner and psa-qmail with:
rpm -e qmail-scanner psa-qmail --nodeps

Then re-install with yum
yum install psa-qmail
yum install qmail-scanner

Check permissions on the qmail-queue files and ensure the setguid for perl. I'll post the results when the box comes back to life.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

A lot of things can make that happen. Dr. Web can do it, some strange upgrade conditions with PSA in other cases. Anyway, yeah its very common, if you ever get a high load inside of qmail then thats the first thing I'd look at. The good news is that you dont lose any mail in the process, it just sits there looping through the queue until you fix it.
jjjheimer
Forum User
Forum User
Posts: 13
Joined: Tue Dec 14, 2004 1:54 pm

Unread post by jjjheimer »

Well the remove and reinstall seemed to have fixed the problem. I do have a lot of mail queued up /var/spool/qmailscan/tmp that isn't being reprocessed. Any thoughts on kick starting this?
Post Reply