Debian Bug report logs - #1124028
cpulimit: assumes wrong HZ value

version graph

Package: cpulimit; Maintainer for cpulimit is gregor herrmann <gregoa@debian.org>; Source for cpulimit is src:cpulimit (PTS, buildd, popcon).

Reported by: наб <nabijaczleweli@nabijaczleweli.xyz>

Date: Fri, 26 Dec 2025 17:01:03 UTC

Severity: normal

Found in version cpulimit/2.8-1

Fixed in version cpulimit/3.2-1

Done: gregor herrmann <gregoa@debian.org>

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, gregor herrmann <gregoa@debian.org> (cpulimit for {1124028}):
Bug#1124028; Package cpulimit. (Fri, 26 Dec 2025 17:01:07 GMT) (full text, mbox, link).


Acknowledgement sent to наб <nabijaczleweli@nabijaczleweli.xyz>:
New Bug report received and forwarded. Copy sent to gregoa@debian.org. (Fri, 26 Dec 2025 17:01:07 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cpulimit: assumes wrong HZ value
Date: Fri, 26 Dec 2025 17:58:55 +0100
[Message part 1 (text/plain, inline)]
Package: cpulimit
Version: 2.8-1
Severity: normal

Dear Maintainer,

cpulimit(1) says
  The current version of cpulimit assumes the kernel HZ value 100.
but
  $ grep ^CONFIG_HZ /boot/config-*
  /boot/config-6.1.0-27-amd64:CONFIG_HZ_250=y
  /boot/config-6.1.0-27-amd64:CONFIG_HZ=250
  /boot/config-6.1.0-35-amd64:CONFIG_HZ_250=y
  /boot/config-6.1.0-35-amd64:CONFIG_HZ=250
and
  /boot/config-6.5.0-3-amd64:CONFIG_HZ_250=y
  /boot/config-6.5.0-3-amd64:CONFIG_HZ=250
  /boot/config-6.7.7-amd64:CONFIG_HZ_250=y
  /boot/config-6.7.7-amd64:CONFIG_HZ=250
and
  /boot/config-6.17.13+deb14-amd64:CONFIG_HZ_250=y
  /boot/config-6.17.13+deb14-amd64:CONFIG_HZ=250

So this hasn't been correct since at least bookworm,
and still isn't in sid.

Best,

-- System Information:
Debian Release: 12.11
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable-debug'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-35-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cpulimit depends on:
ii  libc6  2.36-9+deb12u10

cpulimit recommends no packages.

cpulimit suggests no packages.

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, gregor herrmann <gregoa@debian.org> (cpulimit for {1124028}):
Bug#1124028; Package cpulimit. (Fri, 26 Dec 2025 17:37:03 GMT) (full text, mbox, link).


Acknowledgement sent to наб <nabijaczleweli@nabijaczleweli.xyz>:
Extra info received and forwarded to list. Copy sent to gregoa@debian.org. (Fri, 26 Dec 2025 17:37:03 GMT) (full text, mbox, link).


Message #10 received at 1124028@bugs.debian.org (full text, mbox, reply):

From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: 1124028@bugs.debian.org
Subject: Re: Bug#1124028: cpulimit: assumes wrong HZ value
Date: Fri, 26 Dec 2025 18:17:09 +0100
[Message part 1 (text/plain, inline)]
I blamed back as far as I could stomach the Salsa UI:
  https://salsa.debian.org/kernel-team/linux/-/commit/ba8a8dcf45455676fcb47c4796f7ca39ef3b1c59
is the commit that changed from "a mix of HZ=250/HZ=1000 per arch"
to "HZ=250 everywhere", dated 2006-04-30.

Per tracker.d.o, the first cpulimit upload was on 2006-06-15,
so this was never right for Debian kernels.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, gregor herrmann <gregoa@debian.org> (cpulimit for {1124028}):
Bug#1124028; Package cpulimit. (Fri, 26 Dec 2025 18:09:31 GMT) (full text, mbox, link).


Acknowledgement sent to Jesse Smith <jessefrgsmith@yahoo.ca>:
Extra info received and forwarded to list. Copy sent to gregoa@debian.org. (Fri, 26 Dec 2025 18:09:31 GMT) (full text, mbox, link).


Message #15 received at 1124028@bugs.debian.org (full text, mbox, reply):

From: Jesse Smith <jessefrgsmith@yahoo.ca>
To: наб <nabijaczleweli@nabijaczleweli.xyz>, 1124028@bugs.debian.org
Subject: Re: Bug#1124028: cpulimit: assumes wrong HZ value
Date: Fri, 26 Dec 2025 13:18:38 -0400
Since this configuration option is going to be distro-independent (and 
possibly architecture independent) I would suggest the build process 
could be patched to handle this by reading the kernel configuration;

  grep 'CONFIG_HZ=' /boot/config-$(uname -r) | cut -f 2 -d '='

The above line returns the HZ value for the kernel performing the build 
which (I would guess) would match the configuration used by the kernel 
on any machines running the distribution?

Ideally this would be handled at run time, but I'm not aware of a 
cross-distro syscall that can read the kernel's HZ value.

- Jesse



On 12/26/25 12:58 PM, наб wrote:
> Package: cpulimit
> Version: 2.8-1
> Severity: normal
> 
> Dear Maintainer,
> 
> cpulimit(1) says
>    The current version of cpulimit assumes the kernel HZ value 100.
> but
>    $ grep ^CONFIG_HZ /boot/config-*
>    /boot/config-6.1.0-27-amd64:CONFIG_HZ_250=y
>    /boot/config-6.1.0-27-amd64:CONFIG_HZ=250
>    /boot/config-6.1.0-35-amd64:CONFIG_HZ_250=y
>    /boot/config-6.1.0-35-amd64:CONFIG_HZ=250
> and
>    /boot/config-6.5.0-3-amd64:CONFIG_HZ_250=y
>    /boot/config-6.5.0-3-amd64:CONFIG_HZ=250
>    /boot/config-6.7.7-amd64:CONFIG_HZ_250=y
>    /boot/config-6.7.7-amd64:CONFIG_HZ=250
> and
>    /boot/config-6.17.13+deb14-amd64:CONFIG_HZ_250=y
>    /boot/config-6.17.13+deb14-amd64:CONFIG_HZ=250
> 
> So this hasn't been correct since at least bookworm,
> and still isn't in sid.
> 
> Best,
> 
> -- System Information:
> Debian Release: 12.11
>    APT prefers oldstable-updates
>    APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable-debug'), (500, 'oldstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 6.1.0-35-amd64 (SMP w/24 CPU threads; PREEMPT)
> Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
> Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
> 
> Versions of packages cpulimit depends on:
> ii  libc6  2.36-9+deb12u10
> 
> cpulimit recommends no packages.
> 
> cpulimit suggests no packages.
> 
> -- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, gregor herrmann <gregoa@debian.org> (cpulimit for {1124028}):
Bug#1124028; Package cpulimit. (Fri, 26 Dec 2025 19:13:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jesse Smith <jessefrgsmith@yahoo.ca>:
Extra info received and forwarded to list. Copy sent to gregoa@debian.org. (Fri, 26 Dec 2025 19:13:03 GMT) (full text, mbox, link).


Message #20 received at 1124028@bugs.debian.org (full text, mbox, reply):

From: Jesse Smith <jessefrgsmith@yahoo.ca>
To: наб <nabijaczleweli@nabijaczleweli.xyz>, 1124028@bugs.debian.org
Subject: Re: Bug#1124028: cpulimit: assumes wrong HZ value
Date: Fri, 26 Dec 2025 14:21:12 -0400
On 12/26/25 1:17 PM, наб wrote:
> I blamed back as far as I could stomach the Salsa UI:
>    https://salsa.debian.org/kernel-team/linux/-/commit/ba8a8dcf45455676fcb47c4796f7ca39ef3b1c59
> is the commit that changed from "a mix of HZ=250/HZ=1000 per arch"
> to "HZ=250 everywhere", dated 2006-04-30.
> 
> Per tracker.d.o, the first cpulimit upload was on 2006-06-15,
> so this was never right for Debian kernels.

Interesting.

I have just uploaded a fix for this. Two fixes, really.

The first is that, on Linux, the assumed HZ vlue for the kernel is 250. 
This appears to be the default for most distributions/CPUs since kernel 
2.6.13.

The second change is there is now a "--hz" command line flag the user 
can use to override our default in case we guess wrong.

The new version has been announced here: 
https://limitcpu.sourceforge.net/news.php

- Jesse




Information forwarded to debian-bugs-dist@lists.debian.org, gregor herrmann <gregoa@debian.org> (cpulimit for {1124028}):
Bug#1124028; Package cpulimit. (Fri, 26 Dec 2025 19:39:10 GMT) (full text, mbox, link).


Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to gregoa@debian.org. (Fri, 26 Dec 2025 19:39:10 GMT) (full text, mbox, link).


Message #25 received at 1124028@bugs.debian.org (full text, mbox, reply):

From: gregor herrmann <gregoa@debian.org>
To: Jesse Smith <jessefrgsmith@yahoo.ca>, 1124028@bugs.debian.org
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Subject: Re: Bug#1124028: cpulimit: assumes wrong HZ value
Date: Fri, 26 Dec 2025 20:27:16 +0100
[Message part 1 (text/plain, inline)]
On Fri, 26 Dec 2025 14:21:12 -0400, Jesse Smith wrote:

>>Per tracker.d.o, the first cpulimit upload was on 2006-06-15,
>>so this was never right for Debian kernels.
>Interesting.
>I have just uploaded a fix for this. Two fixes, really.

And cpulimit_3.2-1 uploaded to Debian/unstable.

Thanks to both of you!



Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   
[signature.asc (application/pgp-signature, inline)]

Reply sent to gregor herrmann <gregoa@debian.org>:
You have taken responsibility. (Fri, 26 Dec 2025 21:49:41 GMT) (full text, mbox, link).


Notification sent to наб <nabijaczleweli@nabijaczleweli.xyz>:
Bug acknowledged by developer. (Fri, 26 Dec 2025 21:49:41 GMT) (full text, mbox, link).


Message #30 received at 1124028-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1124028-close@bugs.debian.org
Subject: Bug#1124028: fixed in cpulimit 3.2-1
Date: Fri, 26 Dec 2025 19:51:17 +0000
[Message part 1 (text/plain, inline)]
Source: cpulimit
Source-Version: 3.2-1
Done: gregor herrmann <gregoa@debian.org>

We believe that the bug you reported is fixed in the latest version of
cpulimit, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1124028@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
gregor herrmann <gregoa@debian.org> (supplier of updated cpulimit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 26 Dec 2025 20:23:46 +0100
Source: cpulimit
Architecture: source
Version: 3.2-1
Distribution: unstable
Urgency: medium
Maintainer: gregor herrmann <gregoa@debian.org>
Changed-By: gregor herrmann <gregoa@debian.org>
Closes: 1124028
Changes:
 cpulimit (3.2-1) unstable; urgency=medium
 .
   * Import upstream version 3.2.
     - Updated kernel HZ value to default to 250 on Linux since that is the
       configuration default.
     - Added new command line parameter, -j (--hz) which allows the user to
       override the kernel HZ value. We assume 250 on Linux and 100 on other
       kernels, but the user can set this to any integer value.
     Thanks: наб for the bug report, and Jesse Smith for the super quick fix.
     Closes: #1124028
   * Update years of packaging copyright.
   * Declare compliance with Debian Policy 4.7.3.
   * Remove «Rules-Requires-Root: no», which is the current default.
   * Remove «Priority: optional», which is the current default.
Checksums-Sha1:
 dc988d137e4f1985ff69e8e73d1fc77f15878aaf 2171 cpulimit_3.2-1.dsc
 c5fb254a5d92d5f6941b0ee9ab82c6749c2617bd 25776 cpulimit_3.2.orig.tar.gz
 2cd28b54c13c1429a5c5b71e92ad20cb0f8ba025 5264 cpulimit_3.2-1.debian.tar.xz
Checksums-Sha256:
 26ccc6c5dd258e49ddc80e7d8ef66c8f492fb27c44f49ffba28dfe9979e8651a 2171 cpulimit_3.2-1.dsc
 59ffeb1a3517afe45998714be8419260a43632f7cec08f0b026c1eccdff57cfc 25776 cpulimit_3.2.orig.tar.gz
 d41d1569848d697f81f0d324a93fd29eb20b744c74e954ae115db940ace925c9 5264 cpulimit_3.2-1.debian.tar.xz
Files:
 b92cc2640e9fb17702a3d9b5520eac3d 2171 admin optional cpulimit_3.2-1.dsc
 3b7c40749554fcfd4cb4121b51871fda 25776 admin optional cpulimit_3.2.orig.tar.gz
 35193a1009e3a60822b1a6daeb0096f8 5264 admin optional cpulimit_3.2-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmlO4UxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgaQTBAAnPzYC6BFi4Hz5ENjhEzF+PB1XUtTKFTTGlFHG8IgjYPbEQY5PvlwDOQp
fbM14vFYoL45EbcRCv8LAj2LHJ3EVgMP7LWCwLzIynyT2upC2KA3LXW8wfE/k03U
vw4OffdfRbaZfh0GZNf+5Ja0fgrEWdKJdmTibgVjbw/YXPdcVBNuJmKnPVq0eOF5
8tGKLPNqXOtJn2vg+blT80cubW+BgIxylbV3jaZlkWYloM7vDA6AzPjdyb6UYNRn
hjhWbegIgWH3LoZ9cN4rokrBF73g4lBqVBuwa0e+YgERpWWEeHWjGXrrjTwS4eQM
D35KixvXFMxWivEQI5i59QKuA6hhEu8n9Jo075Z/itBU2L7FbfScx1YA8U1hsf8p
6bu+jH3GT3H+ju7SgwYVQ0aysHgsBgIw30X88HHMHM8/n3WxLLrl2YRQzbTKe0DW
REhXorFUdPzmYxIaui4hl5mmftl2BtB3hzh4ThN94g25e5t8GLX5ZMjWHNAU1fH1
0D1w70E4IDuNzyqmATHzzb9lRGen/o/JlhizSKpVu3jD4l9VwN+rGgLT8ZDqU7jr
AyV2BdryVXyE8MfXv3Ju6p7C5BzGjLzMAigI6VNXqDcVEHLrhm4yc9FqpAQ982W6
0PKnUx4dcn/QngVXf32EwaHKIgcG291nOXyBCQ0Oi+jS8b6iIeg=
=kEkF
-----END PGP SIGNATURE-----

[Message part 2 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 23 19:39:12 2026; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.