Skip to content

TimerHandle.when() segfaults if called after callback #468

Description

  • uvloop version: uvloop==0.16.0
  • Python version: 3.10.4
  • Platform: Linux-5.17.5-200.fc35.x86_64-x86_64-with-glibc2.34
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Yes
  • Does uvloop behave differently from vanilla asyncio? How?: It segfaults.

Calling when() on a TimerHandle object after callback has been executed causes a core dump.

import uvloop
import asyncio


async def main():
    loop = asyncio.get_running_loop()
    timer = loop.call_later(0.1, lambda: None) # call any function
    await asyncio.sleep(0.2)
    timer.when() # segfault happens here
    
uvloop.install()
asyncio.run(main())

Activity

  1. added a commit that references this issue on May 15, 2022
    dcefd5c
  2. fantix commented on Jul 16, 2022

    @fantix
    Member

    Thanks for the report and the PR! This is now fixed in c39afff.

  3. fantix commented on Sep 15, 2022

    @fantix
    Member

    This is now included in 0.17.0.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions