Hi,
For what it's worth, I'm seeing similar problems on my Dual PPro Linux
system running Debian and Exim 3.33. When exim runs it often takes 99%
CPU and the load average steadily climbs. Right now the three averages
are "0.18, 1.00, 1.02" and I had the eximhog problem just before I started
writing this email. A strace of the process just hung, as did ltrace.
A new one just arrived:
mail:~# exiwhat
7733 delivering 16C1VO-00020d-00
24338 daemon: -q30m, listening on port 25
mail:/var/spool/exim# ls -l */16C1VO-00020d-00*
-rw------- 1 mail mail 73543 Dec 6 11:36 input/16C1VO-00020d-00-D
-rw------- 1 mail mail 1305 Dec 6 11:36 input/16C1VO-00020d-00-H
mail:/var/spool/exim# uptime
11:39:19 up 27 days, 17:54, 5 users, load average: 3.06, 1.71, 1.26
The message isn't that large. I have both sender and recipient verify, as
well as some system filters installed. Immediately after the process gets
unstuck, ltrace continues with:
mail:~# ltrace -p 7733
strchr("_", '_') = "_"
strncmp("message_body", "header_", 7) = 5
strncmp("message_body", "h_", 2) = 5
strcmp("message_body", "primary_hostname") = -3
strcmp("message_body", "message_age") = 1
strcmp("message_body", "n4") = -1
strcmp("message_body", "message_precedence") = -14
strcmp("message_body", "message_body_size") = -95
strcmp("message_body", "message_body_end") = -95
strcmp("message_body", "message_body") = 0
malloc(8192) = 0x080d9260
memcpy(0x080d9268, "", 0) = 0x080d9268
strncpy(0x080d9268, "This is a multi-part message in "..., 5000) =
0x080d9268
strncpy(0x080da5f8, "a", 1) = 0x080da5f8
strncpy(0x080da5f9, "\\", 1) = 0x080da5f9
strncpy(0x080da5fa, "s", 1) = 0x080da5fa
strncpy(0x080da5fb, "h", 1) = 0x080da5fb
strncpy(0x080da5fc, "r", 1) = 0x080da5fc
strncpy(0x080da5fd, "e", 1) = 0x080da5fd
Just from looking at this, exim appears to enter some sort of really tight
loop with no system calls being made. Hopefully the trace will show which
one. Also, I haven't looked at the source (obviously), but might I
suggest replacing code that may look like this:
for( index = 0; index < length; index++, ptr++ )
strncpy( ptr, char, 1 );
with something like:
for( index = 0; index < length; index++ )
ptr[index] = char;
Also, it's looking like many exim processes do this 99% spike ...
regards,
Christopher