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-114887 Reject only sockets of type SOCK_STREAM in create_datagram_endpoint(), improve exception message. #114893

Merged
merged 6 commits into from
Feb 3, 2024

Conversation

tjhowse
Copy link
Contributor

@tjhowse tjhowse commented Feb 2, 2024

Copy link

cpython-cla-bot bot commented Feb 2, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Feb 2, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Feb 2, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Feb 2, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

LGTM. Can you add a brief blurb? Then I'll merge it.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
@gvanrossum gvanrossum enabled auto-merge (squash) February 3, 2024 16:48
@gvanrossum
Copy link
Member

gvanrossum commented Feb 3, 2024

Is it worth backporting to 3.12 and 3.11?

@gvanrossum gvanrossum merged commit 94ec2b9 into python:main Feb 3, 2024
31 checks passed
@bedevere-bot
Copy link

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

Hi! The buildbot ARM64 MacOS M1 Refleaks NoGIL 3.x has failed when building commit 94ec2b9.

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

Failed tests:

  • test.test_concurrent_futures.test_init

Test leaking resources:

  • test_init: memory blocks

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 296, in _run_finalizers
    finalizer()
    ~~~~~~~~~^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/util.py", line 220, in __call__
    res = self._callback(*self._args, **self._kwargs)
          ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/multiprocessing/synchronize.py", line 87, in _cleanup
    sem_unlink(name)
    ~~~~~~~~~~^^^^^^
FileNotFoundError: [Errno 2] No such file or directory

tjhowse added a commit to tjhowse/cpython that referenced this pull request Feb 3, 2024
…agram_endpoint() (python#114893)

Also improve exception message.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
@tjhowse
Copy link
Contributor Author

tjhowse commented Feb 3, 2024

Is it worth backporting to 3.12 and 3.11?

I think so, as we're currently running 3.11.x in our application. PRs raised: #114977 and #114978

tjhowse added a commit to tjhowse/cpython that referenced this pull request Feb 3, 2024
…ate_datagram_endpoint() (pythonGH-114893)

Also improve exception message.

(cherry picked from commit 94ec2b9)

Co-authored-by: Travis Howse <tjhowse@gmail.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
tjhowse added a commit to tjhowse/cpython that referenced this pull request Feb 3, 2024
…ate_datagram_endpoint() (pythonGH-114893)

Also improve exception message.

(cherry picked from commit 94ec2b9)

Co-authored-by: Travis Howse <tjhowse@gmail.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 3, 2024

GH-114979 is a backport of this pull request to the 3.11 branch.

@bedevere-app
Copy link

bedevere-app bot commented Feb 3, 2024

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

@tjhowse
Copy link
Contributor Author

tjhowse commented Feb 3, 2024

Is it worth backporting to 3.12 and 3.11?

I think so, as we're currently running 3.11.x in our application. PRs raised: #114977 and #114978

Hm, I seem to have botched the format of the branch names. New PRs raised: #114979 #114980

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…agram_endpoint() (python#114893)

Also improve exception message.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
…agram_endpoint() (python#114893)

Also improve exception message.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
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.

None yet

5 participants