◐ Shell
reader mode source ↗
Skip to content

bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers#409

Merged
1st1 merged 2 commits into
python:masterfrom
fafhrd91:3.6
Jun 10, 2017
Merged

bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers#409
1st1 merged 2 commits into
python:masterfrom
fafhrd91:3.6

Conversation

@fafhrd91

@fafhrd91 fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor

Some servers does not complete ssl shutdown procedure, which cause socket leak on asyncio side.

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:

  1. If you don't have an account on b.p.o, please create one
  2. Make sure your GitHub username is listed in "Your Details" at b.p.o
  3. If you have not already done so, please sign the PSF contributor agreement. The "bugs.python.org username " requested by the form is the "Login name" field under "Your Details".
  4. If you just signed the CLA, please wait at least one US business day and then check "Your Details" on bugs.python.org to see if your account has been marked as having signed the CLA (the delay is due to a person having to manually check your signed CLA)
  5. Reply here saying you have completed the above steps

Thanks again to your contribution and we look forward to looking at it!

@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

@1st1 PR for http://bugs.python.org/issue29406
I need to add tests though

@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

I actually signed CLA before I started to contribute to tulip/asyncio

@1st1

1st1 commented Mar 3, 2017

Copy link
Copy Markdown
Member

I actually signed CLA before I started to contribute to tulip/asyncio

I think you need to go to the bugs.python.org and add your GH username to your profile.

@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

I dont remembre account that I used when signed cla. I just re-signed it

@1st1

1st1 commented Mar 3, 2017

Copy link
Copy Markdown
Member

Maybe you used OAuth?

@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

my bugs.python.org details page shows "Contributor Form Received: Yes"

@1st1

1st1 commented Mar 3, 2017

Copy link
Copy Markdown
Member

Did you list your GH account name in your account on bpo?

@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

yes

@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

@fafhrd91 fafhrd91 changed the title asyncio SSL contexts leak sockets after calling close with certain servers Mar 3, 2017
@1st1

1st1 commented Mar 3, 2017

Copy link
Copy Markdown
Member

@brettcannon something weird is going on here with @the-knights-who-say-ni bot.

@fafhrd91 Can you rebase your PR against master branch? And then add "needs backport to 3.6" and 3.5 tags.

@fafhrd91 fafhrd91 changed the base branch from 3.6 to master March 3, 2017 23:36
@fafhrd91

fafhrd91 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

rebased, but I can not add labels

@fafhrd91

fafhrd91 commented Mar 4, 2017

Copy link
Copy Markdown
Contributor Author

added simple unit tests

@brettcannon

Copy link
Copy Markdown
Member

@1st1 there was nothing weird going on; you didn't remove the "CLA not signed" to retrigger the bot to check for the new CLA signing. In the end the synchronizing of the PR triggered the bot again and picked up on the signing.

@1st1

1st1 commented Mar 12, 2017

Copy link
Copy Markdown
Member

@fafhrd91 ping

@fafhrd91

Copy link
Copy Markdown
Contributor Author

5 seconds just some number

@misg

misg commented Apr 3, 2017

Copy link
Copy Markdown

You may want to see #981

@fafhrd91

fafhrd91 commented Apr 3, 2017

Copy link
Copy Markdown
Contributor Author

@misg I think this is slightly different issue, #480 is related to #981

@misg

misg commented Apr 3, 2017

Copy link
Copy Markdown

@fafhrd91 I honestly don't know. In my case (with the server/client described in my PR), aiohttp.connector._cleanup_closed is always called and it is that function that calls asyncio.sslproto.SSLTransport._abort so I think I'm in the context where the ssl server doesn't complete ssh shutdown procedure (I actually didn't test with a ssl server that completes ssh shutdown procedure)

26 hidden items Load more…
@fafhrd91

fafhrd91 commented Jun 9, 2017

Copy link
Copy Markdown
Contributor Author

@1st1 done

@fafhrd91

fafhrd91 commented Jun 9, 2017

Copy link
Copy Markdown
Contributor Author

wait

@fafhrd91

fafhrd91 commented Jun 9, 2017

Copy link
Copy Markdown
Contributor Author

@1st1 restored

@1st1

1st1 commented Jun 9, 2017

Copy link
Copy Markdown
Member

Can you add a NEWS entry?

@fafhrd91

fafhrd91 commented Jun 9, 2017

Copy link
Copy Markdown
Contributor Author

added

@1st1 1st1 self-assigned this Jun 10, 2017
@1st1

1st1 commented Jun 10, 2017

Copy link
Copy Markdown
Member

@1st1 restored

unittests don't seem to pass :(

@1st1 1st1 merged commit a608d2d into python:master Jun 10, 2017
1st1 pushed a commit that referenced this pull request Jun 10, 2017
1st1 pushed a commit that referenced this pull request Jun 10, 2017
…e with certain servers (GH-409)

* asyncio SSL contexts leak sockets after calling close with certain servers

* cleanup _shutdown_timeout_handle on _fatal_error.
(cherry picked from commit a608d2d)
1st1 pushed a commit that referenced this pull request Jun 10, 2017
1st1 pushed a commit that referenced this pull request Jun 10, 2017
…e with certain servers (GH-409)

* asyncio SSL contexts leak sockets after calling close with certain servers

* cleanup _shutdown_timeout_handle on _fatal_error.
(cherry picked from commit a608d2d)
1st1 pushed a commit that referenced this pull request Jun 10, 2017
…e with certain servers (GH-409) (#2062)

* bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409)

(cherry picked from commit a608d2d)

* [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409)

* asyncio SSL contexts leak sockets after calling close with certain servers

* cleanup _shutdown_timeout_handle on _fatal_error.
(cherry picked from commit a608d2d)
1st1 pushed a commit that referenced this pull request Jun 10, 2017
…e with certain servers (GH-409) (#2063)

* bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409)

(cherry picked from commit a608d2d)

* [3.5] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409)

* asyncio SSL contexts leak sockets after calling close with certain servers

* cleanup _shutdown_timeout_handle on _fatal_error.
(cherry picked from commit a608d2d)
1st1 pushed a commit that referenced this pull request Jun 11, 2017
…ose with certain servers (#409)"

This reverts commit a608d2d.
1st1 pushed a commit that referenced this pull request Jun 11, 2017
…ing close with certain servers (GH-409) (#2062)"

This reverts commit 6e14fd2.
1st1 pushed a commit that referenced this pull request Jun 11, 2017
…ing close with certain servers (GH-409) (#2062)" (#2112)

This reverts commit 6e14fd2.
1st1 pushed a commit that referenced this pull request Jun 11, 2017
…ing close with certain servers (GH-409) (#2063)" (#2113)

This reverts commit 1395c58.
1st1 pushed a commit that referenced this pull request Jun 11, 2017
…ose with certain servers (#409)" (#2111)

This reverts commit a608d2d.
jaraco pushed a commit that referenced this pull request Dec 2, 2022
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.6.2 to 3.7.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.6.2...v3.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
SonicField added a commit to SonicField/cpython that referenced this pull request May 14, 2026
Per supervisor 19:13:18Z artefact request + [arch_completeness_disclaimer]
durable-falsifiable rule. Expands the existing c22b-mech audit comment
in MakeDecref else-branch (around the c22b-mech _Py_Dealloc bridge call)
into a full 16-site enumeration with per-site disposition.

Inlines the 6 active-rewired sites (c22b-mech site 611 + c23 site 599 +
c24 kRaiseAwaitableError + c25 kInitFrameCellVars + c26 kSetCurrentAwaiter
SP-only + c27 kStoreArrayItem SP-only — the latter two with disposition C
provisional tag) and the 10 dead/conditional sites with their gating
#ifdef / version macros explained:
- 3 sites #ifdef Py_GIL_DISABLED (DEAD in default GIL build)
- 1 site  #ifdef Py_TRACE_REFS (DEAD in default build)
- 5 sites #if PY_VERSION_HEX < 0x030C0000 (DEAD in 3.12 target)
- 1 site  #elif defined(ENABLE_LIGHTWEIGHT_FRAMES) (build-option-gated)

Originally enumerated chat-only at theologian 13:29:55Z + supervisor
disposition; converted to in-tree artefact for cross-session durability
(per pythia python#409 audit-class observation 19:12:39Z + supervisor 19:13:18Z).
Re-port becomes mandatory if Phoenix adopts a build config matching any
of the gates (free-threaded GIL, TRACE_REFS, pre-3.12 compat, or
ENABLE_LIGHTWEIGHT_FRAMES).

No prod codegen change — comment-only.

Authorized by supervisor 19:13:18Z artefact-class request.
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.

5 participants