← Back to Pull requests

Revert "Temporarily enable thread-safe locale emulation" #24846

Closed
unknown closed this pull request without merging on Sep 21, 2026 12:37 UTC
View on GitHub
unknown unknown commented on Sep 21, 2026 03:35 UTC
Author

This reverts commit 5c89d29f2741502a089e1627d9f70450acb84a9c.

Fixes #24844

lib/locale_threads.t will not hang forever, as it sets an alarm to prevent that. The alarm is currently at 10 minutes; but could be lessened.

Except for rebasing, this branch has been smoke-me'd without a problem showing up. Of course no one would notice the slowdown on those. We do not have a BSD CI, but I had checked the Darwin one to see if the testing there took appreciably longer, and I didn't think it did.

The branch has been smoke-me'd multiple times before with minor changes between them.

I think the eventual solution is to cut down the number of threads and/or iterations in the test to an acceptable wall clock time when thread-safe locales are emulated.

To get a feel for those numbers, I logged on to the FreeBSD machine I have access to. It is running 14.4-RELEASE-p3. And I now consistently get an assertion failure in running miniperl to finish the build of blead. This is a surprise, since the branch has had no problems in recent smoke-me builds on FreeBSD. I will investigate.

I think that here might be a good place to take a swipe at those OS vendors that have been lying to us for years that they support POSIX 2008 thread-safe locales. Our test suite passes on those only because we skip tests we know would fail. locale_threads.t doesn't execute on those boxes, except long enough to realize it would fail. So of course it would suddenly take up time when the box gets a thread-safe mode. And the test is designed to severely test claimed safety. Its slowness doesn't indicate that a typical work load would be significantly affected by the emulation. And if these OS'es performed as advertised, the emulation would not kick in, and locale_threads.t would finish in an acceptable time. If you are reading this, and have an "in" with the developer of any of these OS'es, please apprise them that this is more serious than they appear to think.

Solaris appears to have full thread-safe locale handling; and cygwin shortly will. Perl works around a bug in glibc on Linux, so they can be thread-safe, but the workaround slows things down. Windows has had thread-safe locales for 20 years, disregarding some bugs that have gotten fixed, but the difference in how they store text internally has led to a slow interface with us, as noticed in #21611.

This set of changes requires a perldelta entry, and it is included.

Diff: 307 lines (+230 / -77) across 3 files Reviewer: jkeenan Review duration: 541m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 307 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.343
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #24846"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.2% (MEDIUM) · Higher = larger blast radius
40.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.4% · Safe to merge
17.4%
Repository