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

release GIL in nt._isdir #71720

Closed
jeremyspiegel mannequin opened this issue Jul 16, 2016 · 8 comments
Closed

release GIL in nt._isdir #71720

jeremyspiegel mannequin opened this issue Jul 16, 2016 · 8 comments
Assignees
Labels
OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@jeremyspiegel
Copy link
Mannequin

jeremyspiegel mannequin commented Jul 16, 2016

BPO 27533
Nosy @pfmoore, @tjguk, @bitdancer, @zware, @eryksun, @zooba, @jeremyspiegel
Files
  • _isdir.patch
  • _isdir.2.7.patch: 2.7 posix__isdir patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/zooba'
    closed_at = <Date 2016-07-18.03:51:06.954>
    created_at = <Date 2016-07-16.20:13:54.767>
    labels = ['type-bug', 'library', 'OS-windows']
    title = 'release GIL in nt._isdir'
    updated_at = <Date 2016-07-18.03:51:06.954>
    user = 'https://github.com/jeremyspiegel'

    bugs.python.org fields:

    activity = <Date 2016-07-18.03:51:06.954>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2016-07-18.03:51:06.954>
    closer = 'steve.dower'
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2016-07-16.20:13:54.767>
    creator = 'jeremyspiegel'
    dependencies = []
    files = ['43755', '43758']
    hgrepos = []
    issue_num = 27533
    keywords = ['patch']
    message_count = 8.0
    messages = ['270583', '270588', '270591', '270594', '270597', '270601', '270643', '270684']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'tim.golden', 'r.david.murray', 'python-dev', 'zach.ware', 'eryksun', 'steve.dower', 'jeremyspiegel']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27533'
    versions = ['Python 3.5', 'Python 3.6']

    @jeremyspiegel
    Copy link
    Mannequin Author

    jeremyspiegel mannequin commented Jul 16, 2016

    In Modules/posixmodule.c, the function os__isdir_impl calls GetFileAttributesA/GetFileAttributesW without releasing the GIL. This is problematic since it can result in disk or network I/O, depending on the filesystem.

    @jeremyspiegel jeremyspiegel mannequin added the stdlib Python modules in the Lib dir label Jul 16, 2016
    @zooba
    Copy link
    Member

    zooba commented Jul 16, 2016

    LGTM.

    This is the kind of patch I can't wait to have a one-click merge button... right now it'll have to wait until I have a clean repo. But if anyone else wants to get it, go ahead.

    @zooba zooba added the type-bug An unexpected behavior, bug, or error label Jul 16, 2016
    @eryksun
    Copy link
    Contributor

    eryksun commented Jul 16, 2016

    Should this be backported to 2.7 posix__isdir()?

    @zooba
    Copy link
    Member

    zooba commented Jul 16, 2016

    No, it's not a security fix, so it doesn't go in 2.7.

    @eryksun
    Copy link
    Contributor

    eryksun commented Jul 17, 2016

    OK. I thought fixing bugs in 2.7 was at the discretion of core developers, including small tweaks for performance -- just not enhancements with significant amounts of new code and features.

    @zooba
    Copy link
    Member

    zooba commented Jul 17, 2016

    Maybe so. If you find a core developer who cares about performance in 2.7, maybe they'll merge it :)

    @bitdancer
    Copy link
    Member

    Correct, 2.7 is not in security fix only mode (yet), but new features (anything that changes an API) or bug fixes that we wouldn't put in a maintenance release (things that would break existing programs) are not allowed. A special exception has been made for 2.7 for performance enhancements; we wouldn't normally do those in a maintenance release unless they were significant.

    But as Steve says, it depends on a core developer being interested in applying the fix/backport. Which we may have, we'll wait and see :)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 18, 2016

    New changeset ebf9a4c933e9 by Steve Dower in branch '3.5':
    Issue bpo-27533: Release GIL in nt._isdir
    https://hg.python.org/cpython/rev/ebf9a4c933e9

    New changeset 8823c660820e by Steve Dower in branch 'default':
    Issue bpo-27533: Release GIL in nt._isdir
    https://hg.python.org/cpython/rev/8823c660820e

    @zooba zooba closed this as completed Jul 18, 2016
    @zooba zooba self-assigned this Jul 18, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-windows stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants