From: Mike S. <m...@pe...> - 2005-07-15 22:35:53
|
On Fri, 15 Jul 2005, Michael Smith wrote: > The essence of this bug, is that Log4Perl dies silently when writing to > a logfile larger than the users 'ulimit'. The reason for this is that in the file appender, print $fh $params{message}; doesn't check for errors, like a full disk or a user quota. That's clearly a bug, I'll check into it ... Thanks for the note! -- Mike Mike Schilli m...@pe... > > It manifested when I was using a script in a postfix alias > (/etc/postfix/aliases) > > 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). > > 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. > Please note: This email and its content are subject to the disclaimer as displayed at the |