Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/uni/overload.t: a7ff7aca38 causes test failures on FreeBSD-13 threaded builds #20112

Closed
jkeenan opened this issue Aug 17, 2022 · 8 comments
Closed

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Aug 17, 2022

In a FreeBSD-13 VM I use for smoke-testing, I am seeing new failures in t/uni/overload.t on threaded builds. Sample smoke-test report

The failures look like this:

$ uname -mrs
FreeBSD 13.0-RELEASE amd64

$ clang --version
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ git describe
v5.37.2-181-g9b8ba59f2c

$ ./perl -Ilib -V:config_args
config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing';

$ cd t;./perl harness -v uni/overload.t; cd -
ok 1 - length of 'ASCII'
ok 2 - length of 'ASCII'
ok 3 - length of 'ASCII'
[snip]
ok 30 - e acute -> E acute
ok 31
ok 32 - e acute -> E acute
ok 33
not ok 34 - E acute -> e acute
ok 35
not ok 36 - E acute -> e acute
ok 37
not ok 38 - E acute -> e acute
ok 39
not ok 40 - e acute -> E acute
ok 41
not ok 42 - e acute -> E acute
ok 43
not ok 44 - e acute -> E acute
ok 45
not ok 46 - E acute -> e acute
ok 47
not ok 48 - E acute -> e acute
ok 49
not ok 50 - E acute -> e acute
ok 51
not ok 52 - e acute -> E acute
ok 53
not ok 54 - e acute -> E acute
ok 55
not ok 56 - e acute -> E acute
ok 57 - print 
[snip]
ok 190
ok 191
not ok 192 # TODO & SKIP RT #3054: Recursive operator overloading overflows the C stack
not ok 193 - RT \#3270: Overloaded operator that returns an lvalue can be used as an lvalue # TODO RT #3270: Overloaded operators can not be treated as lvalues
# Failed test 34 - E acute -> e acute at uni/overload.t line 114
#      got "�"
# expected "�"
# Failed test 36 - E acute -> e acute at uni/overload.t line 117
#      got "�"
# expected "�"
# Failed test 38 - E acute -> e acute at uni/overload.t line 120
#      got "�"
# expected "�"
# Failed test 40 - e acute -> E acute at uni/overload.t line 125
#      got "�"
# expected "�"
# Failed test 42 - e acute -> E acute at uni/overload.t line 128
#      got "�"
# expected "�"
# Failed test 44 - e acute -> E acute at uni/overload.t line 131
#      got "�"
# expected "�"
# Failed test 46 - E acute -> e acute at uni/overload.t line 136
#      got "�"
# expected "�"
# Failed test 48 - E acute -> e acute at uni/overload.t line 139
#      got "�"
# expected "�"
# Failed test 50 - E acute -> e acute at uni/overload.t line 142
#      got "�"
# expected "�"
# Failed test 52 - e acute -> E acute at uni/overload.t line 147
#      got "�"
# expected "�"
# Failed test 54 - e acute -> E acute at uni/overload.t line 150
#      got "�"
# expected "�"
# Failed test 56 - e acute -> E acute at uni/overload.t line 153
#      got "�"
# expected "�"
Failed 12/193 subtests 

Test Summary Report
-------------------
uni/overload.t (Wstat: 0 Tests: 193 Failed: 12)
  Failed tests:  34, 36, 38, 40, 42, 44, 46, 48, 50, 52
                54, 56
Files=1, Tests=193,  0 wallclock secs ( 0.04 usr  0.00 sys +  0.05 cusr  0.00 csys =  0.09 CPU)
Result: FAIL

Bisecting with the following invocation:

perl Porting/bisect.pl -Duseithreads -Dcc=clang \
--target t/uni/overload.t \
--start bf2a3dae9f4f828fd1f2f8aaf4769f96520c9552 \
--end f83e59d8ea2781ba717b261b07d37a3df68a853c

... pointed to a7ff7ac

a7ff7aca3826600e5832ffe161fe075182f19a82 is the first bad commit
commit a7ff7aca3826600e5832ffe161fe075182f19a82
Author: Karl Williamson <khw@cpan.org>
Date:   Thu Mar 11 12:24:56 2021 -0700
Commit:     Karl Williamson <khw@cpan.org>
CommitDate: Tue Aug 9 18:05:59 2022 -0600

    locale.c: Use setlocale() for init, not P2008

@khwilliamson, can you take a look? Here's some locale data:

$ locale
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_TIME="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_ALL=

Thank you very much.

@jkeenan
Copy link
Contributor Author

jkeenan commented Aug 18, 2022

Status as of now (v5.37.2-208-gbf4a32d613):

$ ./perl -Ilib -V:config_args
config_args='-des -Dusedevel -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing';

$ cd t;./perl harness uni/overload.t; cd -
uni/overload.t .. 1/193 # Failed test 34 - E acute -> e acute at uni/overload.t line 114
#      got "�"
# expected "�"
# Failed test 36 - E acute -> e acute at uni/overload.t line 117
#      got "�"
# expected "�"
# Failed test 38 - E acute -> e acute at uni/overload.t line 120
#      got "�"
# expected "�"
# Failed test 40 - e acute -> E acute at uni/overload.t line 125
#      got "�"
# expected "�"
# Failed test 42 - e acute -> E acute at uni/overload.t line 128
#      got "�"
# expected "�"
# Failed test 44 - e acute -> E acute at uni/overload.t line 131
#      got "�"
# expected "�"
# Failed test 46 - E acute -> e acute at uni/overload.t line 136
#      got "�"
# expected "�"
# Failed test 48 - E acute -> e acute at uni/overload.t line 139
#      got "�"
# expected "�"
# Failed test 50 - E acute -> e acute at uni/overload.t line 142
#      got "�"
# expected "�"
# Failed test 52 - e acute -> E acute at uni/overload.t line 147
#      got "�"
# expected "�"
# Failed test 54 - e acute -> E acute at uni/overload.t line 150
#      got "�"
# expected "�"
# Failed test 56 - e acute -> E acute at uni/overload.t line 153
#      got "�"
# expected "�"
uni/overload.t .. Failed 12/193 subtests 

Test Summary Report
-------------------
uni/overload.t (Wstat: 0 Tests: 193 Failed: 12)
  Failed tests:  34, 36, 38, 40, 42, 44, 46, 48, 50, 52
                54, 56
Files=1, Tests=193,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.03 cusr  0.02 csys =  0.09 CPU)
Result: FAIL

@jkeenan
Copy link
Contributor Author

jkeenan commented Aug 18, 2022

Note: I'm not getting these test failures on unthreaded builds on this VM, nor am I getting them on threaded builds on my regular FreeBSD-12 machine. On the latter, locales are different from the FreeBSD-13 VM:

$ uname -mrs
FreeBSD 12.3-RELEASE-p1 amd64
$ locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

(I've never consciously modified locales on these machines. AFAICT, these are "out of the box.")

@khwilliamson
Copy link
Contributor

This turns out to be a freebsd bug
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265950

@jkeenan
Copy link
Contributor Author

jkeenan commented Aug 20, 2022

This turns out to be a freebsd bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265950

@khwilliamson, github did not do the right thing with that link. Suggest:
FreeBSD 265950

Is there anything we can do with either that test file or hints/freebsd.sh while we wait for them to repair that bug?

@khwilliamson
Copy link
Contributor

@khwilliamson
Copy link
Contributor

6c72dca should make the test pass

@jkeenan
Copy link
Contributor Author

jkeenan commented Aug 20, 2022

6c72dca should make the test pass

Thanks. Since this was a commit to blead, it will get incorporated into perl-5.37.3 dev release later today. I'll close the ticket in a day or two after watching results.

@jkeenan jkeenan self-assigned this Aug 20, 2022
@jkeenan
Copy link
Contributor Author

jkeenan commented Aug 27, 2022

6c72dca should make the test pass

Thanks. Since this was a commit to blead, it will get incorporated into perl-5.37.3 dev release later today. I'll close the ticket in a day or two after watching results.

The test is passing, so closing this ticket.

@jkeenan jkeenan closed this as completed Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants