GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `select.poll()` objects are not thread-safe in the free-threaded build · Issue #121592 · python/cpython

select.poll() objects are not thread-safe in the free-threaded build #121592

New issue
Copy link
New issue
Copy link
Closed
Closed
select.poll() objects are not thread-safe in the free-threaded build#121592
Copy link
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@colesbury
colesbury
opened on Jul 10, 2024
Issue body actions

Bug report

The polling objects returned by select.poll and related functions are not thread-safe in the free-threaded build.

The fix might be as simple as adding critical sections to the functions on pollObject or it may require more work.

The following test exercises the thread-unsafe behavior:

  • ./python -m test test_poll -m test_threaded_poll

Relevant object:

cpython/Modules/selectmodule.c

Lines 434 to 441 in 3ec719f

typedef struct {
PyObject_HEAD
PyObject *dict;
int ufd_uptodate;
int ufd_len;
struct pollfd *ufds;
int poll_running;
} pollObject;

Linked PRs

  • gh-121592: Make select.poll() and related objects thread-safe #121594
  • [3.13] gh-121592: Make select.poll() and related objects thread-safe (GH-121594) #121623

Activity

  1. colesbury
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    3.13only security fixesonly security fixes
    topic-free-threading
    3.14bugs and security fixesbugs and security fixes
    on Jul 10, 2024
  2. colesbury
    added 3 commits that reference this issue on Jul 10, 2024

    pythongh-121592: Make select.poll() and related objects thread-safe

    5086314

    pythongh-121592: Make select.poll() and related objects thread-safe

    8b90a6c

    gh-121592: Make select.poll() and related objects thread-safe (#121594)

    44937d1
  3. miss-islington
    added a commit that references this issue on Jul 11, 2024

    pythongh-121592: Make select.poll() and related objects thread-safe (p…

    2d82c2f
  4. colesbury
    added a commit that references this issue on Jul 11, 2024

    [3.13] gh-121592: Make select.poll() and related objects thread-safe (G…

    3b5f8d2
  5. colesbury
    closed this as completedon Jul 11, 2024
  6. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythongh-121592: Make select.poll() and related objects thread-safe (p…

    d424609
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.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.