in reply to Seeing NULLs in my Log::Log4perl log file

Was there a reboot around that time? I sometimes see blocks of NULs written to log files (unrelated to Perl) if a machine lost power. I suspect it has something to do with the file metadata (saying the file now includes that block) getting committed to the drive before the contents of that block are fully written.
  • Comment on Re: Seeing NULLs in my Log::Log4perl log file

Replies are listed 'Best First'.
Re^2: Seeing NULLs in my Log::Log4perl log file
by talexb (Chancellor) on May 02, 2024 at 01:46 UTC

    Huh. Good catch. The response I was ready to post was "Nope, there were no reboots, and there were about a dozen other scripts that didn't exhibit this behaviour." -- but I thought, Meh, I better have a look.

    No one's supposed to touch this server, and (I believe) it's on a UPS, but it looks like someone power cycled it this morning at about 0730. That's not good. I'll have to investigate some more.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.