[Pkg-mailman-hackers] Bug#424620: mailman: error.log not re-opened on log rotation

Sam Morris sam at robots.org.uk
Thu Dec 27 13:23:15 UTC 2007


reopen 424620
thanks

> > Mailman does not re-open error.log when it gets SIGHUP, causing loss of
> > error messages:
> 
> The logrotate file erroneously sends a SIGHUP to reopen logfiles, while 
> the "mailman way" of doing this is to call 
> 
> /usr/lib/mailman/bin/mailmanctl reopen
> 
> I've implemented this now in the current logrotate script, but could you 
> please confirm that that works for you?

Hi Thijs,

Sorry for taking so long to get back to you! I have tried this out and
discovered that it does not work:

        $ sudo cat /var/run/mailman/mailman.pid 
        2626
        
        :) 13:18 sam at crypt ~ 
        $ ps u 2626
        USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
        list      2626  0.0  0.1  11644  1956 ?        Ss   Nov09   0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s -q start
        
        :) 13:19 sam at crypt ~ 
        $ sudo -u list /usr/lib/mailman/bin/mailmanctl reopen
        Re-opening all log files
        
        :) 13:19 sam at crypt ~ 
        $ sudo lsof +L1
        COMMAND     PID        USER   FD   TYPE DEVICE    SIZE NLINK  NODE NAME
        mailmanct  2626        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2627        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2627        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2628        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2628        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2629        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2629        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2634        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2634        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2635        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2635        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2636        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2636        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2637        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2637        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2638        list    3u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)
        python     2638        list    5u   REG  254,2     651     0 35394 /var/log/mailman/error.1 (deleted)

Looking at the source code for mailmanctl, it seems that all it does is
to send a SIGHUP to the master mailman process... so it looks like there
is something else going on here.

Please let me know if you need any more information!

BTW, would you consider fixing this in a stable update for 4.0r3--once
we discover the correct solution, of course?

-- 
Sam Morris <sam at robots.org.uk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-mailman-hackers/attachments/20071227/f325dca6/attachment.pgp 


More information about the Pkg-mailman-hackers mailing list