kvm_open errors on /proc/*/mem in top

Jim Bryant kc5vdj.freebsd at gmail.com
Thu Jun 9 20:27:55 UTC 2011


i'm not sure which list this belongs to, so i'm posting to -hackers and
-stable.

i've noticed for a while now that during heavy activity (for instance
buildworld), that top will get these kvm_read errors when reading proc
mem entries.

i have included a screenshot of what happens during such events...

last pid: 92024;  load averages:  4.79,  4.58,
4.10
up 0+00:49:07  15:30:53
225 processes: 10 running, 197 sleeping, 18 waiting
CPU: 90.6% user,  0.0% nice,  9.4% system,  0.0% interrupt,  0.0% idle
Mem: 493M Active, 1337M Inact, 604M Wired, 632K Cache, 315M Buf, 524M Free
Swap: 4097M Total, 4097M Free
kvm_open: cannot open /proc/86755/mem
  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
91943 root          1  97    0 39536K 33620K RUN     1   0:01  7.37%
[cc1plus]
2859 jbryant       1  48    0   406M 72332K select  0   3:10  5.96%
kwin -session 1028b2382461f5000127042056000000019550000_13
2747 root          1  46    0   419M   370M select  0   1:43  4.39%
/usr/local/bin/X :0 -nolisten tcp -auth /var/run/xauth/A:0
1464 root          1  44    0  8068K  1384K select  0   0:03  0.39%
/usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.u
11219 jbryant       7  44    0   299M   109M select  1   0:17  0.29%
/usr/local/lib/thunderbird/thunderbird-bin
2865 jbryant       1  45    0   453M 86140K select  0   0:21  0.20%
kdeinit4: kdeinit4: plasma-desktop (kdeinit4)
2882 jbryant       1  44    0   391M 60996K select  0   0:17  0.10%
kdeinit4: kdeinit4: kmix -session 102511e52251c60001304471
92001 root          1  97    0 23452K 22256K CPU1    1   0:00  0.00% [cc1]
92017 root          1  96    0 16172K 13440K RUN     0   0:00  0.00% [cc1]


and such as this:

last pid: 19348;  load averages:  1.03,  1.93,
2.84
up 1+04:42:07  15:31:37
201 processes: 4 running, 178 sleeping, 19 waiting
CPU: 47.4% user,  0.0% nice,  3.4% system,  0.0% interrupt, 49.3% idle
Mem: 318M Active, 2400M Inact, 679M Wired, 1948K Cache, 407M Buf, 428M Free
Swap: 8192M Total, 6488K Used, 8186M Free
kvm_open: cannot open /proc/1141/memm
kvm_open: cannot open /proc/92606/mem    RES STATE   C   TIME   WCPU COMMAND
   10 root          2 171 ki31     0K    32K RUN     0  55.9H 103.81% [idle]
19344 root          1  96    0 17188K 14300K CPU1    0   0:00  0.00% [cc1]
19341 root          1  76    0  3204K  1068K select  1   0:00  0.00%
make all DIRPRFX=fdc/
19342 root          1  76    0  8340K  1848K wait    1   0:00  0.00% sh -ev
19343 root          1  76    0  3204K   596K wait    0   0:00  0.00% [cc]
19345 root          1  76    0  3204K  1292K piperd  0   0:00  0.00%
/usr/obj/usr/src/tmp/usr/bin/as -Qy -o fdc.o

the current fix for this is to [CTRL]-L.

i assume that what is happening is that top just loosing track of what's
running, and the procs are dead by the time it tries to read them, or
that the proc ends during top reading.

is there any way to fix this?  it's annoying as f&#k.


ps: running 8-STABLE.




More information about the freebsd-stable mailing list