Skip to content

Conversation

@sergey-miryanov
Copy link
Contributor

@sergey-miryanov sergey-miryanov commented Nov 24, 2025

@sergey-miryanov
Copy link
Contributor Author

@Fidget-Spinner Could you please take a look?

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reducing the test case.

@Fidget-Spinner Fidget-Spinner merged commit dc62b62 into python:main Nov 24, 2025
76 checks passed
@markshannon
Copy link
Member

Does this really fix the issue?
Without a proper analysis of the issue, I don't see how we can tell if this is fixed.

Is this a recent issue? When did it start?

@sergey-miryanov
Copy link
Contributor Author

@markshannon
Fix for this PR provided by @Fidget-Spinner

Failure bisected to a3b78a3

a3b78a3adecf794dc576404b14ed3f2c8401fdf1 is the first bad commit
commit a3b78a3adecf794dc576404b14ed3f2c8401fdf1
Author: Mikhail Efimov <efimov.mikhail@gmail.com>
Date:   Fri Nov 21 20:00:25 2025 +0300

    gh-141498: Change backoff counter to use prime numbers instead of powers of 2 (GH-141591)

 Include/internal/pycore_backoff.h                  | 68 +++++++++++++---------
 Lib/test/test_opcache.py                           |  2 +-
 .../2025-11-15-14-04-35.gh-issue-141589.VfdMDD.rst |  3 +
 3 files changed, 44 insertions(+), 29 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2025-11-15-14-04-35.gh-issue-141589.VfdMDD.rst

@markshannon
Copy link
Member

markshannon commented Nov 25, 2025

What's the root cause?
On the issue @Fidget-Spinner says "The problem is that it's possible for oparg to change under our feet".
What is causing the oparg to change and when?

@markshannon
Copy link
Member

Since the opcode/oparg pair are written atomically, the fix looks wrong.
If ENTER_EXECUTOR is overwritten (by instrumentation presumably) then the new this_instr->op.arg could easily be an invalid index.

@sergey-miryanov
Copy link
Contributor Author

I noticed that if I disable specialization (ENABLE_SPECIALIZATION=0) then failure is gone. However, I'm not sure if this is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants