[Exim] dbfn.c: damage limitation wrt SEGV

Góra strony
Delete this message
Reply to this message
Autor: k
Data:  
Dla: exim-users
Temat: [Exim] dbfn.c: damage limitation wrt SEGV
I believe, this bug report of mine never came through to the mailing
list because I was temporarily unsubscribed and thus blocked.
Apologies if it is a duplicate for you.

--------

Recently it happend to me that I (unvoluntarily) set up an environment
to get those ominous SEGVs on DB access. I had a libdb.a version 2.7.5
and the header files of libdb version 2.4.14 installed. With that
setup I compiled exim and with that I got an overwhelming amount of
SEGVs.

It turned out that the damage limitation in dbfn_read_with_length() in
the file dbfn.c needs an improvement. The idea to log the event is OK,
but it has the potential to do some serious damage in turn. In my case
it happened that some calling process seemed to retry the access
immediately which lead to 5000 lines per second added to both mainlog
and paniclog. You can imagine, this filled the disk rather quickly.
Logfiles available on request.

The cure I suggest is to add a sleep 1 there. As it's a "damage
limitation function" we need not be concerned about speed here and
reducing the speed of diskspace-grabbing by a factor of 5000 isn't too
bad.

--- dbfn.c-302    Sat Jul  3 09:00:38 1999
+++ dbfn.c    Sat Jul  3 09:01:08 1999
@@ -254,6 +254,7 @@
   {
   log_write(0, LOG_MAIN|LOG_PANIC, "SEGV while reading \"%s\" from "
     "dbm file: record assumed not to exist", key);
+  sleep 1;
   return NULL;
   }
 }



Thanks for exim, folks,
--
andreas