Since upgrading a server from Debian 7.8 to 8.2 (64-bit) the Apache upgrade (to 2.4.10) has introduced a very strange fault: random newlines in error_log.
Example:
[Mon Nov 16 13:29:54.388526 2015] [cgi:error] [pid 9122] [client xx.xx.xx.xx:1865] AH01215: (Fred, Test) Warning: foo.cgi/Foo.pm::foo():115 "Argument "test" isn't numeric i, referer: http://…
[Mon Nov 16 13:29:54.390770 2015] [cgi:error] [pid 9122] [client xx.xx.xx.xx:1865] AH01215: n numeric eq (==)" [GET http://…], referer: http://…
Here, the CGI warning has been split across the word "in".
The position within the line where the line break is added is random, and the effect is applied to random lines. It's quite normal to see several instances of the same error in a row (e.g. an error occurring within a loop), with only one of these lines affected by a random line break.
The text is written to the error log by way of "say STDERR sprintf(…)", which was working entirely without incident in the previous version of Debian/Apache/Perl (currently Apache 2.4 and Perl 5.20.2).
Am I the only person in the world to encounter such a strange phenomenon? :)
Edit: I'm starting to suspect that the issue occurs whenever multiple lines are output from the CGI script to STDERR at once, i.e. some sort of buffer boundary being hit … just a thought.