-
Notifications
You must be signed in to change notification settings - Fork 603
Closed
Description
Commits within the last two days or so have caused massive new test failures on threaded builds on the OpenBSD operating system.
These failures are evident in these two smoke-test reports:
-
OpenBSD-6.6: https://perl5.test-smoke.org/report/5010661 | v5.35.3-119-g75595dd289
-
OpenBSD-6.9: https://perl5.test-smoke.org/report/5010672 | v5.35.3-123-g0ae3a5cd82
The tests fail in a variety of ways. t/run/switches.t reports a core dump.
t/run/switches ................................................... # Failed test 121 - threads while in-place editing at ./test.pl line 1077
# got "Bizarre SvTYPE [85] at - line 6.\nSegmentation fault (core dumped) "
# expected "ok"
# PROG:
# use threads;
# use strict;
# @ARGV = ("tmp19365G/foo");
# $^I = "";
# while (<>) {
# threads->create(sub { })->join;
# print "yy\n";
# }
# print "ok\n";
# STATUS: 35584
# Failed test 123 - file successfully saved after chdir at run/switches.t line 527
# got "xx\n"
# expected "yy\n"
# Failed test 129 - no extra files at run/switches.t line 613
# got "1"
# expected "0"
# Found EJhBZH6a, expected none
FAILED at test 121
Also observed:
t/io/msg ......................................................... SysV.c: loadable library and perl binaries are mismatched (got handshake key 0xeae458d19b8, needed 0xeaea47840c0)
FAILED--no leader found
...
t/io/sem ......................................................... SysV.c: loadable library and perl binaries are mismatched (got handshake key 0xd18ea8c59e8, needed 0xd19956ae0c0)
FAILED--no leader found
...
t/io/shm ......................................................... SysV.c: loadable library and perl binaries are mismatched (got handshake key 0x14e851d9928, needed 0x14ddced40c0)
FAILED--no leader found
Unthreaded builds appear to be okay so far.
Bisecting with the following invocation ...
perl Porting/bisect.pl -Duseithreads --target=t/io/sem.t \
--start=756f0910f9 --end=75595dd289
... points to the following commit:
commit 3683a9ee5ad61f8cb5eac30e61b4936bd0445bdb (refs/bisect/bad)
Author: Nicholas Clark <nick@ccl4.org>
AuthorDate: Sun Jun 20 17:24:15 2021 +0000
Commit: Tony Cook <tony@develop-help.com>
CommitDate: Tue Sep 7 15:46:16 2021 +1000
If we have thread local storage, use it instead of posix_getspecific().
Declare and use a variable PL_current_context to store a pointer to the
thread's interpreter struct. Use this to implement implicit context undef
ITHREADS, instead of a call to posix_getspecific().
For normal threaded code, this will eliminate function calls. For threaded
code in shared objects (the typical configuration for Linux distribution
builds) there still needs to be a function call to get the pointer to
thread local variables, but there will only be one per function, not one
per read of the variable.
@nwc10, @tonycoz, can you take a look?
Thank you very much.
Jim Keenan
rwp0rwp0