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

Tribler found a bug! #8322

Closed
juanmacartur opened this issue Dec 8, 2024 · 9 comments · Fixed by #8339
Closed

Tribler found a bug! #8322

juanmacartur opened this issue Dec 8, 2024 · 9 comments · Fixed by #8339
Milestone

Comments

@juanmacartur
Copy link

Hi! I was using Tribler and THIS happened! 😢

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/events.py", line 80, in _run
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 674, in cancel
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 674, in cancel
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 674, in cancel
  [Previous line repeated 491 more times]
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 670, in cancel
RecursionError: maximum recursion depth exceeded while calling a Python object

rE@http://127.0.0.1:35781/ui/assets/index.70dc79d9.js:80:336

@qstokkink
Copy link
Contributor

Thanks for reporting! This is a very obscure bug.

[dev stuff] Apparently this happens when cancelling a gather() call, the cancel() points to this: https://github.com/python/cpython/blob/3.10/Lib/asyncio/tasks.py#L655-L681 That would mean that one of the Future s that we gather loops in on itself on cancel.

@qstokkink qstokkink modified the milestones: 8.1.0, 8.0.7 Dec 9, 2024
@gtubolcev
Copy link

gtubolcev commented Dec 10, 2024

UPD: It turned out that I had no free space on device too, just like [juanmacartur] in the comments below.
I think I've got the same bug:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/events.py", line 80, in _run
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 674, in cancel
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 674, in cancel
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 674, in cancel
  [Previous line repeated 491 more times]
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/asyncio/tasks.py", line 670, in cancel
RecursionError: maximum recursion depth exceeded while calling a Python object
n_@http://127.0.0.1:46721/ui/assets/index.9844966d.js:76:336

@qstokkink
Copy link
Contributor

This is a bit like finding a needle in a haystack for us. Could anyone tell me when this error occurred for them? What page were you on, or did you click something, or were you shutting down?

@juanmacartur
Copy link
Author

I was on the download screen with two files. If it happens again I'll take a closer look. I hope the translation is understood.

@qstokkink
Copy link
Contributor

Thanks for the input! I'll leave my Tribler running with two downloads on the download screen. Hopefully, I can get it to fail.

@juanmacartur
Copy link
Author

Apparently I had run out of space on the partition where the downloads folder is located.

@egbertbouman
Copy link
Member

egbertbouman commented Dec 12, 2024

Maybe we're gathering shutdown_task_manager within the TaskManager itself?

Something like:

class SomeTaskManager(TaskManager):

    def __init__(self):
        super().__init__()
        self.register_task("break_stuff", self.break_stuff, delay=1)

    async def break_stuff(self):
        await asyncio.gather(self.shutdown_task_manager())

It even seems to produce this error without explicitly calling gather (since shutdown_task_manager calls it for you).
So, just doing await self.shutdown_task_manager() within a TaskManager-registered task.

@gtubolcev
Copy link

UPD: It turned out that I had no free space on device too, just like [juanmacartur] said.

@qstokkink
Copy link
Contributor

This is a pretty wild. Thanks for the input everyone! It's still not going to be easy, but I think we have a fighting chance to solve this now.

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

Successfully merging a pull request may close this issue.

4 participants