Item12937: Foswiki issues with Perl 5.20.0
Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Two issues:
The PlainFile log rotate code is ending up with a closed file handle.
$lf is the log file handle. It fails when it tries to "slurp up" the last of the log.
*** Use of uninitialized value in concatenation (.) or string at /var/www/foswiki/trunk/core/lib/Foswiki/Logger/PlainFile.pm line 434, <$lf> chunk 1
The eachEventSince code loops.
The start and ending year end up out of order and the code loops adding log file names until it runs out of memory. Not sure yet if the issue is in Foswiki::Time or in the Logger itself. The error only occurs when the complete LoggerTests is run. Individual tests don't fail.
The Store fails with Useless use of greediness modifier.
Useless use of greediness modifier '?' in regex; marked by <-- HERE in
m/^([0-9]+)\.([0-9]+)\s+date\s+(\d\d(\d\d)?(\.\d\d){5}? <-- HERE );$/
at /var/www/foswiki/trunk/core/lib/Foswiki/Store/VC/RcsLiteHandler.pm line 349.
Marking the task urgent for Foswiki 1.2. Need to decide if we fix or release note against perl 5.20.
--
GeorgeClark - 07 Jun 2014
The root cause of the logging issues is a change to warnings in 5.20.0
my $curLog = $line . <$lf>;
In 5.20, if $lf is at EOF, then this fails with the uninitialized value in concatenation. Fix is to either use
"no warnings 'uninitialized'"
for that statement, or separate the read from the concatenation and test
<$lf>
returned anything.
Because the log rotate tests overrides the Time function, the falure in the rotate code corrupts the time for all the other tests. So the eachEventSince is because of the corrupted time.
Checking in fixes for both the logger and the regex issue.
--
GeorgeClark - 07 Jun 2014
These following failures are all due to hash ordering:
QueryTests has 1 unexpected results (of 49):
Fn_QUERY has 1 unexpected results (of 16):
EditRowPluginSuite has 3 unexpected results (of 7):
In the ERPSuite::test_simple_view, the issue is that the test is for a "deep_equals" but one of the array elements contains a URL which has varying query parameter ordering.
--
GeorgeClark - 07 Jun 2014