develooper Front page | perl.perl5.porters | Postings from October 2016

[perl #129953] lib/locale.t: Test failures and segfaulting onFreeBSD-11 and -12

Thread Previous | Thread Next
From:
Karl Williamson via RT
Date:
October 26, 2016 19:00
Subject:
[perl #129953] lib/locale.t: Test failures and segfaulting onFreeBSD-11 and -12
Message ID:
rt-4.0.24-25882-1477508409-1139.129953-15-0@perl.org
On Wed Oct 26 04:27:27 2016, jkeenan wrote:
> On Mon Oct 24 05:16:14 2016, jkeen@verizon.net wrote:
> > This is a bug report for perl from jkeenan@cpan.org,
> > generated with the help of perlbug 1.40 running under perl 5.24.0.
> >
> > lib/locale.t: Test failures and segfaulting on FreeBSD-11 and -12
> >
> 
> Status of lib/locale.t on FreeBSD-11 Oct 26 2016
> 
> Branch: smoke-me/khw-locale
> 
> Commit: 79dfed8
> 
> lib/locale.t no longer crashes.  When run individually via:
> 
> cd t; ./perl harness -v ../lib/locale.t; cd -
> 
> ... the first time there was a visible pause of multiple seconds after
> test 380.  There was another, shorter, visible pause after test 389.
> But the test resumes and completes with 4 failures in tests 426
> through 429.
> 
> In a 'script' session, I then reconfigured and rebuilt for debugging:
> 
> sh ./Configure -des -Dusedevel -Duseithreads -DDEBUGGING
> 
> I re-ran the test:
> 
> PERL_DEBUG_FULL_TEST=2 ./perl -Ilib -DLv -T lib/locale.t 2>&1
> 
> This time I did not see visible pauses.  As before, the test completed
> without crashing.  Typescript is large; available on request; will be
> sent to Karl and Dan directly.
> 
> I then manually ran the file from the command-line with both:
> 
> cd t; ./perl harness -v ../lib/locale.t; cd -  # 4.88 real   4.76 user
> 0.11 sys
> 
> ./perl -Ilib -T lib/locale.t                   # 4.82 real   4.74 user
> 0.07 sys
> 
> Running with 'harness', I observed a visible pause at test 389, though
> shorter than previously.  I did not observe a pause at test 389.
> 
> I then got curious and grepped the typescript for locale.c.  On the
> basis of the debugging output I saw there, I went into
> hints/freebsd.sh and added:
> 
> d_strlcpy='undef'
> 
> I reconfigured and rebuilt and reran the test.  However, I got all the
> same debugging warnings.
> 
> Thank you very much.

I have pushed to blead fixes that prevent the segfaults, particularly 0d94136269cd77412aa60b5660955d3f682df082.  The segfaults are a bug in these OS versions.  What the commits do is to not test locales that can be determined to be incompatible with Perl.  Otherwise, every locale on the machine is tested.  Someone may try to switch into one of these locales in a Perl program, and they could get segfaults.  One solution would be for perl to refuse to switch to a locale it can determine is incompatible, but I'd rather not do that because some cases are complicated to handle, and this is clearly an OS bug that we haven't found elsewhere, and the docs say that these locales are problematic.  The bug should be reported upstream to the vendor.  Dan already may have done that.

The remaining failures in the test are from the same underlying function that segfaults.  We can report these upstream as well.

I now have access to a failing system, and the strlcpy() problem is no longer manifesting.  I don't understand why, and would rather not spend the tuits to figure it out.  I think we should drop that from consideration unless it shows up again.

As I explained in an earlier post, the pause after test 380 is while the test file is scanning the system to find and do sanity validation on all the locales on it.  The second pause is because it tests each sane locale for problems, but doesn't print anything until it has created a consolidated report.
-- 
Karl Williamson

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=129953

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About