Your message dated Mon, 25 Jul 2011 12:32:46 +0000
with message-id <[email protected]>
and subject line Bug#620557: fixed in procps 1:3.2.8-11
has caused the Debian Bug report #620557,
regarding procps: vmstat truncate so 32 bit programs get meaningful data
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.)
--
620557: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620557
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: procps
Version: 1:3.2.8-9
Severity: normal
Tags: upstream patch
>From 64822112bb271a2195f3df3f9a54498d04005597 Mon Sep 17 00:00:00 2001
From: David Fries <[email protected]>
Date: Sat, 2 Apr 2011 12:39:11 -0500
Subject: [PATCH 2/2] vmstat truncate so 32 bit programs get meaningful data
Truncate 64 bit to 32 bit when reading /proc/vmstat in 32 bit programs.
32 bit kernels would have truncated the values already, but 64 bit
kernels don't, so once a variable goes over 32 bits existing programs
only get a max unsigned long value. Truncate it so they would get
the same values they always used to on 32 bit kernels. 64 bit
programs continue to get the full value. It was either this, modify
the API to always use 64 bit values, or add another function that
would pass the 64 bit values in 32 bit programs.
---
proc/sysinfo.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/proc/sysinfo.c b/proc/sysinfo.c
index 6b40825..744dc47 100644
--- a/proc/sysinfo.c
+++ b/proc/sysinfo.c
@@ -745,6 +745,9 @@ void vminfo(void){
{"slabs_scanned", &vm_slabs_scanned},
};
const int vm_table_count = sizeof(vm_table)/sizeof(vm_table_struct);
+#if __SIZEOF_LONG__ == 4
+ unsigned long long slotll;
+#endif
vm_pgalloc = 0;
vm_pgrefill = 0;
@@ -768,7 +771,15 @@ void vminfo(void){
);
head = tail+1;
if(!found) goto nextline;
+#if __SIZEOF_LONG__ == 4
+ // A 32 bit kernel would have already truncated the value, a 64 bit kernel
+ // doesn't need to. Truncate here to let 32 bit programs to continue to
get
+ // truncated values. It's that or change the API for a larger data type.
+ slotll = strtoull(head,&tail,10);
+ *(found->slot) = (unsigned long)slotll;
+#else
*(found->slot) = strtoul(head,&tail,10);
+#endif
nextline:
//if(found) fprintf(stderr,"%s=%d\n",found->name,*(found->slot));
--
1.7.2.3
>From c5a8218729754095cd6c8d9573f6e16123da190d Mon Sep 17 00:00:00 2001
From: David Fries <[email protected]>
Date: Sat, 2 Apr 2011 12:05:52 -0500
Subject: [PATCH 1/2] sysinfo.c correct sscanf argument
Was taking the address of the array, but should have just been the
array pointer without taking the address.
---
proc/sysinfo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/proc/sysinfo.c b/proc/sysinfo.c
index 65d94d7..6b40825 100644
--- a/proc/sysinfo.c
+++ b/proc/sysinfo.c
@@ -838,7 +838,7 @@ unsigned int getdiskstat(struct disk_stat **disks, struct
partition_stat **parti
break;
}
fields = sscanf(buff, " %*d %*d %15s %*u %*u %*u %*u %*u %*u %*u %*u %*u
%*u %u",
- &devname, &dummy);
+ devname, &dummy);
if (fields == 2 && is_disk(devname)){
(*disks) = realloc(*disks, (cDisk+1)*sizeof(struct disk_stat));
sscanf(buff, " %*d %*d %15s %u %u %llu %u %u %u %llu %u %u %u %u",
--
1.7.2.3
-- System Information:
Debian Release: 6.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.36-rc7+ (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
Versions of packages procps depends on:
ii initscripts 2.88dsf-13.1 scripts for initializing and shutt
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libncurses5 5.7+20100313-5 shared libraries for terminal hand
ii libncursesw5 5.7+20100313-5 shared libraries for terminal hand
ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
Versions of packages procps recommends:
ii psmisc 22.11-1 utilities that use the proc file s
procps suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: procps
Source-Version: 1:3.2.8-11
We believe that the bug you reported is fixed in the latest version of
procps, which is due to be installed in the Debian FTP archive:
libproc-dev_3.2.8-11_amd64.deb
to main/p/procps/libproc-dev_3.2.8-11_amd64.deb
procps_3.2.8-11.debian.tar.gz
to main/p/procps/procps_3.2.8-11.debian.tar.gz
procps_3.2.8-11.dsc
to main/p/procps/procps_3.2.8-11.dsc
procps_3.2.8-11_amd64.deb
to main/p/procps/procps_3.2.8-11_amd64.deb
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.
Craig Small <[email protected]> (supplier of updated procps 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: SHA1
Format: 1.8
Date: Mon, 25 Jul 2011 22:20:41 +1000
Source: procps
Binary: procps libproc-dev
Architecture: source amd64
Version: 1:3.2.8-11
Distribution: unstable
Urgency: low
Maintainer: Craig Small <[email protected]>
Changed-By: Craig Small <[email protected]>
Description:
libproc-dev - library for accessing process information from /proc
procps - /proc file system utilities
Closes: 620557 632749
Changes:
procps (1:3.2.8-11) unstable; urgency=low
.
* No more complaints for 3.0 kernels Closes: #632749
* vmstat truncated to 32bits Closes: #620557
* Update to standards version 3.9.2
Checksums-Sha1:
9a5e01d27eb216dbe7f459250f8d04c3dcbbbdba 1178 procps_3.2.8-11.dsc
e300d30209fe97b1c4d88a2b25586682377ec70b 97608 procps_3.2.8-11.debian.tar.gz
c68cc6be5f554016b6a73f73f18774e40928a3ca 250164 procps_3.2.8-11_amd64.deb
f3c972f01d471a3685b45a95d65fac29bfca2484 65484 libproc-dev_3.2.8-11_amd64.deb
Checksums-Sha256:
381e0e1173d643784755dc93e3149e836c58a6591dbaf22f2500bb21459d85d9 1178
procps_3.2.8-11.dsc
a7472ef878ac05b6de430d9839e6818990cf01880c62fd524d7fe5f37afaf437 97608
procps_3.2.8-11.debian.tar.gz
345e0c252ca6002f06ce46985b5ef7a8949bdc4e6798ba20b0eea51b89e61a51 250164
procps_3.2.8-11_amd64.deb
caf161b595d65d4fe90e37b952666c3e7d1919463e1c944c4596d84ddb6221d4 65484
libproc-dev_3.2.8-11_amd64.deb
Files:
556df23c77ba30f8744bf663298e6b08 1178 admin important procps_3.2.8-11.dsc
4c59ed16c2911a9fa47a0debb5dd0702 97608 admin important
procps_3.2.8-11.debian.tar.gz
a77aafdea9ddee998244a86ba6da0d74 250164 admin important
procps_3.2.8-11_amd64.deb
33a275ceae67328871b749470b493e1d 65484 libdevel optional
libproc-dev_3.2.8-11_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk4tYgQACgkQx2zlrBLK36UOMgCfbIUQp6UL8L0aNWJcX9qemELR
QKcAn1CUWT9FvbuZ/GNAeBipj84/RrCp
=MsUS
-----END PGP SIGNATURE-----
--- End Message ---