-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-139653: Remove assertions in _Py_InitializeRecursionLimits() #141551
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
Conversation
These checks were invalid and failed randomly on FreeBSD.
It also fails on Alpine Linux. |
|
If an assertion is failing, fix whatever is causing the invariant to be broken. Don't just remove the assert. Please revert this change, and make an issue for the failures. Especially if it is "failing randomly". It is a necessary invariant that the stack pointer lie between the top of the stack and the soft limit. If that is not the case, we need to fix it. |
|
This PR is to repair FreeBSD and Alpine buildbots. These buildbot workers were crashing randomly (with an assertion error in fact). I suppose that WASI had the same issue but it was more likely on WASI so I already skipped the assertion on WASI.
It's the following assertion which fails randomly: uintptr_t here_addr = _Py_get_machine_stack_pointer();
....
assert(here_addr < ts->c_stack_top);The code to get the stack top in uintptr_t top_addr = _Py_SIZE_ROUND_UP(here_addr, 4096);Maybe one problem is that the assertion is not checked in the same function than I don't have time to investigate this issue right now. I suppose that you should be able to reproduce it if you disable the |
It doesn't repair anything. It just leaves a latent bug to blow up later.
Then fix that, or make an issue for me to fix. Please don't turn off asserts without any review.
Sure, let's move the assert to make the point of failure clearer.
I'll try that. |
…pythonGH-141551) These checks were invalid and failed randomly on FreeBSD and Alpine Linux.
…python#141551) These checks were invalid and failed randomly on FreeBSD and Alpine Linux.
These checks were invalid and failed randomly on FreeBSD.