-
Notifications
You must be signed in to change notification settings - Fork 450
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
ubuntu 18.04 LTS, ram filling up completely #5934
Comments
Can confirm. |
Tribler launches four processes. |
wow 32GBytes! That should be easy to locate, thnx! |
When I go back before 9d8f961, the GUI process doesn't leak for me anymore. The leak seems to be related to the signal handlers. |
Inspected
Click me for dirty patch that hooks into the debug window log refresh button to dump the top 5 most-referenced GUI process objects into "memobjs.txt".diff --git a/src/tribler-gui/tribler_gui/debug_window.py b/src/tribler-gui/tribler_gui/debug_window.py
index ab8c65759..1da1f1b75 100644
--- a/src/tribler-gui/tribler_gui/debug_window.py
+++ b/src/tribler-gui/tribler_gui/debug_window.py
@@ -122,6 +122,9 @@ class DebugWindow(QMainWindow):
self.rest_request = None
self.ipv8_health_widget = None
+ with open("memobjs.txt", 'w') as f:
+ f.write("")
+
def hideEvent(self, hide_event):
self.stop_timer()
self.hide_ipv8_health_widget()
@@ -771,6 +774,19 @@ class DebugWindow(QMainWindow):
self.memory_plot_timer.stop()
def load_logs_tab(self):
+ import gc
+ obj_dump = gc.get_objects()
+ out = {}
+ for obj in obj_dump:
+ try:
+ if hasattr(obj, "__code__"):
+ key = obj.__code__.co_filename + "-" + str(obj.__code__.co_firstlineno)
+ out[key] = out.get(key, 0) + 1
+ except Exception:
+ pass
+ with open("memobjs.txt", 'a') as f:
+ f.write(repr([repr(k) + "-" + repr(v) for k, v in sorted(out.items(), key=lambda item: item[1])[-5:]]) + "\n")
+ return
# Max lines from GUI
max_log_lines = self.window().max_lines_value.text()
|
…cals inside a signal handler
According to this report from our forum, the user experiences a leak and a crash on the GUI side. The Core continues to run as normal. I guess it points us to the GUI leaking. |
…cals inside a signal handler
I noticed that the leak seems to stop (or really slow down) if I am not displaying the "downloads" page... |
…cals inside a signal handler
The issue was auto-closed by commit message, but I'm reopening it, as the memory leak was not completely fixed yet |
Perhaps it would be a good idea to focus some effort on implementing #3603 into the debug screen so we can see what objects are actually leaking. |
Sentry issue: SENTRY-FOR-760-28 |
Hi,
I installed tribler 7.7.0 last friday (downloaded deb file, installation via Ubuntu sw centre) on a ubuntu 18.04 LTS PC as alternative to transmission. Every day I had to reboot the PC as it was completely stuck. Yesterday I started following RAM: after starting tribler I get 4 entries in the list (I have a couple of active torrents), of which 1 starts at ~100 MB RAM, and this continues to grow until the RAM (5 GB in my case) is completely filled up. This morning I stopped tribler, and restarted, but the same behaviour is still there. After installing 7.7.1 and starting today I still see RAM-usage increasing (from 150 M at 14:00 today, to 1.8 G at 18:00).
I am running remmina as remote terminal for the ubuntu 18.04 LTS PC, on a laptop running ubuntu 20.04 LTS, but I cannot imagine that that causes the problem.
Is this expected behaviour? What maximum RAM-usage do you expect from tribler?
I saw a similar problem (issue 2123, 22-4-2016), but I would expect this to be solved in the mean time.
Let me know if you need more information.
The text was updated successfully, but these errors were encountered: