Your message dated Wed, 28 Feb 2018 11:04:46 +0000
with message-id <[email protected]>
and subject line Bug#873446: fixed in conky 1.10.8-1
has caused the Debian Bug report #873446,
regarding conky: Conky segfaults on some multicore systems when $cpugraph,
$cpubar, etc are used
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
873446: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873446
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: conky
Version: 1.10.6-1.1bds
Severity: important
Tags: patch
This patch corrects a segfault (and general instability) associated with
CPU monitoring $cpugraph, $cpubar, and related load monitoring
directives that occurred when the kernel reports a non-sequential list
of CPU indices on an SMP system.
This is a new bug that arrived with the 'stretch' version of conky.
For example, "/sys/devices/system/cpu/present" for my AMD FX(tm)-6350
Six-Core Processor reports "0,3-7" (stock debian kernel 4.9.0-3-amd64 ).
I assume that chip is really an 8-core die with two cores disabled...
Presumably you could also get "0,3-4,6", and other combos too.
This bug and patch has also been reported upstream:
https://github.com/brndnmtthws/conky/pull/416
This may be the same problem reported in Bug #863144: "conky: seqfaults"
-- Brad
-- System Information:
Debian Release: 9.1
APT prefers stable
APT policy: (900, 'stable'), (80, 'unstable'), (60, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-3-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages conky depends on:
ii conky-all 1.10.6-1
conky recommends no packages.
conky suggests no packages.
-- no debconf information
From d3065426868cdf63ccbbaf6afd917de64403ae49 Mon Sep 17 00:00:00 2001
From: Brad Sawatzky <[email protected]>
Date: Sun, 27 Aug 2017 16:10:48 -0400
Subject: [PATCH] Fix segfault when kernel reports non-sequential SMP CPU
indices
- For an AMD FX(tm)-6350 Six-Core Processor the file '/sys/.../present'
reports "0,3-7". I assume that chip is really an 8-core die with two
cores disabled... Presumably you could also get "0,3-4,6", and other
combos too...
---
src/linux.cc | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/src/linux.cc b/src/linux.cc
index 664ddf5e..5ebed315 100644
--- a/src/linux.cc
+++ b/src/linux.cc
@@ -801,8 +801,11 @@ void get_cpu_count(void)
{
FILE *stat_fp;
static int rep = 0;
- int highest_cpu_index;
char buf[256];
+ char *str1, *str2, *token, *subtoken;
+ char *saveptr1, *saveptr2;
+ int subtoken1=-1;
+ int subtoken2=-1;
if (info.cpu_usage) {
return;
@@ -819,11 +822,30 @@ void get_cpu_count(void)
break;
}
- if (sscanf(buf, "%*d-%d", &highest_cpu_index) == 1) {
- info.cpu_count = highest_cpu_index;
+ // Do some parsing here to handle skipped cpu numbers. For example,
+ // for an AMD FX(tm)-6350 Six-Core Processor /sys/.../present reports
+ // "0,3-7". I assume that chip is really an 8-core die with two cores
+ // disabled... Presumably you could also get "0,3-4,6", and other
+ // combos too...
+ for (str1 = buf; ; str1 = NULL) {
+ token = strtok_r(str1, ",", &saveptr1);
+ if (token == NULL) break;
+ ++info.cpu_count;
+
+ subtoken1=-1;
+ subtoken2=-1;
+ for (str2 = token; ; str2 = NULL) {
+ subtoken = strtok_r(str2, "-", &saveptr2);
+ if (subtoken == NULL) break;
+ if(subtoken1 < 0)
+ subtoken1=atoi(subtoken);
+ else
+ subtoken2=atoi(subtoken);
+ }
+ if(subtoken2 > 0)
+ info.cpu_count += subtoken2 - subtoken1;
}
}
- ++info.cpu_count;
info.cpu_usage = (float*)malloc((info.cpu_count + 1) * sizeof(float));
fclose(stat_fp);
@@ -896,7 +918,7 @@ int update_stat(void)
} else if (strncmp(buf, "cpu", 3) == 0) {
double delta;
if (isdigit(buf[3])) {
- idx = atoi(&buf[3]) + 1;
+ idx++; //just increment here since the CPU index can skip numbers
} else {
idx = 0;
}
--
2.11.0
--- End Message ---
--- Begin Message ---
Source: conky
Source-Version: 1.10.8-1
We believe that the bug you reported is fixed in the latest version of
conky, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Vincent Cheng <[email protected]> (supplier of updated conky 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 [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 28 Feb 2018 02:22:09 -0800
Source: conky
Binary: conky-std conky-std-dbg conky-cli conky-cli-dbg conky-all conky-all-dbg
conky
Architecture: source
Version: 1.10.8-1
Distribution: unstable
Urgency: medium
Maintainer: Vincent Cheng <[email protected]>
Changed-By: Vincent Cheng <[email protected]>
Description:
conky - highly configurable system monitor (transitional package)
conky-all - highly configurable system monitor (all features enabled)
conky-all-dbg - highly configurable system monitor (all features enabled -
debug)
conky-cli - highly configurable system monitor (basic version)
conky-cli-dbg - highly configurable system monitor (basic version - debug)
conky-std - highly configurable system monitor (default version)
conky-std-dbg - highly configurable system monitor (default version - debug)
Closes: 865138 873446
Changes:
conky (1.10.8-1) unstable; urgency=medium
.
* Acknowledge NMU, thanks to Adrian Bunk!
* New upstream release.
- Fix segfault when kernel reports non-sequential SMP CPU indices.
(Closes: #873446)
- Drop debian/patches/gcc-7.patch, applied upstream.
* Remove build-dep on automake. (Closes: #865138)
* Update Standards version from 3.9.8 to 4.1.3.
- Update all priority: extra packages to priority: optional.
Checksums-Sha1:
222ec2787c62f65104444a8de853b1a710c9e1a4 2706 conky_1.10.8-1.dsc
8dea9614cf39cce8df8b7080c1cef6741d112887 373075 conky_1.10.8.orig.tar.gz
37896b9de30519e4fd4439cf608ec6fc2de7f6d6 17356 conky_1.10.8-1.debian.tar.xz
d784a151625aebdb423dd59760a7f85730a6ffe8 15230 conky_1.10.8-1_source.buildinfo
Checksums-Sha256:
4667dc5d0950eb43d4366c64cc4fc46deee3d2ae70d2ce9b3ca9e959c05952b9 2706
conky_1.10.8-1.dsc
2ebd655a27c816bd613538b71d4ec1c096252cb522feaa05f64781dcedea8857 373075
conky_1.10.8.orig.tar.gz
d7c08ee5cb8c603acf176897cbd9ca2f669088c89443b754567b1addfe39bced 17356
conky_1.10.8-1.debian.tar.xz
75d4fd92b4a8d082abd2967a90c331d2c51c4099633e45be0c051f2a1ad91d86 15230
conky_1.10.8-1_source.buildinfo
Files:
75e8283eaeb560066d4bbb70fe5a830e 2706 utils optional conky_1.10.8-1.dsc
b02bc92e4b02d4f18259ab3a26c8c5ba 373075 utils optional conky_1.10.8.orig.tar.gz
b88367ebc30240abf7e9d89138d2960e 17356 utils optional
conky_1.10.8-1.debian.tar.xz
1eb5524339ffa564b89dd5fc3805ce4f 15230 utils optional
conky_1.10.8-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE1TqBWjy3ZZr4guOVju3MG6ofMv8FAlqWh/sACgkQju3MG6of
Mv83yRAAx0TPN1EldG5Wj3hysjgW5UoPv60/uz8Oo1p6t8n8qBqSMgZajzDbcfo6
lDxdR0rBaMWQQnzNkBBpUP1+6LyxVW6nWWrIqGWKSchvyLvOis70fCpnydyjOn3H
yN5Pajxc7Q0HGMxZiZV2EsAQuYqdVv9M049qxHWcN929yEOnCrn+vAAzPyhD4jhg
/B4Je/2LV5vOfyIUSEXllp0eQ1VoHuj+Dp2GfX5j+m8G+TR+QYH4ilvsq54S7fns
8Kh7NLeKKXBbcKlOOj7HB1CXBNy7vKms+/GuYlWb61fRHANrBXNw7YIVK7XgjrDD
GLHytTrRPv3zdRhEPSJgk33qMN6xm1YYGahTg3cNJArZ7BlThE1Pc/AJsm2Hm5XS
+pgqKkWl/1VkEbUJ0FeZHLuxh7GdkH/bNcrbPuLrh5C1aCepmGi91yMHeKpOYZL6
rVlg1e5pY+4F9Mna3E9IgyGr2fJg8gixu09vbY4nsAyJOjLkDjabx7S4RffiSeLh
42IXUkjHhoy559qsKrmYhiOmR9uVjGD0Jxbmq9wb+NvrWPMCrn1ORXoQVbts7LtY
XeO1rcmlPmYw9Oh4DvwgKSxuiGFpj1iMeoSsMH7mFKRyeKl1IeKr1amV/blqjyyW
dCnpLxHKq86UDvtpjf3DrzQIQAtWke5TIlPn8Cys0v2eA3nKi0k=
=QGT5
-----END PGP SIGNATURE-----
--- End Message ---