[Exim] Exim 4.40 crashes in src/daemon.c

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Heiko Schlichting
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Exim 4.40 crashes in src/daemon.c
--
Hi,

Exim 4.40 uses the function smtp_printf() in line 166 of src/daemon.c to
return an 421 error message. This is a problem as smtp_printf() writes to
the filedescriptor smtp_out which is undefined at this time as it is not
set until line 194 of the same function. In cases the error condition
occurs (which could happen every now and then on some heavy loaded servers
at least on some architectures[*]) the exim master daemon crashes.

Release versions before 4.40 executes the same code but only after setting
variable smtp_out to a useful value. It seems that this code fragment was
moved too far up.

If you notice this problem (exim daemon crashes, perhaps with something
like "getsockname() failed: Invalid argument" in the last line of panic log
file) here is a workaround: remove line 166 of src/daemon.c as suggested in
the attached patch.

Heiko

[*] Environment: SGI Origin with 8 CPUs, IRIX 6.5.22, MIPSpro compiler 7.41

Heiko Schlichting        | Freie Universität Berlin
heiko@???       | Zentraleinrichtung für Datenverarbeitung (ZEDAT)
Telefon +49 30 838-54327 | Fabeckstraße 32
Telefax +49 30 838454327 | 14195 Berlin
--
--- src/daemon.c.org    Fri Jul  9 12:19:58 2004
+++ src/daemon.c    Wed Jul 21 15:34:11 2004
@@ -163,7 +163,6 @@
   {
   log_write(0, LOG_MAIN|LOG_PANIC, "getsockname() failed: %s",
     strerror(errno));
-  smtp_printf("421 Local problem: getsockname() failed; please try again later\r\n");
   goto ERROR_RETURN;
   }


--