GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104372: use == -1 before PyErr_Occurred by gpshead · Pull Request #104831 · python/cpython

Conversation

@gpshead

@gpshead gpshead commented May 24, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The ideal pattern for this. (already in the 3.11 backport)

  • Issue: subprocess can block all Python threads when using vfork() until the child process exec() succeeds or fails. #104372

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gpshead
pythongh-104372: use == -1 before PyErr_Occurred
eefb96d
The ideal pattern for this.  (already in the 3.11 backport)
@gpshead gpshead added skip news needs backport to 3.12 only security fixes labels May 24, 2023
@gpshead gpshead self-assigned this May 24, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 24, 2023
subprocess can block all Python threads when using vfork() until the child process exec() succeeds or fails. #104372
Closed
@gpshead
gpshead marked this pull request as ready for review May 24, 2023 03:55
@bedevere-bot bedevere-bot added the awaiting core review label May 24, 2023
@gpshead
gpshead enabled auto-merge (squash) May 24, 2023 03:55
@gpshead
gpshead merged commit 7f963bf into python:main May 24, 2023
@miss-islington

miss-islington commented May 24, 2023

Copy link
Copy Markdown
Contributor

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting core review label May 24, 2023
@bedevere-bot

bedevere-bot commented May 24, 2023

Copy link
Copy Markdown

GH-104833 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label May 24, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2023
@gpshead @miss-islington
pythongh-104372: use == -1 before PyErr_Occurred (pythonGH-104831)
be64b8c
The ideal pattern for this.  (already in the 3.11 backport)
(cherry picked from commit 7f963bf)

Co-authored-by: Gregory P. Smith <[email protected]>
gpshead added a commit that referenced this pull request May 24, 2023
@miss-islington @gpshead
[3.12] gh-104372: use == -1 before PyErr_Occurred (GH-104831) (#104833)
b719dd8
gh-104372: use == -1 before PyErr_Occurred (GH-104831)

The ideal pattern for this.  (already in the 3.11 backport)
(cherry picked from commit 7f963bf)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot

bedevere-bot commented May 24, 2023

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Ubuntu Shared 3.x has failed when building commit 7f963bf.

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/506/builds/4875) and take a look at the build logs.
  4. Check if the failure is related to this commit (7f963bf) 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/506/builds/4875

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

== Tests result: ENV CHANGED ==

442 tests OK.

10 slowest tests:

  • test_tools: 5 min 55 sec
  • test_multiprocessing_spawn: 3 min 46 sec
  • test_math: 3 min 36 sec
  • test_concurrent_futures: 2 min 57 sec
  • test_gdb: 2 min 48 sec
  • test_multiprocessing_forkserver: 1 min 48 sec
  • test_unparse: 1 min 35 sec
  • test_compileall: 1 min 24 sec
  • test_capi: 1 min 21 sec
  • test_multiprocessing_fork: 1 min 15 sec

1 test altered the execution environment:
test_importlib

22 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_idle
test_ioctl test_kqueue test_launcher test_msilib test_nis
test_peg_generator test_startfile test_tcl test_tix test_tkinter
test_ttk test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_wmi test_zipfile64

Total duration: 27 min 57 sec

Click to see traceback logs
remote: Enumerating objects: 7, done.        
remote: Counting objects:  14% (1/7)        
remote: Counting objects:  28% (2/7)        
remote: Counting objects:  42% (3/7)        
remote: Counting objects:  57% (4/7)        
remote: Counting objects:  71% (5/7)        
remote: Counting objects:  85% (6/7)        
remote: Counting objects: 100% (7/7)        
remote: Counting objects: 100% (7/7), done.        
remote: Compressing objects: 100% (1/1)        
remote: Compressing objects: 100% (1/1), done.        
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '7f963bfc79a515dc9822ebddbfb1b5927d2dda09'.

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 7f963bfc79 gh-104372: use == -1 before PyErr_Occurred (#104831)
Switched to and reset branch 'main'

./configure: line 8401: -reorder-blocks=ext-tsp: command not found
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.

make: *** [Makefile:2011: buildbottest] Error 3
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented May 24, 2023

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Arch Linux TraceRefs 3.x has failed when building commit 7f963bf.

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/484/builds/3377) and take a look at the build logs.
  4. Check if the failure is related to this commit (7f963bf) 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/484/builds/3377

Failed tests:

  • test__xxsubinterpreters

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

==

Click to see traceback logs
remote: Enumerating objects: 4, done.        
remote: Counting objects:  25% (1/4)        
remote: Counting objects:  50% (2/4)        
remote: Counting objects:  75% (3/4)        
remote: Counting objects: 100% (4/4)        
remote: Counting objects: 100% (4/4), done.        
remote: Compressing objects:  33% (1/3)        
remote: Compressing objects:  66% (2/3)        
remote: Compressing objects: 100% (3/3)        
remote: Compressing objects: 100% (3/3), done.        
remote: Total 4 (delta 1), reused 3 (delta 1), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '7f963bfc79a515dc9822ebddbfb1b5927d2dda09'.

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 7f963bfc79 gh-104372: use == -1 before PyErr_Occurred (#104831)
Switched to and reset branch 'main'

./configure: line 8401: -reorder-blocks=ext-tsp: command not found

Objects/object.c:2211: _Py_ForgetReference: Assertion failed: invalid object chain
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x7f97d5d15300
object refcount : 0
object type     : 0x55ffd0d0d8c0
object type name: bytes
object repr     : <refcnt 0 at 0x7f97d5d15300>

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x00007f97e816a740 (most recent call first):
  <no Python frame>

Extension modules: _xxsubinterpreters (total: 1)
Debug memory block at address p=0x7f97e8091e30: API '�'
    18302063728033390045 bytes originally requested
    The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
        at p-7: 0xdd *** OUCH
        at p-6: 0xdd *** OUCH
        at p-5: 0xdd *** OUCH
        at p-4: 0xdd *** OUCH
        at p-3: 0xdd *** OUCH
        at p-2: 0xdd *** OUCH
        at p-1: 0xdd *** OUCH
    Because memory is corrupted at the start, the count of bytes requested
       may be bogus, and checking the trailing pad bytes may segfault.
    The 8 pad bytes at tail=0xfdfe7d95e606fc0d are Fatal Python error: Segmentation fault

Current thread 0x00007f97e816a740 (most recent call first):
  <no Python frame>

Extension modules: _testcapi, _xxsubinterpreters (total: 2)
make: *** [Makefile:2015: buildbottest] Segmentation fault (core dumped)

Cannot open file '/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/test-results.xml' for upload
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland mentioned this pull request Jun 6, 2023
3.12 backport gh 105236 #105358
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gpshead gpshead

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@gpshead @miss-islington @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.