Thanks Wietse, I'll definitely try this patch -  but this code didn't
change in quite a bit of time. Can this behaviour I'm seeing somehow
relate to a change introduced between 3.3.0 and 3.3.2 ? I have zero
problems with the exact same setup and configuration on 3.3.0. Anyway
I'm invoking postfix-script in order to start master:

/ # ps auxwww -o pid,ppid,user,time,comm
PID   PPID  USER     TIME  COMMAND
    1     0 root      0:00 postfix-script
    9     1 root      0:01 rsyslogd
   92     1 root      0:00 master
   94    92 postfix   0:00 qmgr
   96    92 postfix   0:00 tlsmgr
  235    92 postfix   0:00 pickup
  275     0 root      0:00 sh
  283    92 postfix   0:00 smtpd
  284    92 postfix   0:00 anvil
  286   275 root      0:00 ps

T.

On 2019. 02. 17. 15:42, Wietse Venema wrote:
> 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