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-96819: check if the length of a pipe write is not greater than 512 by saito828koki · Pull Request #96890 · python/cpython

Conversation

@saito828koki

@saito828koki saito828koki commented Sep 17, 2022 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Multiprocessing resource tracker incorrectly checks pipe write length #96819

Sorry, something went wrong.

Uh oh!

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

All reactions
@saito828koki
fix: check the length of msg, not the length of name
2efc372
@bedevere-bot bedevere-bot added the awaiting review label Sep 17, 2022
@bedevere-bot

bedevere-bot commented Sep 17, 2022

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

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

blurb-it Bot and others added 2 commits September 17, 2022 13:15
@blurb-it
📜🤖 Added by blurb_it.
476bed0
@saito828koki
fix: remove backticks
ee548f9
DanielNoord
DanielNoord reviewed Sep 19, 2022
View reviewed changes
Comment thread Lib/multiprocessing/resource_tracker.py Outdated
if len(msg) > 512:
# posix guarantees that writes to a pipe of less than PIPE_BUF
# bytes are atomic, and that PIPE_BUF >= 512
raise ValueError('name too long')

@DanielNoord DanielNoord Sep 19, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Shouldn't this also be updated? ie. msg too long?

Sorry, something went wrong.

Uh oh!

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

All reactions

@saito828koki saito828koki Sep 20, 2022

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@DanielNoord
Thanks for your comment!
The error message should also be updated. I will fix it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@saito828koki
fix: update error message
1566b72
DanielNoord
DanielNoord approved these changes Sep 20, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2022-09-17-13-15-10.gh-issue-96819.6RfqM7.rst Outdated
@@ -0,0 +1 @@
Fixed the block to guarantee that the length of a write to a pipe is not greater than PIPE_BUF

@DanielNoord DanielNoord Sep 20, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
Fixed the block to guarantee that the length of a write to a pipe is not greater than PIPE_BUF
Fixed the check that guarantees that the length of a write to a pipe is not greater than PIPE_BUF

Sorry, something went wrong.

Uh oh!

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

saito828koki reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@saito828koki saito828koki Sep 20, 2022

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you for correcting my English! Your suggestion seems to be great.

Sorry, something went wrong.

Uh oh!

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

All reactions

@DanielNoord DanielNoord Sep 20, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

No worries! I struggle with writing good and short changelog entries myself many times! 😄

Sorry, something went wrong.

Uh oh!

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

saito828koki reacted with laugh emoji
All reactions
  • 😄 1 reaction
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Sep 20, 2022
@saito828koki
modify NEWS entry
3f32cb6
@JelleZijlstra

JelleZijlstra commented Sep 30, 2022

Copy link
Copy Markdown
Member

Is it possible to write a unit test for this change?

All reactions

Sorry, something went wrong.

Uh oh!

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

@saito828koki
Add a test for too long name resources
1039648
@saito828koki

saito828koki commented Oct 1, 2022

Copy link
Copy Markdown
Contributor Author

Hello @JelleZijlstra ,

Thanks for your comment.
I added a test for this change. Could you review this PR?

All reactions

Sorry, something went wrong.

Uh oh!

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

kumaraditya303
kumaraditya303 requested changes Oct 1, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2022-09-17-13-15-10.gh-issue-96819.6RfqM7.rst Outdated
@@ -0,0 +1 @@
Fixed the check that guarantees that the length of a write to a pipe is not greater than PIPE_BUF

@kumaraditya303 kumaraditya303 Oct 1, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Mention multiprocessing.resource_tracker in news.

Sorry, something went wrong.

Uh oh!

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

saito828koki reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@kumaraditya303 kumaraditya303 added type-bug An unexpected behavior, bug, or error needs backport to 3.10 needs backport to 3.11 only security fixes labels Oct 1, 2022
@saito828koki
Modify NEWS entry
30f651c
kumaraditya303
kumaraditya303 reviewed Oct 1, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2022-09-17-13-15-10.gh-issue-96819.6RfqM7.rst Resolved

Uh oh!

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

kumaraditya303
kumaraditya303 approved these changes Oct 1, 2022
View reviewed changes
@saito828koki @kumaraditya303
Modify NEWS entry
6c3afb9
Co-authored-by: Kumar Aditya <[email protected]>
@kumaraditya303
kumaraditya303 requested a review from JelleZijlstra October 1, 2022 18:04
JelleZijlstra
JelleZijlstra approved these changes Oct 3, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Oct 3, 2022
@JelleZijlstra
JelleZijlstra merged commit 19ca114 into python:main Oct 3, 2022
@miss-islington

miss-islington commented Oct 3, 2022

Copy link
Copy Markdown
Contributor

Thanks @saito828koki for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

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 merge label Oct 3, 2022
@bedevere-bot

bedevere-bot commented Oct 3, 2022

Copy link
Copy Markdown

GH-97745 is a backport of this pull request to the 3.11 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.11 only security fixes label Oct 3, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 3, 2022
@saito828koki @miss-islington
pythongh-96819: multiprocessing.resource_tracker: check if length of …
cbfae61
…pipe write <= 512 (pythonGH-96890)

Co-authored-by: Kumar Aditya <[email protected]>
(cherry picked from commit 19ca114)

Co-authored-by: Koki Saito <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Oct 3, 2022
@bedevere-bot

bedevere-bot commented Oct 3, 2022

Copy link
Copy Markdown

GH-97746 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 3, 2022
@saito828koki @miss-islington
pythongh-96819: multiprocessing.resource_tracker: check if length of …
ade8f87
…pipe write <= 512 (pythonGH-96890)

Co-authored-by: Kumar Aditya <[email protected]>
(cherry picked from commit 19ca114)

Co-authored-by: Koki Saito <[email protected]>
miss-islington added a commit that referenced this pull request Oct 3, 2022
@miss-islington @saito828koki
gh-96819: multiprocessing.resource_tracker: check if length of pipe w…
f595067
…rite <= 512 (GH-96890)

Co-authored-by: Kumar Aditya <[email protected]>
(cherry picked from commit 19ca114)

Co-authored-by: Koki Saito <[email protected]>
miss-islington added a commit that referenced this pull request Oct 3, 2022
@miss-islington @saito828koki
gh-96819: multiprocessing.resource_tracker: check if length of pipe w…
c2d3f73
…rite <= 512 (GH-96890)

Co-authored-by: Kumar Aditya <[email protected]>
(cherry picked from commit 19ca114)

Co-authored-by: Koki Saito <[email protected]>
carljm added a commit to carljm/cpython that referenced this pull request Oct 3, 2022
@carljm
Merge branch 'main' into dictwatch
e83abac
* main: (2069 commits)
  pythongh-96512: Move int_max_str_digits setting to PyConfig (python#96944)
  pythongh-94808: Coverage: Check picklablability of calliter (python#95923)
  pythongh-94808: Add test coverage for PyObject_HasAttrString (python#96627)
  pythongh-94732: Fix KeyboardInterrupt race in asyncio run_forever() (python#97765)
  Fix typos in `bltinmodule.c`. (pythonGH-97766)
  pythongh-94808: `_PyLineTable_StartsLine` was not used (pythonGH-96609)
  pythongh-97681: Remove Tools/demo/ directory (python#97682)
  Fix typo in unittest docs (python#97742)
  pythongh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (pythonGH-97729)
  pythongh-95913: Fix PEP number in PEP 678 What's New ref label (python#97739)
  pythongh-95913: Copyedit/improve New Modules What's New section (python#97721)
  pythongh-97740: Fix bang in Sphinx C domain ref target syntax (python#97741)
  pythongh-96819: multiprocessing.resource_tracker: check if length of pipe write <= 512 (python#96890)
  pythongh-97706: multiprocessing tests: Delete unused variable `rand` (python#97707)
  pythonGH-85447: Clarify docs about awaiting future multiple times (python#97738)
  [docs] Update logging cookbook with recipe for using a logger like an output… (pythonGH-97730)
  pythongh-97607: Fix content parsing in the impl-detail reST directive (python#97652)
  pythongh-95975: Move except/*/finally ref labels to more precise locations (python#95976)
  pythongh-97591: In `Exception.__setstate__()` acquire strong references before calling `tp_hash` slot (python#97700)
  pythongh-95588: Drop the safety claim from `ast.literal_eval` docs. (python#95919)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes
@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
+1 more reviewer
@DanielNoord DanielNoord DanielNoord approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

type-bug An unexpected behavior, bug, or error

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.

6 participants

@saito828koki @bedevere-bot @JelleZijlstra @miss-islington @DanielNoord @kumaraditya303
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.