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

PyThread_acquire_lock can block even when asked not ot #74950

Closed
pitrou opened this issue Jun 26, 2017 · 6 comments
Closed

PyThread_acquire_lock can block even when asked not ot #74950

pitrou opened this issue Jun 26, 2017 · 6 comments
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Jun 26, 2017

BPO 30765
Nosy @ronaldoussoren, @pitrou, @vstinner, @ned-deily
PRs
  • bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to #2403
  • [3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) #2418
  • [3.5] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) #2419
  • [2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) #2420
  • 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 = None
    closed_at = <Date 2017-06-26.20:14:13.114>
    created_at = <Date 2017-06-26.12:27:17.101>
    labels = ['interpreter-core', 'type-bug', '3.7']
    title = 'PyThread_acquire_lock can block even when asked not ot'
    updated_at = <Date 2017-06-26.20:14:13.114>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2017-06-26.20:14:13.114>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-26.20:14:13.114>
    closer = 'pitrou'
    components = ['Interpreter Core']
    creation = <Date 2017-06-26.12:27:17.101>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30765
    keywords = []
    message_count = 6.0
    messages = ['296886', '296929', '296937', '296939', '296940', '296941']
    nosy_count = 4.0
    nosy_names = ['ronaldoussoren', 'pitrou', 'vstinner', 'ned.deily']
    pr_nums = ['2403', '2418', '2419', '2420']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue30765'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 26, 2017

    Discovered in bpo-30703. When POSIX semaphores are not used for Python locks, pthread_mutex_lock() is called for acquiring a lock even when asked not to block. This can be disastrous when called from a signal handler.

    @pitrou pitrou added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Jun 26, 2017
    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 26, 2017

    New changeset f84ac42 by Antoine Pitrou in branch 'master':
    bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (bpo-2403)
    f84ac42

    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 26, 2017

    New changeset 55ab604 by Antoine Pitrou in branch '3.6':
    [3.6] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (bpo-2418)
    55ab604

    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 26, 2017

    New changeset 85b34ed by Antoine Pitrou in branch '3.5':
    [3.5] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (bpo-2419)
    85b34ed

    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 26, 2017

    New changeset 8284883 by Antoine Pitrou in branch '2.7':
    [2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (bpo-2420)
    8284883

    @pitrou
    Copy link
    Member Author

    pitrou commented Jun 26, 2017

    Travis-CI and the 3.x buildbots seem fine.

    @pitrou pitrou closed this as completed Jun 26, 2017
    @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
    3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant