[exim-dev] [Bug 852] New: Do not reset hard limit for coredu…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Marc Haber
Ημερομηνία:  
Προς: exim-dev
Αντικείμενο: [exim-dev] [Bug 852] New: Do not reset hard limit for coredump size
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=852
           Summary: Do not reset hard limit for coredump size
           Product: Exim
           Version: 4.69
          Platform: Other
               URL: http://bugs.debian.org/511529
        OS/Version: Linux
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: Delivery in general
        AssignedTo: nigel@???
        ReportedBy: mh+exim-bugzilla@???
                CC: exim-dev@???



This has been reported by Jörg Sommer in the Debian BTS (#511529):

Hi,

src/deliver.c:1726 lists the following code:

/* Prevent core dumps, as we don't want them in users' home directories.
HP-UX doesn't have RLIMIT_CORE; I don't know how to do this in that
system. Some experimental/developing systems (e.g. GNU/Hurd) may define
RLIMIT_CORE but not support it in setrlimit(). For such systems, do not
complain if the error is "not supported". */

#ifdef RLIMIT_CORE
struct rlimit rl;
rl.rlim_cur = 0;
rl.rlim_max = 0;
if (setrlimit(RLIMIT_CORE, &rl) < 0)

Setting the rlim_max to zero makes it impossible to enable coredumps for
subprocesses. Setting rlim_cur to zero would be enough to prevent
coredumps; soft limits vs. hard limits.

I've the problem that I pass my mails to bogofilter via the systemfilter
and bogofilter crashes sometimes (#510793). I want to get a coredump of
the crashed process to further insprect the problem, but it's not
possible because the hardlimit is set to zero and the systemfilter is not
run by root.

--- deliver.c+ 2009-01-11 20:17:19.000000000 +0100
+++ deliver.c 2009-01-11 20:20:06.000000000 +0100
@@ -1731,8 +1731,9 @@

   #ifdef RLIMIT_CORE
   struct rlimit rl;
+  if (getrlimit(RLIMIT_CORE, &rl) < 0)
+    rl.rlim_max = 0;
   rl.rlim_cur = 0;
-  rl.rlim_max = 0;
   if (setrlimit(RLIMIT_CORE, &rl) < 0)
     {
     #ifdef SETRLIMIT_NOT_SUPPORTED


Bye, Jörg.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email