Package: procps Version: 1:3.2.8-9squeeze1 Severity: normal Tags: upstream patch
With kernel 3.4.2, vmstat crashes with SIGFPE. The crash happens very often so that it is reproducible. On other computer (running with older kernel) I observed unreproducible vmstat SIGFPE crash in kvm virtualized environment. I provide this source code patch for vmstat. --- vmstat.c_ 2012-06-17 19:21:33.000000000 +0200 +++ vmstat.c 2012-06-17 19:22:09.000000000 +0200 @@ -203,6 +203,7 @@ diow= *cpu_iow; dstl= *cpu_zzz; Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked, @@ -252,6 +253,7 @@ } Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked, -- System Information: Debian Release: 6.0.5 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 3.4.2 (PREEMPT) Locale: LANG=cs_CZ, LC_CTYPE=cs_CZ (charmap=ISO-8859-2) Shell: /bin/sh linked to /bin/dash Versions of packages procps depends on: ii initscripts 2.88dsf-13.1+squeeze1 scripts for initializing and shutt ii libc6 2.11.3-3 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
--- vmstat.c_ 2012-06-17 19:21:33.000000000 +0200 +++ vmstat.c 2012-06-17 19:22:09.000000000 +0200 @@ -203,6 +203,7 @@ diow= *cpu_iow; dstl= *cpu_zzz; Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked, @@ -252,6 +253,7 @@ } Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked,
--- vmstat.c_ 2012-06-17 19:21:33.000000000 +0200 +++ vmstat.c 2012-06-17 19:22:09.000000000 +0200 @@ -203,6 +203,7 @@ diow= *cpu_iow; dstl= *cpu_zzz; Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked, @@ -252,6 +253,7 @@ } Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked,
--- vmstat.c_ 2012-06-17 19:21:33.000000000 +0200 +++ vmstat.c 2012-06-17 19:22:09.000000000 +0200 @@ -203,6 +203,7 @@ diow= *cpu_iow; dstl= *cpu_zzz; Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked, @@ -252,6 +253,7 @@ } Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked,
--- vmstat.c_ 2012-06-17 19:21:33.000000000 +0200 +++ vmstat.c 2012-06-17 19:22:09.000000000 +0200 @@ -203,6 +203,7 @@ diow= *cpu_iow; dstl= *cpu_zzz; Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked, @@ -252,6 +253,7 @@ } Div= duse+dsys+didl+diow+dstl; + if (!Div) Div = 1, didl = 1; divo2= Div/2UL; printf(format, running, blocked,