Opened 2 years ago

Closed 7 months ago

#3514 closed bug (Fixed)

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

Reported by: growly 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 Changed 2 years ago by growly

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 Changed 21 months ago by brainchild

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 Changed 19 months ago by sivan-koren

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 follow-ups: Changed 16 months ago by 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.

comment:5 in reply to: ↑ 4 Changed 9 months ago by jcgit1

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

comment:6 in reply to: ↑ 4 Changed 8 months ago by sup2069

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 Changed 7 months ago by Cas

  • Milestone changed from needs verified to 2.0.4
  • Resolution set to Fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.