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 — Raising in an atexit function in dev mode crashes · Issue #90183 · python/cpython

Raising in an atexit function in dev mode crashes #90183

New issue
Copy link
New issue
Copy link
Closed
Closed
Raising in an atexit function in dev mode crashes#90183
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes

Description

@pablogsal
pablogsal
opened on Dec 9, 2021
Issue body actions
BPO 46025
Nosy @vstinner, @pablogsal, @miss-islington
PRs
  • bpo-46025: Fix a crash in the atexit module for auto-unregistering functions #30002
  • [3.10] bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) #30005
  • 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 2021-12-09.15:15:34.300>
    created_at = <Date 2021-12-09.11:20:52.793>
    labels = ['3.10', '3.11']
    title = 'Raising in an atexit function in dev mode crashes'
    updated_at = <Date 2021-12-09.17:06:29.881>
    user = 'https://github.com/pablogsal'

    bugs.python.org fields:

    activity = <Date 2021-12-09.17:06:29.881>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-09.15:15:34.300>
    closer = 'pablogsal'
    components = []
    creation = <Date 2021-12-09.11:20:52.793>
    creator = 'pablogsal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46025
    keywords = ['patch', '3.10regression', '3.11regression']
    message_count = 6.0
    messages = ['408106', '408123', '408132', '408143', '408144', '408147']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'pablogsal', 'miss-islington']
    pr_nums = ['30002', '30005']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46025'
    versions = ['Python 3.10', 'Python 3.11']

    Activity

    1. pablogsal commented on Dec 9, 2021

      @pablogsal
      pablogsal
      on Dec 9, 2021
      MemberAuthor
      More actions

      Issue found by Matt Wozniski:

      Running this with python3.10 -X dev segfaults:

      import atexit
      def func():
          atexit.unregister(func)
          1/0
      atexit.register(func)
    2. pablogsal
      added
      3.10 (EOL)end of lifeend of life
      3.11only security fixesonly security fixes
      on Dec 9, 2021
    3. pablogsal commented on Dec 9, 2021

      @pablogsal
      pablogsal
      on Dec 9, 2021
      MemberAuthor
      More actions

      New changeset f0d290d by Pablo Galindo Salgado in branch 'main':
      bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002)
      f0d290d

    4. pablogsal
      closed this as completedon Dec 9, 2021
    5. pablogsal
      closed this as completedon Dec 9, 2021
    6. pablogsal commented on Dec 9, 2021

      @pablogsal
      pablogsal
      on Dec 9, 2021
      MemberAuthor
      More actions

      New changeset 934a24c by Miss Islington (bot) in branch '3.10':
      bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) (GH-30005)
      934a24c

    7. vstinner commented on Dec 9, 2021

      @vstinner
      vstinner
      on Dec 9, 2021
      Member
      More actions

      Interesting bug report! Thanks for the fix ;-)

    8. vstinner commented on Dec 9, 2021

      @vstinner
      vstinner
      on Dec 9, 2021
      Member
      More actions

      For me, the question is why would anyone call atexit.unregister() inside an atexit callback. Is it useful?

      atexit._run_exitfuncs() removes all registered callbacks.

      Py_Finalize() calls _PyAtExit_Call() which also removes all registered callbacks.

    9. pablogsal commented on Dec 9, 2021

      @pablogsal
      pablogsal
      on Dec 9, 2021
      MemberAuthor
      More actions

      For me, the question is why would anyone call atexit.unregister() inside an atexit callback. Is it useful?

      Is not useful, is just an edge case

    10. ezio-melotti
      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.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes

      Projects

      No projects

        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.