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 — PidfdChildWatcher runs callbacks on the main thread eventloop and not the currently running loop · Issue #94182 · python/cpython

PidfdChildWatcher runs callbacks on the main thread eventloop and not the currently running loop #94182

New issue
Copy link
New issue
Copy link
Closed
Closed
PidfdChildWatcher runs callbacks on the main thread eventloop and not the currently running loop#94182
Copy link
Labels
topic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@graingert
graingert
opened on Jun 23, 2022
Issue body actions

as of #93896 and #94593 asyncio.Runner(loop_factory=asyncio.new_event_loop) no longer calls asyncio.set_event_loop() and so the PidfdChildWatcher is never activated

this is unfortunate because it could run asyncio.get_running_loop().add_reader instead

Activity

  1. graingert
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 23, 2022
  2. AlexWaygood
    added
    topic-asyncio
    on Jun 23, 2022
  3. kumaraditya303 commented on Jul 9, 2022

    @kumaraditya303
    kumaraditya303
    on Jul 9, 2022
    Contributor
    More actions

    Wasn't this fixed by #94593?

  4. graingert commented on Jul 9, 2022

    @graingert
    graingert
    on Jul 9, 2022
    ContributorAuthor
    More actions

    Wasn't this fixed by #94593?

    No

  5. graingert commented on Jul 9, 2022

    @graingert
    graingert
    on Jul 9, 2022
    ContributorAuthor
    More actions

    The purpose of os.open_pidfd is to allow a single event loop running in any thread to monitor processes without needing to interact with another event loop or thread. The pidfdchildwatcher is currently unnecessarily using another loop in another thread

  6. ezio-melotti
    added this to asyncioon Jul 17, 2022
  7. ezio-melotti
    moved this to Todo in asyncioon Jul 17, 2022
  8. graingert commented on Jul 19, 2022

    @graingert
    graingert
    on Jul 19, 2022
    ContributorAuthor
    More actions

    @kumaraditya303 I can demonstrate that the issue is still not resolved by using 5647edb (#94184) - I updated the description to clarify this

  9. gvanrossum
    added a commit that references this issue on Oct 8, 2022

    GH-94182: Run the PidfdChildWatcher on the running loop (#94184)

    3d8b224
  10. gvanrossum commented on Oct 8, 2022

    @gvanrossum
    gvanrossum
    on Oct 8, 2022
    Member
    More actions

    Thanks for the fix!

    I don't think we should backport this (not even to 3.11.1).

  11. gvanrossum
    closed this as completedon Oct 8, 2022
  12. Repository owner moved this from Todo to Done in asyncioon Oct 8, 2022
  13. carljm
    added 2 commits that reference this issue on Oct 8, 2022

    Merge branch 'main' into typewatch

    d67d6fd

    Merge branch 'main' into urllibnonet

    132c32e
  14. mpage
    added a commit that references this issue on Oct 11, 2022

    pythonGH-94182: Run the PidfdChildWatcher on the running loop (python…

    6cd489d
  15. serhiy-storchaka commented on Sep 25, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Sep 25, 2023
    Member
    More actions

    This test fails if run separately. See #109862.

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

    topic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • asyncio
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — 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.