Opened 2 years ago

Closed 10 months ago

#3514 closed bug (Fixed)

syslog spam: builtins.KeyError: 'disk.num_blocks_cache_hits'

Reported by: Arya Reais-Parsi Owned by:
Priority: minor Milestone: 2.0.4
Component: Unknown Version: 2.0.3
Keywords: Cc:

Description

While running deluge, the following error fills up syslog, emitting a few times a second:

Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]: 09:03:37 [CRITICAL][twisted                       :154 ] Unhandled Error
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]: Traceback (most recent call last):
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 122, in run_daemon
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     daemon.start()
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 164, in start
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     reactor.run()
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1283, in run
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     self.mainLoop()
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1292, in mainLoop
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     self.runUntilCurrent()
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]: --- <exception caught here> ---
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 913, in runUntilCurrent
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     call.func(*call.args, **call.kw)
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 345, in _on_alert_session_stats
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     self._update_session_cache_hit_ratio()
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 361, in _update_session_cache_hit_ratio
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]:     self.session_status['disk.num_blocks_cache_hits'] / blocks_read
Mar 17 09:03:37 growly /usr/libexec/gdm-x-session[5026]: builtins.KeyError: 'disk.num_blocks_cache_hits'

It occurs immediately after startup and doesn't stop, or rather I can't tell what event it starts on. deluge seems to be working and the errors persist even after the gui is closed. The log spam only stops when I kill deluged.

$ deluge --version
deluge 2.0.3
libtorrent: 2.0.5.0
Python: 3.9.2
OS: Linux Debian GNU/Linux unstable sid

I installed the debian package, which is version "2.0.3-3.1".

Apologies if this is a dupe, I tried to find any similar issues but couldn't.

Change History (7)

comment:1 by Arya Reais-Parsi, 2 years ago

Uh, oops. I think this is the same bug. Seems to have been fixed: https://bugzilla.redhat.com/show_bug.cgi?id=2026730

comment:2 by brainchild, 2 years ago

I am similarly affected, running the daemon under Linux Mint.

$ deluged --version
deluged 2.0.3
libtorrent: 2.0.5.0
Python: 3.10.4
OS: Linux Linux Mint 21 Vanessa

I do not believe that the bug reported for Red Hat is a duplicate, as it only affects resolution within that distribution, rather than the project main code base.

comment:3 by sivan-koren, 22 months ago

I'm having the same issue on Ubuntu 22.04.01.

Sep 28 18:17:48 yorkfield deluge-web[27435]: builtins.KeyError: 'disk.num_blocks_cache_hits'
Sep 28 18:17:48 yorkfield deluge-web[27435]: Unhandled Error
Sep 28 18:17:48 yorkfield deluge-web[27435]: Traceback (most recent call last):
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line >
Sep 28 18:17:48 yorkfield deluge-web[27435]:     daemon.start()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 164, i>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     reactor.run()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 131>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     self.mainLoop()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 132>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     reactorBaseSelf.runUntilCurrent()
Sep 28 18:17:48 yorkfield deluge-web[27435]: --- <exception caught here> ---
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 991>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     call.func(*call.args, **call.kw)
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 345, in >
Sep 28 18:17:48 yorkfield deluge-web[27435]:     self._update_session_cache_hit_ratio()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 361, in >
Sep 28 18:17:48 yorkfield deluge-web[27435]:     self.session_status['disk.num_blocks_cache_hits'] / blocks_read
Sep 28 18:17:48 yorkfield deluge-web[27435]: builtins.KeyError: 'disk.num_blocks_cache_hits'
Sep 28 18:17:48 yorkfield deluge-web[27435]: 18:17:48 [CRITICAL][twisted                       :147 ] Unhandled Error
Sep 28 18:17:48 yorkfield deluge-web[27435]: Traceback (most recent call last):
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line >
Sep 28 18:17:48 yorkfield deluge-web[27435]:     daemon.start()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 164, i>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     reactor.run()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 131>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     self.mainLoop()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 132>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     reactorBaseSelf.runUntilCurrent()
Sep 28 18:17:48 yorkfield deluge-web[27435]: --- <exception caught here> ---
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 991>
Sep 28 18:17:48 yorkfield deluge-web[27435]:     call.func(*call.args, **call.kw)
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 345, in >
Sep 28 18:17:48 yorkfield deluge-web[27435]:     self._update_session_cache_hit_ratio()
Sep 28 18:17:48 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 361, in >
Sep 28 18:17:48 yorkfield deluge-web[27435]:     self.session_status['disk.num_blocks_cache_hits'] / blocks_read
Sep 28 18:17:48 yorkfield deluge-web[27435]: builtins.KeyError: 'disk.num_blocks_cache_hits'
Sep 28 18:17:49 yorkfield deluge-web[27435]: Unhandled Error
Sep 28 18:17:49 yorkfield deluge-web[27435]: Traceback (most recent call last):
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line >
Sep 28 18:17:49 yorkfield deluge-web[27435]:     daemon.start()
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon.py", line 164, i>
Sep 28 18:17:49 yorkfield deluge-web[27435]:     reactor.run()
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 131>
Sep 28 18:17:49 yorkfield deluge-web[27435]:     self.mainLoop()
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 132>
Sep 28 18:17:49 yorkfield deluge-web[27435]:     reactorBaseSelf.runUntilCurrent()
Sep 28 18:17:49 yorkfield deluge-web[27435]: --- <exception caught here> ---
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 991>
Sep 28 18:17:49 yorkfield deluge-web[27435]:     call.func(*call.args, **call.kw)
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 345, in >
Sep 28 18:17:49 yorkfield deluge-web[27435]:     self._update_session_cache_hit_ratio()
Sep 28 18:17:49 yorkfield deluge-web[27435]:   File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 361, in >
Sep 28 18:17:49 yorkfield deluge-web[27435]:     self.session_status['disk.num_blocks_cache_hits'] / blocks_read

comment:4 by Karthik T, 19 months ago

I face this issue as well on armbian

$ deluged --version
deluged 2.0.3
libtorrent: 2.0.5.0
Python: 3.10.6
OS: Linux Ubuntu 22.04 Jammy Jellyfish

The post above does indeed has the fix.. seems the fix is merged but not released yet, it is https://github.com/deluge-torrent/deluge/commit/89189adb24321c3db6bfa816ec557d7d8367ba24.

I can confirm that it works.. you can manually apply that change to fix the spam.

in reply to:  4 comment:5 by jcgit1, 12 months ago

Replying to ktaragorn:

I face this issue as well on armbian

$ deluged --version
deluged 2.0.3
libtorrent: 2.0.5.0
Python: 3.10.6
OS: Linux Ubuntu 22.04 Jammy Jellyfish

The post above does indeed has the fix.. seems the fix is merged but not released yet, it is https://github.com/deluge-torrent/deluge/commit/89189adb24321c3db6bfa816ec557d7d8367ba24.

I can confirm that it works.. you can manually apply that change to fix the spam.

Applying the change also resolved this for me on Ubuntu 23.04

deluged 2.0.3 libtorrent: 2.0.8.0 Python: 3.11.2 OS: Linux Ubuntu 23.04 Lunar Lobster

in reply to:  4 comment:6 by sup2069, 11 months ago

Replying to ktaragorn:

I face this issue as well on armbian

$ deluged --version
deluged 2.0.3
libtorrent: 2.0.5.0
Python: 3.10.6
OS: Linux Ubuntu 22.04 Jammy Jellyfish

The post above does indeed has the fix.. seems the fix is merged but not released yet, it is https://github.com/deluge-torrent/deluge/commit/89189adb24321c3db6bfa816ec557d7d8367ba24.

I can confirm that it works.. you can manually apply that change to fix the spam.

Making the changes fixed this error for me as well.

Deluged 2.0.3, libtorrent: 2.0.8-1 Python: 3.11.2 OS: Linux Debian 12 Bookworm

comment:7 by Calum, 10 months ago

Milestone: needs verified2.0.4
Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.