Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-35046: do only one system call per line (logging.StreamHandler)#10042

Merged
vsajip merged 2 commits into
python:masterpython/cpython:masterfrom
hashbrowncipher:bpo-35046hashbrowncipher/cpython:bpo-35046Copy head branch name to clipboard
Oct 23, 2018
Merged

bpo-35046: do only one system call per line (logging.StreamHandler)#10042
vsajip merged 2 commits into
python:masterpython/cpython:masterfrom
hashbrowncipher:bpo-35046hashbrowncipher/cpython:bpo-35046Copy head branch name to clipboard

Conversation

@hashbrowncipher

@hashbrowncipher hashbrowncipher commented Oct 22, 2018

Copy link
Copy Markdown
Contributor

When sys.stderr (or whatever other stream) is unbuffered, this results in two system calls and allows log records from different processes to concatenate on the same line in the output stream (followed by multiple newlines). This issue is new in Python 3.7, as stdout and stderr became "truly unbuffered" (cf. #30404).

https://bugs.python.org/issue35046

When sys.stderr (or whatever other stream) is unbuffered, the current
behavior results in two system calls and allows log records from
different processes to concatenate on the same line in the output stream
(followed by multiple newlines). This issue is new in Python 3.7, as
stdout and stderr became "truly unbuffered" (cf. bpo-30404).
@vsajip

vsajip commented Oct 23, 2018

Copy link
Copy Markdown
Member

Due to the recent GitHub outage and the resulting fallout, I didn't realise you'd created this PR, and so I went ahead and created my own (#10043). The only difference is that I added a comment referencing the issue, so that people could refer to it to see the detail of the reason (multiple syscalls leading to coalescing, and so forth). Would you add that comment? Then I can merge this and close my PR. Thanks!

@vsajip vsajip merged commit b7d6205 into python:master Oct 23, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @hashbrowncipher for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 23, 2018
…ythonGH-10042)

(cherry picked from commit b7d6205)

Co-authored-by: Josh Snyder <hashbrowncipher@users.noreply.github.com>
@bedevere-bot

Copy link
Copy Markdown

GH-10050 is a backport of this pull request to the 3.7 branch.

@bedevere-bot

Copy link
Copy Markdown

Hi! The buildbot AMD64 FreeBSD CURRENT Shared 3.7 has failed when building commit d730719.

You can take a look here:

https://buildbot.python.org/all/#builders/173/builds/57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.