Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevnsobolevn commented Feb 11, 2022

Affected tests:

  • ./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testInterruptCaught test_unittest -F
  • ./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testSecondInterrupt test_unittest -F
  • ./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testTwoResults test_unittest -F
  • ./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testHandlerReplacedButCalled test_unittest -F

Before:
Снимок экрана 2022-02-11 в 12 05 51

After (manually terminated):
Снимок экрана 2022-02-11 в 12 05 35

I simply re-arranged assert statements to make this pass: https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers

Maybe there's something more clever to do instead? 🙂

https://bugs.python.org/issue46709

@kumaraditya303
Copy link
Contributor

The tests were passing before so I guess it might have be caused due to a missing eval breaker in ceval.c in specialised bytecode to check for signals. Perhaps you can git bisect to see if this is the case?

@sobolevn
Copy link
MemberAuthor

The tests were passing before

They are still passing. Take a look:

Снимок экрана 2022-02-11 в 13 12 24

But, they are flaky.

it might have be caused due to a missing eval breaker in ceval.c in specialised bytecode to check for signals. Perhaps you can git bisect to see if this is the case?

I will take a look if there were recent changes. Thanks for the idea! 👍

@sobolevn
Copy link
MemberAuthor

sobolevn commented Feb 11, 2022

git bisect shows that this is the first failing commit: 3163e68

» git bisect good 3163e68c342434db37c69669017f96a4bb2d5f13 is the first bad commit commit 3163e68c342434db37c69669017f96a4bb2d5f13 Author: Ken Jin <[email protected]> Date: Wed Oct 20 07:16:36 2021 +0800 [bpo-44525](https://bugs.python.org/issue44525): Specialize ``CALL_FUNCTION`` for C function calls (GH-26934) Include/internal/pycore_code.h | 1 + Include/opcode.h | 51 +++---- Lib/opcode.py | 5 + .../2021-06-28-22-23-59.[bpo-44525](https://bugs.python.org/issue44525).sSvUKG.rst | 10 ++ Python/ceval.c | 147 +++++++++++++++++++++ Python/opcode_targets.h | 54 ++++---- Python/specialize.c | 147 +++++++++++++++++++++ 7 files changed, 365 insertions(+), 50 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-06-28-22-23-59.[bpo-44525](https://bugs.python.org/issue44525).sSvUKG.rst 

CC @Fidget-Spinner

@sobolevn
Copy link
MemberAuthor

I think the proper fix would be adding CHECK_EVAL_BREAKER(); into specialized CALL_NO_KW_ opcodes. Testing this out 🤔

@sobolevn
Copy link
MemberAuthor

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

Labels

awaiting reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@sobolevn@kumaraditya303@the-knights-who-say-ni@bedevere-bot