Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for aiorun triggering stackoverflow in Python #88

Conversation

StefanD986
Copy link
Contributor

Under certain circumstances this line

logger.debug("Cancelling task: %s", t)
in aiorun can trigger the following Python bug python/cpython#93837

The program will crash with a stack overflow error, probably because the call to log the task about the be cancelled will call repr on a task that references itself somehow.

While its not the greatest fix to remove the logging of the individual task to be cancelled (as suggested by this PR), it is just a small inconvenience compared to a hard crash of the application. (I also tried to just log t.get_name(), however this was not enough)

Under certain circumstances this line in `aiorun` can trigger the following
Python bug python/cpython#93837

The program will crash with a stack overflow error, probably because the
call to log the task about the be cancelled will call repr on a task that
references itself somehow.
@cjrh cjrh merged commit 5130d38 into cjrh:master May 8, 2024
12 of 16 checks passed
@cjrh
Copy link
Owner

cjrh commented May 8, 2024

Thanks 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants