Skip to content
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

GH-96793: Change FOR_ITER to not pop the iterator on exhaustion. #96801

Merged
merged 12 commits into from
Oct 27, 2022

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Sep 13, 2022

Requires an additional POP_TOP at the end of the loop. By itself, this would be a pointless change, but as part of #96793 it makes sense.

Pyperformance shows a 1% slowdown but I suspect that is a bit noisy. The 11% slowdown of unpack_sequence makes no sense.
Given the dispatching overhead is in the 10-15% and FOR_ITER represents 1-2% of instructions executed we would expect at worst a 0.3% slowdown.

I will get performance numbers for the whole of #96793 before merging the parts.

@markshannon
Copy link
Member Author

With the tweaks to skip the POP_TOP in specialized forms the performance results are in the noise.

@markshannon markshannon marked this pull request as ready for review October 25, 2022 15:40
SPECIALIZATION_FAIL(FOR_ITER,
_PySpecialization_ClassifyIterator(iter));
goto failure;
if (_Py_OPCODE(instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1]) == POP_TOP) {
Copy link
Member

Choose a reason for hiding this comment

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

Why would it not be POP_TOP?

Copy link
Member Author

Choose a reason for hiding this comment

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

The compiler did something clever.
I don't know what that might be, but I don't want to rely on the compiler not transforming the code.

@markshannon
Copy link
Member Author

I'm considering changing the POP_TOP to END_LOOP which would avoid that problem and some others related to handling generator return values.

@markshannon
Copy link
Member Author

Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

LGTM

@markshannon markshannon merged commit 22863df into python:main Oct 27, 2022
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 3.x has failed when building commit 22863df.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/179/builds/3267) and take a look at the build logs.
  4. Check if the failure is related to this commit (22863df) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/179/builds/3267

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 58, done.�[K
remote: Counting objects:   1% (1/58)�[K
remote: Counting objects:   3% (2/58)�[K
remote: Counting objects:   5% (3/58)�[K
remote: Counting objects:   6% (4/58)�[K
remote: Counting objects:   8% (5/58)�[K
remote: Counting objects:  10% (6/58)�[K
remote: Counting objects:  12% (7/58)�[K
remote: Counting objects:  13% (8/58)�[K
remote: Counting objects:  15% (9/58)�[K
remote: Counting objects:  17% (10/58)�[K
remote: Counting objects:  18% (11/58)�[K
remote: Counting objects:  20% (12/58)�[K
remote: Counting objects:  22% (13/58)�[K
remote: Counting objects:  24% (14/58)�[K
remote: Counting objects:  25% (15/58)�[K
remote: Counting objects:  27% (16/58)�[K
remote: Counting objects:  29% (17/58)�[K
remote: Counting objects:  31% (18/58)�[K
remote: Counting objects:  32% (19/58)�[K
remote: Counting objects:  34% (20/58)�[K
remote: Counting objects:  36% (21/58)�[K
remote: Counting objects:  37% (22/58)�[K
remote: Counting objects:  39% (23/58)�[K
remote: Counting objects:  41% (24/58)�[K
remote: Counting objects:  43% (25/58)�[K
remote: Counting objects:  44% (26/58)�[K
remote: Counting objects:  46% (27/58)�[K
remote: Counting objects:  48% (28/58)�[K
remote: Counting objects:  50% (29/58)�[K
remote: Counting objects:  51% (30/58)�[K
remote: Counting objects:  53% (31/58)�[K
remote: Counting objects:  55% (32/58)�[K
remote: Counting objects:  56% (33/58)�[K
remote: Counting objects:  58% (34/58)�[K
remote: Counting objects:  60% (35/58)�[K
remote: Counting objects:  62% (36/58)�[K
remote: Counting objects:  63% (37/58)�[K
remote: Counting objects:  65% (38/58)�[K
remote: Counting objects:  67% (39/58)�[K
remote: Counting objects:  68% (40/58)�[K
remote: Counting objects:  70% (41/58)�[K
remote: Counting objects:  72% (42/58)�[K
remote: Counting objects:  74% (43/58)�[K
remote: Counting objects:  75% (44/58)�[K
remote: Counting objects:  77% (45/58)�[K
remote: Counting objects:  79% (46/58)�[K
remote: Counting objects:  81% (47/58)�[K
remote: Counting objects:  82% (48/58)�[K
remote: Counting objects:  84% (49/58)�[K
remote: Counting objects:  86% (50/58)�[K
remote: Counting objects:  87% (51/58)�[K
remote: Counting objects:  89% (52/58)�[K
remote: Counting objects:  91% (53/58)�[K
remote: Counting objects:  93% (54/58)�[K
remote: Counting objects:  94% (55/58)�[K
remote: Counting objects:  96% (56/58)�[K
remote: Counting objects:  98% (57/58)�[K
remote: Counting objects: 100% (58/58)�[K
remote: Counting objects: 100% (58/58), done.�[K
remote: Compressing objects:   3% (1/28)�[K
remote: Compressing objects:   7% (2/28)�[K
remote: Compressing objects:  10% (3/28)�[K
remote: Compressing objects:  14% (4/28)�[K
remote: Compressing objects:  17% (5/28)�[K
remote: Compressing objects:  21% (6/28)�[K
remote: Compressing objects:  25% (7/28)�[K
remote: Compressing objects:  28% (8/28)�[K
remote: Compressing objects:  32% (9/28)�[K
remote: Compressing objects:  35% (10/28)�[K
remote: Compressing objects:  39% (11/28)�[K
remote: Compressing objects:  42% (12/28)�[K
remote: Compressing objects:  46% (13/28)�[K
remote: Compressing objects:  50% (14/28)�[K
remote: Compressing objects:  53% (15/28)�[K
remote: Compressing objects:  57% (16/28)�[K
remote: Compressing objects:  60% (17/28)�[K
remote: Compressing objects:  64% (18/28)�[K
remote: Compressing objects:  67% (19/28)�[K
remote: Compressing objects:  71% (20/28)�[K
remote: Compressing objects:  75% (21/28)�[K
remote: Compressing objects:  78% (22/28)�[K
remote: Compressing objects:  82% (23/28)�[K
remote: Compressing objects:  85% (24/28)�[K
remote: Compressing objects:  89% (25/28)�[K
remote: Compressing objects:  92% (26/28)�[K
remote: Compressing objects:  96% (27/28)�[K
remote: Compressing objects: 100% (28/28)�[K
remote: Compressing objects: 100% (28/28), done.�[K
remote: Total 30 (delta 28), reused 3 (delta 2), pack-reused 0�[K
From https://github.com/python/cpython
 * branch            main       -> FETCH_HEAD
Note: checking out '22863df7ca5f9cd01a40ab3dce3d067ec5666081'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 22863df... GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
Switched to and reset branch 'main'

_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `((next_instr[(sizeof(_PyForIterCache)/sizeof(_Py_CODEUNIT)) + oparg] == 4) >> 8)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `((next_instr[(sizeof(_PyForIterCache)/sizeof(_Py_CODEUNIT)) + oparg] == 4) >> 8)' failed.
make: *** [Python/frozen_modules/abc.h] Aborted
make: *** Waiting for unfinished jobs....
make: *** [Python/frozen_modules/codecs.h] Aborted
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `((next_instr[(sizeof(_PyForIterCache)/sizeof(_Py_CODEUNIT)) + oparg] == 4) >> 8)' failed.
make: *** [Python/frozen_modules/io.h] Aborted
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `((next_instr[(sizeof(_PyForIterCache)/sizeof(_Py_CODEUNIT)) + oparg] == 4) >> 8)' failed.
make: *** [Python/frozen_modules/_collections_abc.h] Aborted

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora 3.x has failed when building commit 22863df.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/223/builds/2756) and take a look at the build logs.
  4. Check if the failure is related to this commit (22863df) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/223/builds/2756

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 58, done.        
remote: Counting objects:   1% (1/58)        
remote: Counting objects:   3% (2/58)        
remote: Counting objects:   5% (3/58)        
remote: Counting objects:   6% (4/58)        
remote: Counting objects:   8% (5/58)        
remote: Counting objects:  10% (6/58)        
remote: Counting objects:  12% (7/58)        
remote: Counting objects:  13% (8/58)        
remote: Counting objects:  15% (9/58)        
remote: Counting objects:  17% (10/58)        
remote: Counting objects:  18% (11/58)        
remote: Counting objects:  20% (12/58)        
remote: Counting objects:  22% (13/58)        
remote: Counting objects:  24% (14/58)        
remote: Counting objects:  25% (15/58)        
remote: Counting objects:  27% (16/58)        
remote: Counting objects:  29% (17/58)        
remote: Counting objects:  31% (18/58)        
remote: Counting objects:  32% (19/58)        
remote: Counting objects:  34% (20/58)        
remote: Counting objects:  36% (21/58)        
remote: Counting objects:  37% (22/58)        
remote: Counting objects:  39% (23/58)        
remote: Counting objects:  41% (24/58)        
remote: Counting objects:  43% (25/58)        
remote: Counting objects:  44% (26/58)        
remote: Counting objects:  46% (27/58)        
remote: Counting objects:  48% (28/58)        
remote: Counting objects:  50% (29/58)        
remote: Counting objects:  51% (30/58)        
remote: Counting objects:  53% (31/58)        
remote: Counting objects:  55% (32/58)        
remote: Counting objects:  56% (33/58)        
remote: Counting objects:  58% (34/58)        
remote: Counting objects:  60% (35/58)        
remote: Counting objects:  62% (36/58)        
remote: Counting objects:  63% (37/58)        
remote: Counting objects:  65% (38/58)        
remote: Counting objects:  67% (39/58)        
remote: Counting objects:  68% (40/58)        
remote: Counting objects:  70% (41/58)        
remote: Counting objects:  72% (42/58)        
remote: Counting objects:  74% (43/58)        
remote: Counting objects:  75% (44/58)        
remote: Counting objects:  77% (45/58)        
remote: Counting objects:  79% (46/58)        
remote: Counting objects:  81% (47/58)        
remote: Counting objects:  82% (48/58)        
remote: Counting objects:  84% (49/58)        
remote: Counting objects:  86% (50/58)        
remote: Counting objects:  87% (51/58)        
remote: Counting objects:  89% (52/58)        
remote: Counting objects:  91% (53/58)        
remote: Counting objects:  93% (54/58)        
remote: Counting objects:  94% (55/58)        
remote: Counting objects:  96% (56/58)        
remote: Counting objects:  98% (57/58)        
remote: Counting objects: 100% (58/58)        
remote: Counting objects: 100% (58/58), done.        
remote: Compressing objects:   3% (1/28)        
remote: Compressing objects:   7% (2/28)        
remote: Compressing objects:  10% (3/28)        
remote: Compressing objects:  14% (4/28)        
remote: Compressing objects:  17% (5/28)        
remote: Compressing objects:  21% (6/28)        
remote: Compressing objects:  25% (7/28)        
remote: Compressing objects:  28% (8/28)        
remote: Compressing objects:  32% (9/28)        
remote: Compressing objects:  35% (10/28)        
remote: Compressing objects:  39% (11/28)        
remote: Compressing objects:  42% (12/28)        
remote: Compressing objects:  46% (13/28)        
remote: Compressing objects:  50% (14/28)        
remote: Compressing objects:  53% (15/28)        
remote: Compressing objects:  57% (16/28)        
remote: Compressing objects:  60% (17/28)        
remote: Compressing objects:  64% (18/28)        
remote: Compressing objects:  67% (19/28)        
remote: Compressing objects:  71% (20/28)        
remote: Compressing objects:  75% (21/28)        
remote: Compressing objects:  78% (22/28)        
remote: Compressing objects:  82% (23/28)        
remote: Compressing objects:  85% (24/28)        
remote: Compressing objects:  89% (25/28)        
remote: Compressing objects:  92% (26/28)        
remote: Compressing objects:  96% (27/28)        
remote: Compressing objects: 100% (28/28)        
remote: Compressing objects: 100% (28/28), done.        
remote: Total 30 (delta 28), reused 3 (delta 2), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '22863df7ca5f9cd01a40ab3dce3d067ec5666081'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 22863df7ca GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
Switched to and reset branch 'main'

_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
make: *** [Makefile:1242: Python/frozen_modules/codecs.h] Aborted (core dumped)
make: *** Waiting for unfinished jobs....
make: *** [Makefile:1239: Python/frozen_modules/abc.h] Aborted (core dumped)
make: *** [Makefile:1245: Python/frozen_modules/io.h] Aborted (core dumped)
make: *** [Makefile:1251: Python/frozen_modules/_sitebuiltins.h] Aborted (core dumped)
make: *** [Makefile:1248: Python/frozen_modules/_collections_abc.h] Aborted (core dumped)
make: *** [Makefile:1254: Python/frozen_modules/genericpath.h] Aborted (core dumped)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x SLES 3.x has failed when building commit 22863df.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/540/builds/3868) and take a look at the build logs.
  4. Check if the failure is related to this commit (22863df) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/540/builds/3868

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 58, done.        
remote: Counting objects:   1% (1/58)        
remote: Counting objects:   3% (2/58)        
remote: Counting objects:   5% (3/58)        
remote: Counting objects:   6% (4/58)        
remote: Counting objects:   8% (5/58)        
remote: Counting objects:  10% (6/58)        
remote: Counting objects:  12% (7/58)        
remote: Counting objects:  13% (8/58)        
remote: Counting objects:  15% (9/58)        
remote: Counting objects:  17% (10/58)        
remote: Counting objects:  18% (11/58)        
remote: Counting objects:  20% (12/58)        
remote: Counting objects:  22% (13/58)        
remote: Counting objects:  24% (14/58)        
remote: Counting objects:  25% (15/58)        
remote: Counting objects:  27% (16/58)        
remote: Counting objects:  29% (17/58)        
remote: Counting objects:  31% (18/58)        
remote: Counting objects:  32% (19/58)        
remote: Counting objects:  34% (20/58)        
remote: Counting objects:  36% (21/58)        
remote: Counting objects:  37% (22/58)        
remote: Counting objects:  39% (23/58)        
remote: Counting objects:  41% (24/58)        
remote: Counting objects:  43% (25/58)        
remote: Counting objects:  44% (26/58)        
remote: Counting objects:  46% (27/58)        
remote: Counting objects:  48% (28/58)        
remote: Counting objects:  50% (29/58)        
remote: Counting objects:  51% (30/58)        
remote: Counting objects:  53% (31/58)        
remote: Counting objects:  55% (32/58)        
remote: Counting objects:  56% (33/58)        
remote: Counting objects:  58% (34/58)        
remote: Counting objects:  60% (35/58)        
remote: Counting objects:  62% (36/58)        
remote: Counting objects:  63% (37/58)        
remote: Counting objects:  65% (38/58)        
remote: Counting objects:  67% (39/58)        
remote: Counting objects:  68% (40/58)        
remote: Counting objects:  70% (41/58)        
remote: Counting objects:  72% (42/58)        
remote: Counting objects:  74% (43/58)        
remote: Counting objects:  75% (44/58)        
remote: Counting objects:  77% (45/58)        
remote: Counting objects:  79% (46/58)        
remote: Counting objects:  81% (47/58)        
remote: Counting objects:  82% (48/58)        
remote: Counting objects:  84% (49/58)        
remote: Counting objects:  86% (50/58)        
remote: Counting objects:  87% (51/58)        
remote: Counting objects:  89% (52/58)        
remote: Counting objects:  91% (53/58)        
remote: Counting objects:  93% (54/58)        
remote: Counting objects:  94% (55/58)        
remote: Counting objects:  96% (56/58)        
remote: Counting objects:  98% (57/58)        
remote: Counting objects: 100% (58/58)        
remote: Counting objects: 100% (58/58), done.        
remote: Compressing objects:   3% (1/28)        
remote: Compressing objects:   7% (2/28)        
remote: Compressing objects:  10% (3/28)        
remote: Compressing objects:  14% (4/28)        
remote: Compressing objects:  17% (5/28)        
remote: Compressing objects:  21% (6/28)        
remote: Compressing objects:  25% (7/28)        
remote: Compressing objects:  28% (8/28)        
remote: Compressing objects:  32% (9/28)        
remote: Compressing objects:  35% (10/28)        
remote: Compressing objects:  39% (11/28)        
remote: Compressing objects:  42% (12/28)        
remote: Compressing objects:  46% (13/28)        
remote: Compressing objects:  50% (14/28)        
remote: Compressing objects:  53% (15/28)        
remote: Compressing objects:  57% (16/28)        
remote: Compressing objects:  60% (17/28)        
remote: Compressing objects:  64% (18/28)        
remote: Compressing objects:  67% (19/28)        
remote: Compressing objects:  71% (20/28)        
remote: Compressing objects:  75% (21/28)        
remote: Compressing objects:  78% (22/28)        
remote: Compressing objects:  82% (23/28)        
remote: Compressing objects:  85% (24/28)        
remote: Compressing objects:  89% (25/28)        
remote: Compressing objects:  92% (26/28)        
remote: Compressing objects:  96% (27/28)        
remote: Compressing objects: 100% (28/28)        
remote: Compressing objects: 100% (28/28), done.        
remote: Total 30 (delta 28), reused 3 (delta 2), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '22863df7ca5f9cd01a40ab3dce3d067ec5666081'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 22863df7ca GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
Switched to and reset branch 'main'

_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
make: *** [Makefile:1248: Python/frozen_modules/_sitebuiltins.h] Aborted (core dumped)
make: *** Waiting for unfinished jobs....
make: *** [Makefile:1236: Python/frozen_modules/abc.h] Aborted (core dumped)
make: *** [Makefile:1245: Python/frozen_modules/_collections_abc.h] Aborted (core dumped)
make: *** [Makefile:1251: Python/frozen_modules/genericpath.h] Aborted (core dumped)
make: *** [Makefile:1242: Python/frozen_modules/io.h] Aborted (core dumped)
make: *** [Makefile:1239: Python/frozen_modules/codecs.h] Aborted (core dumped)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 3.x has failed when building commit 22863df.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/509/builds/3030) and take a look at the build logs.
  4. Check if the failure is related to this commit (22863df) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/509/builds/3030

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 58, done.        
remote: Counting objects:   1% (1/58)        
remote: Counting objects:   3% (2/58)        
remote: Counting objects:   5% (3/58)        
remote: Counting objects:   6% (4/58)        
remote: Counting objects:   8% (5/58)        
remote: Counting objects:  10% (6/58)        
remote: Counting objects:  12% (7/58)        
remote: Counting objects:  13% (8/58)        
remote: Counting objects:  15% (9/58)        
remote: Counting objects:  17% (10/58)        
remote: Counting objects:  18% (11/58)        
remote: Counting objects:  20% (12/58)        
remote: Counting objects:  22% (13/58)        
remote: Counting objects:  24% (14/58)        
remote: Counting objects:  25% (15/58)        
remote: Counting objects:  27% (16/58)        
remote: Counting objects:  29% (17/58)        
remote: Counting objects:  31% (18/58)        
remote: Counting objects:  32% (19/58)        
remote: Counting objects:  34% (20/58)        
remote: Counting objects:  36% (21/58)        
remote: Counting objects:  37% (22/58)        
remote: Counting objects:  39% (23/58)        
remote: Counting objects:  41% (24/58)        
remote: Counting objects:  43% (25/58)        
remote: Counting objects:  44% (26/58)        
remote: Counting objects:  46% (27/58)        
remote: Counting objects:  48% (28/58)        
remote: Counting objects:  50% (29/58)        
remote: Counting objects:  51% (30/58)        
remote: Counting objects:  53% (31/58)        
remote: Counting objects:  55% (32/58)        
remote: Counting objects:  56% (33/58)        
remote: Counting objects:  58% (34/58)        
remote: Counting objects:  60% (35/58)        
remote: Counting objects:  62% (36/58)        
remote: Counting objects:  63% (37/58)        
remote: Counting objects:  65% (38/58)        
remote: Counting objects:  67% (39/58)        
remote: Counting objects:  68% (40/58)        
remote: Counting objects:  70% (41/58)        
remote: Counting objects:  72% (42/58)        
remote: Counting objects:  74% (43/58)        
remote: Counting objects:  75% (44/58)        
remote: Counting objects:  77% (45/58)        
remote: Counting objects:  79% (46/58)        
remote: Counting objects:  81% (47/58)        
remote: Counting objects:  82% (48/58)        
remote: Counting objects:  84% (49/58)        
remote: Counting objects:  86% (50/58)        
remote: Counting objects:  87% (51/58)        
remote: Counting objects:  89% (52/58)        
remote: Counting objects:  91% (53/58)        
remote: Counting objects:  93% (54/58)        
remote: Counting objects:  94% (55/58)        
remote: Counting objects:  96% (56/58)        
remote: Counting objects:  98% (57/58)        
remote: Counting objects: 100% (58/58)        
remote: Counting objects: 100% (58/58), done.        
remote: Compressing objects:   3% (1/28)        
remote: Compressing objects:   7% (2/28)        
remote: Compressing objects:  10% (3/28)        
remote: Compressing objects:  14% (4/28)        
remote: Compressing objects:  17% (5/28)        
remote: Compressing objects:  21% (6/28)        
remote: Compressing objects:  25% (7/28)        
remote: Compressing objects:  28% (8/28)        
remote: Compressing objects:  32% (9/28)        
remote: Compressing objects:  35% (10/28)        
remote: Compressing objects:  39% (11/28)        
remote: Compressing objects:  42% (12/28)        
remote: Compressing objects:  46% (13/28)        
remote: Compressing objects:  50% (14/28)        
remote: Compressing objects:  53% (15/28)        
remote: Compressing objects:  57% (16/28)        
remote: Compressing objects:  60% (17/28)        
remote: Compressing objects:  64% (18/28)        
remote: Compressing objects:  67% (19/28)        
remote: Compressing objects:  71% (20/28)        
remote: Compressing objects:  75% (21/28)        
remote: Compressing objects:  78% (22/28)        
remote: Compressing objects:  82% (23/28)        
remote: Compressing objects:  85% (24/28)        
remote: Compressing objects:  89% (25/28)        
remote: Compressing objects:  92% (26/28)        
remote: Compressing objects:  96% (27/28)        
remote: Compressing objects: 100% (28/28)        
remote: Compressing objects: 100% (28/28), done.        
remote: Total 30 (delta 28), reused 3 (delta 2), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '22863df7ca5f9cd01a40ab3dce3d067ec5666081'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 22863df7ca GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
Switched to and reset branch 'main'

_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: _PyEval_EvalFrameDefault: Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
make: *** [Makefile:1247: Python/frozen_modules/io.h] Aborted (core dumped)
make: *** Waiting for unfinished jobs....
make: *** [Makefile:1250: Python/frozen_modules/_collections_abc.h] Aborted (core dumped)
make: *** [Makefile:1241: Python/frozen_modules/abc.h] Aborted (core dumped)
make: *** [Makefile:1253: Python/frozen_modules/_sitebuiltins.h] Aborted (core dumped)
make: *** [Makefile:1256: Python/frozen_modules/genericpath.h] Aborted (core dumped)
make: *** [Makefile:1244: Python/frozen_modules/codecs.h] Aborted (core dumped)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Clang 3.x has failed when building commit 22863df.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/3/builds/2855) and take a look at the build logs.
  4. Check if the failure is related to this commit (22863df) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/3/builds/2855

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 58, done.        
remote: Counting objects:   1% (1/58)        
remote: Counting objects:   3% (2/58)        
remote: Counting objects:   5% (3/58)        
remote: Counting objects:   6% (4/58)        
remote: Counting objects:   8% (5/58)        
remote: Counting objects:  10% (6/58)        
remote: Counting objects:  12% (7/58)        
remote: Counting objects:  13% (8/58)        
remote: Counting objects:  15% (9/58)        
remote: Counting objects:  17% (10/58)        
remote: Counting objects:  18% (11/58)        
remote: Counting objects:  20% (12/58)        
remote: Counting objects:  22% (13/58)        
remote: Counting objects:  24% (14/58)        
remote: Counting objects:  25% (15/58)        
remote: Counting objects:  27% (16/58)        
remote: Counting objects:  29% (17/58)        
remote: Counting objects:  31% (18/58)        
remote: Counting objects:  32% (19/58)        
remote: Counting objects:  34% (20/58)        
remote: Counting objects:  36% (21/58)        
remote: Counting objects:  37% (22/58)        
remote: Counting objects:  39% (23/58)        
remote: Counting objects:  41% (24/58)        
remote: Counting objects:  43% (25/58)        
remote: Counting objects:  44% (26/58)        
remote: Counting objects:  46% (27/58)        
remote: Counting objects:  48% (28/58)        
remote: Counting objects:  50% (29/58)        
remote: Counting objects:  51% (30/58)        
remote: Counting objects:  53% (31/58)        
remote: Counting objects:  55% (32/58)        
remote: Counting objects:  56% (33/58)        
remote: Counting objects:  58% (34/58)        
remote: Counting objects:  60% (35/58)        
remote: Counting objects:  62% (36/58)        
remote: Counting objects:  63% (37/58)        
remote: Counting objects:  65% (38/58)        
remote: Counting objects:  67% (39/58)        
remote: Counting objects:  68% (40/58)        
remote: Counting objects:  70% (41/58)        
remote: Counting objects:  72% (42/58)        
remote: Counting objects:  74% (43/58)        
remote: Counting objects:  75% (44/58)        
remote: Counting objects:  77% (45/58)        
remote: Counting objects:  79% (46/58)        
remote: Counting objects:  81% (47/58)        
remote: Counting objects:  82% (48/58)        
remote: Counting objects:  84% (49/58)        
remote: Counting objects:  86% (50/58)        
remote: Counting objects:  87% (51/58)        
remote: Counting objects:  89% (52/58)        
remote: Counting objects:  91% (53/58)        
remote: Counting objects:  93% (54/58)        
remote: Counting objects:  94% (55/58)        
remote: Counting objects:  96% (56/58)        
remote: Counting objects:  98% (57/58)        
remote: Counting objects: 100% (58/58)        
remote: Counting objects: 100% (58/58), done.        
remote: Compressing objects:   3% (1/27)        
remote: Compressing objects:   7% (2/27)        
remote: Compressing objects:  11% (3/27)        
remote: Compressing objects:  14% (4/27)        
remote: Compressing objects:  18% (5/27)        
remote: Compressing objects:  22% (6/27)        
remote: Compressing objects:  25% (7/27)        
remote: Compressing objects:  29% (8/27)        
remote: Compressing objects:  33% (9/27)        
remote: Compressing objects:  37% (10/27)        
remote: Compressing objects:  40% (11/27)        
remote: Compressing objects:  44% (12/27)        
remote: Compressing objects:  48% (13/27)        
remote: Compressing objects:  51% (14/27)        
remote: Compressing objects:  55% (15/27)        
remote: Compressing objects:  59% (16/27)        
remote: Compressing objects:  62% (17/27)        
remote: Compressing objects:  66% (18/27)        
remote: Compressing objects:  70% (19/27)        
remote: Compressing objects:  74% (20/27)        
remote: Compressing objects:  77% (21/27)        
remote: Compressing objects:  81% (22/27)        
remote: Compressing objects:  85% (23/27)        
remote: Compressing objects:  88% (24/27)        
remote: Compressing objects:  92% (25/27)        
remote: Compressing objects:  96% (26/27)        
remote: Compressing objects: 100% (27/27)        
remote: Compressing objects: 100% (27/27), done.        
remote: Total 30 (delta 28), reused 4 (delta 3), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '22863df7ca5f9cd01a40ab3dce3d067ec5666081'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 22863df7ca GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
Switched to and reset branch 'main'

configure: WARNING: s390x-ibm-linux-gnu/clang is not supported
configure: WARNING:

Platform "s390x-ibm-linux-gnu" with compiler "clang" is not supported by the
CPython core team, see https://peps.python.org/pep-0011/ for more information.


Python/pytime.c:297:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    if (!_Py_InIntegralTypeRange(time_t, intpart)) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Include/internal/pycore_pymath.h:72:45: note: expanded from macro '_Py_InIntegralTypeRange'
    (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type))
                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
./Include/internal/pycore_pymath.h:61:88: note: expanded from macro '_Py_IntegralTypeMax'
    (_Py_IS_TYPE_SIGNED(type) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0)
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Python/pytime.c:352:14: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
        if (!_Py_InIntegralTypeRange(time_t, intpart)) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Include/internal/pycore_pymath.h:72:45: note: expanded from macro '_Py_InIntegralTypeRange'
    (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type))
                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
./Include/internal/pycore_pymath.h:61:88: note: expanded from macro '_Py_IntegralTypeMax'
    (_Py_IS_TYPE_SIGNED(type) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0)
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Python/pytime.c:518:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
    if (!_Py_InIntegralTypeRange(_PyTime_t, d)) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Include/internal/pycore_pymath.h:72:45: note: expanded from macro '_Py_InIntegralTypeRange'
    (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type))
                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
./Include/internal/pycore_pymath.h:61:88: note: expanded from macro '_Py_IntegralTypeMax'
    (_Py_IS_TYPE_SIGNED(type) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0)
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
3 warnings generated.
_bootstrap_python: Python/ceval.c:3855: PyObject *_PyEval_EvalFrameDefault(PyThreadState *, _PyInterpreterFrame *, int): Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: PyObject *_PyEval_EvalFrameDefault(PyThreadState *, _PyInterpreterFrame *, int): Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: PyObject *_PyEval_EvalFrameDefault(PyThreadState *, _PyInterpreterFrame *, int): Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: PyObject *_PyEval_EvalFrameDefault(PyThreadState *, _PyInterpreterFrame *, int): Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
_bootstrap_python: Python/ceval.c:3855: PyObject *_PyEval_EvalFrameDefault(PyThreadState *, _PyInterpreterFrame *, int): Assertion `_Py_OPCODE(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg] == END_FOR)' failed.
make: *** [Makefile:1248: Python/frozen_modules/_collections_abc.h] Aborted (core dumped)
make: *** Waiting for unfinished jobs....
make: *** [Makefile:1251: Python/frozen_modules/_sitebuiltins.h] Aborted (core dumped)
make: *** [Makefile:1245: Python/frozen_modules/io.h] Aborted (core dumped)
make: *** [Makefile:1239: Python/frozen_modules/abc.h] Aborted (core dumped)
make: *** [Makefile:1242: Python/frozen_modules/codecs.h] Aborted (core dumped)

gvanrossum pushed a commit to gvanrossum/cpython that referenced this pull request Oct 28, 2022
…on. (pythonGH-96801)

Change FOR_ITER to have the same stack effect regardless of whether it branches or not.
Performance is unchanged as FOR_ITER (and specialized forms jump over the cleanup code).
@markshannon markshannon deleted the for-iter-no-pop branch September 26, 2023 12:50
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