Package: postgrey
Version: 1.21-1
Severity: normal

Lately my system has noticed runaway postgrey processes.  The symptoms
are that on startup, the lone postgrey process consumes 80-95% of the
CPU.  Strace ends with the following:

 open("/var/lib/postgrey/__db.001", O_RDWR|O_LARGEFILE) = 6
 fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
 mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_SHARED, 6, 0) = 0x4056e000
 close(6)                                = 0

When I ran the strace of postgrey as above, but with --dbdir=/tmp/ it
started just fine.  Moving all files but the postgrey.db out of
/var/lib/postgrey also solves the problem.

What appears to have happened is that an emergency reboot caused some of
the ancillary database files (the log or the __db.00? files) to become
corrupted in some maner that confused postgrey on startup.

A friend of mine noticed that he used to see this behavior in slapd
(which is not in Perl) suggesting that this was a berkeleydb problem.
Poking in his slapd init scripts he found the following:

12:14 <npmr> i noticed that as of sarge, the openldap initscript runs
                db4.2-recover before starting the daeon
12:15 <npmr> looks like there's a try_fix_db bash function in there
12:15 <npmr> about a page of code
12:15 <npmr> very tidy looking
12:15 <npmr> and then this in the start) clause:
12:15 <npmr>         if [ "$TRY_BDB_RECOVERY" = "yes" ]; then
12:15 <npmr>                 try_fix_db
12:15 <npmr>         fi

It may be helpful to try this technique in postgrey's init scripts.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.12.3-linode14
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages postgrey depends on:
ii  debconf                       1.4.30.13  Debian configuration management sy
ii  libberkeleydb-perl            0.26-3     use Berkeley DB 4 databases from P
ii  libnet-dns-perl               0.48-1     Perform DNS queries from a Perl sc
ii  libnet-server-perl            0.87-3     An extensible, general perl server
ii  perl                          5.8.4-8    Larry Wall's Practical Extraction 
ii  ucf                           1.17       Update Configuration File: preserv

-- debconf information:
  postgrey/1.13-5_move-db:
  postgrey/1.14-1_lookup-by-subnet:
  postgrey/1.13-5_old-config:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to