bpo-33021: Release the GIL during fstat() calls by nirs · Pull Request #6019 · python/cpython (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation11 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

nirs

fstat may block for long time if the file descriptor is on a
non-responsive NFS server, hanging all threads. Most fstat() calls are
handled by _Py_fstat(), releasing the GIL internally, but but
_Py_fstat_noraise() does not release the GIL, and most calls release the
GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs
when calling:

https://bugs.python.org/issue33021

@nirs

fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling:

nirs added a commit to nirs/cpython that referenced this pull request

Mar 7, 2018

@nirs

If the file descriptor is on a non-responsive NFS server, calling fstat() can block for long time, hanging all threads. Most of the calls release the GIL around the call, but some calls seems to be forgotten.

This patch fixes the last calls, affecting users of:

@nirs

@pitrou

Hi @nirs, sorry for the delay. @vstinner is currently unavailable, so I'm gonna review this.

pitrou

Choose a reason for hiding this comment

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

Thanks for this. The changes look basically fine to me. The only thing missing is a NEWS entry with a short description of the fix. You should use the blurb tool to generate it.

@bedevere-bot

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@nirs

@nirs

Thanks for the review @pitrou! I have made the requested changes; please review again.

@bedevere-bot

Thanks for making the requested changes!

@pitrou: please review the changes made to this pull request.

pitrou

@pitrou

@miss-islington

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

@miss-islington

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

@bedevere-bot

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Mar 20, 2018

@nirs @miss-islington

fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling:

Co-authored-by: Nir Soffer nirsof@gmail.com

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Mar 20, 2018

@nirs @miss-islington

fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling:

Co-authored-by: Nir Soffer nirsof@gmail.com

@bedevere-bot

pitrou pushed a commit that referenced this pull request

Mar 20, 2018

)

fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling:

Co-authored-by: Nir Soffer nirsof@gmail.com

pitrou pushed a commit that referenced this pull request

Mar 20, 2018

)

fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling:

Co-authored-by: Nir Soffer nirsof@gmail.com

jo2y pushed a commit to jo2y/cpython that referenced this pull request

Mar 23, 2018

@nirs @jo2y

fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling:

@nirs nirs deleted the fstat-gil-master branch

October 1, 2022 22:17