From: Michael S. <mic...@is...> - 2005-07-15 07:10:39
|
The essence of this bug, is that Log4Perl dies silently when writing to a logfile larger than the users 'ulimit'. It manifested when I was using a script in a postfix alias (/etc/postfix/aliases)=20 test: "|/usr/local/adm/script.pl" I had the Log4Perl configured to send email and to write to the logfile. When I ran the tests by sending to the alias, I got the emails from log4perl, but nothing was in the logfile. No exceptions or errors were thrown. When I ran the script manually, it worked (I got the e-mails, and entries in the logfile).=20 The logfile at the time was 64MB, and the postfix 'message_size_limit' was set to 20MB. From what I can tell, the 'shell' that postfix spawns as user nobody, when it executes the script, has the ulimit set to the value of the 'message_size_limit'. As soon as I made it write to a new file, I got the messages in the logfile (file had identical permissions) I changed it back to the old file, and didn't get messages. I nulled the logfile and tried again, and then I got the messages in the logfile. The problem is , that Log4Perl doesn't throw any kind of exception or error when it attempts to write to a file larger than its ulimit. Can this be logged as a bug, I am happy to provide any further detail you may require Mike --- Of course I don't look busy.....I did it right the first time.=20 Please note: This email and its content are subject to the disclaimer as = displayed at the following link http://www.is.co.za/disc.asp. Should you = not have Web access, send a mail to dis...@is... and a copy will = be emailed to you. |