Wietse Venema:
> Tam?s G?rczei:
> > Hello List,
> > 
> > I'd like to ask whether You're aware of any change which might cause
> > breakage in my setup involving spamc with a completely unchanged
> > configuration in between - I'm getting the following error:
> > 
> > *"panic: master_reap: unknown pid"*
> 
> Is the Postfix master daemon running as PID 1? Historically this
> PID was reserved for the init daemon which becomes the parent of
> orphaned processes, i.e. processes that terminate without a parent
> waiting for them. Postfix does not create such processes, but if
> you run other programs inside the Postfix container then they
> might do that.
> 
> Options:
> 
> - Run Postfix as PID != 1.
> 
> - Don't co-locate Postfix with other software. That means pipe into
> socket instead of into a program in the same container.
> 
> - Make the master sloppier, and accept events from processes that
> it did not create.

As per the patch below.

--- src/master/master_spawn.c-  2014-12-06 20:35:33.000000000 -0500
+++ src/master/master_spawn.c   2019-02-17 09:38:52.000000000 -0500
@@ -301,8 +301,11 @@
        if (msg_verbose)
            msg_info("master_reap_child: pid %d", pid);
        if ((proc = (MASTER_PROC *) binhash_find(master_child_table,
-                                         (void *) &pid, sizeof(pid))) == 0)
+                                       (void *) &pid, sizeof(pid))) == 0) {
+           if (init_mode)
+               continue;                       /* non-Postfix process */
            msg_panic("master_reap: unknown pid: %d", pid);
+       }
        serv = proc->serv;
 
 #define MASTER_KILL_SIGNAL     SIGTERM

Reply via email to