Skip to content

sys::thread_local::key::tests::destructors fails under x86 Windows 7 #141300

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

Open
PaulDance opened this issue May 20, 2025 · 6 comments
Open

sys::thread_local::key::tests::destructors fails under x86 Windows 7 #141300

PaulDance opened this issue May 20, 2025 · 6 comments
Labels
A-atomic Area: Atomics, barriers, and sync primitives A-destructors Area: Destructors (`Drop`, …) A-testsuite Area: The testsuite used to check the correctness of rustc A-thread-locals Area: Thread local storage (TLS) C-bug Category: This is a bug. O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. O-windows-msvc Toolchain: MSVC, Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) (IA-32) P-low Low priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@PaulDance
Copy link
Contributor

PaulDance commented May 20, 2025

Code

Running the sys::thread_local::key::tests::destructors test under x86 Windows 7 (i686-win7-windows-msvc) currently fails with the following error:

thread 'sys::thread_local::key::tests::destructors' panicked at library/std/src/sys/thread_local/key/tests.rs:57:5:
assertion `left == right` failed: destructor should have dropped the other reference on thread exit
  left: 2
 right: 1

Version it worked on

The test does not fail when using dev @ 3c5aef3, or a7c39b6 if only considering first-parent master merge commits.

Version with regression

It starts to fail with the following 67a97ba commit of the same 077cedc rollup. It still fails more recently with 2b96ddc.

This is therefore definitely caused by #140007. That makes sense considering there hasn't been much other changes to the target recently. However, it is concerning because the target should still have emulated TLS, as intended by the PR "at fault". There could thus be a problem with the TLS emulation itself.

@rustbot label A-atomic A-thread-locals A-destructors A-testsuite O-x86_32 O-windows-7 O-windows-msvc

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged

@PaulDance PaulDance added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels May 20, 2025
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. I-prioritize Issue: Indicates that prioritization has been requested for this issue. A-atomic Area: Atomics, barriers, and sync primitives A-destructors Area: Destructors (`Drop`, …) A-testsuite Area: The testsuite used to check the correctness of rustc A-thread-locals Area: Thread local storage (TLS) O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. O-windows-msvc Toolchain: MSVC, Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) (IA-32) labels May 20, 2025
@jieyouxu jieyouxu added T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 21, 2025
@jieyouxu
Copy link
Member

FYI @roblabla

@rustbot rustbot added regression-from-stable-to-beta Performance or correctness regression from stable to beta. and removed regression-untriaged Untriaged performance or correctness regression. labels May 21, 2025
@PaulDance
Copy link
Contributor Author

@jieyouxu good accuracy on that blind shot 😄

@jieyouxu
Copy link
Member

@jieyouxu good accuracy on that blind shot 😄

(It's not a blindshot, they're the target maintainer of i686-win7-windows-msvc, and it was a heads-up for their information.)

@jieyouxu jieyouxu added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 21, 2025
@PaulDance
Copy link
Contributor Author

PaulDance commented May 21, 2025

It's not a blindshot

Yes yes, I know, sorry. I just found it a little funny that it landed on the most precise ping possible in the end considering the changes at fault, but right from the very start 😉

@PaulDance
Copy link
Contributor Author

PaulDance commented May 21, 2025

By the way, we're working at the same company and in the same team, so I can already confirm the issue has been noted. We'll continue on investigating it in order to try finding a more specific cause and a potential proper fix.

@jieyouxu jieyouxu removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label May 21, 2025
@jieyouxu
Copy link
Member

Assigning P-low as per discussion.

@rustbot label: -I-prioritize +P-low

@rustbot rustbot added P-low Low priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels May 21, 2025
@jieyouxu jieyouxu added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-atomic Area: Atomics, barriers, and sync primitives A-destructors Area: Destructors (`Drop`, …) A-testsuite Area: The testsuite used to check the correctness of rustc A-thread-locals Area: Thread local storage (TLS) C-bug Category: This is a bug. O-windows-7 OS: Windows 7 or Windows Server 2008 R2 or etc. O-windows-msvc Toolchain: MSVC, Operating system: Windows O-x86_32 Target: x86 processors, 32 bit (like i686-*) (IA-32) P-low Low priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants