Skip to content

PyThread_acquire_lock can block even when asked not ot #74950

Closed

Description

@pitrou
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']

    Activity

    1. pitrou commented on Jun 26, 2017

      @pitrou
      MemberAuthor

      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.

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      on Jun 26, 2017
    3. pitrou commented on Jun 26, 2017

      @pitrou
      MemberAuthor

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

    4. pitrou commented on Jun 26, 2017

      @pitrou
      MemberAuthor

      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

    5. pitrou commented on Jun 26, 2017

      @pitrou
      MemberAuthor

      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

    6. pitrou commented on Jun 26, 2017

      @pitrou
      MemberAuthor

      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

    7. pitrou commented on Jun 26, 2017

      @pitrou
      MemberAuthor

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

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions