Subject: top(1) & sysctl failures
To: NetBSD current <current-users@netbsd.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 02/20/2004 14:05:23
Hi,

I recently noticed some top(1) failures on both i386 and amd64 running
(-current). It seems that a `sysctl' call is sometimes failing (see
trace below) on memory allocation, but both machines are full of free
ram when such problems arise ...

njoly@calimero [~]> top 2>top.err
njoly@calimero [~]> echo $?
23
njoly@calimero [~]> cat top.err 
kvm_open: kvm_getproc2: Cannot allocate memory
top: Out of memory.

[...]
  2900 top      CALL  swapctl(6,0x527800,1)
  2900 top      RET   swapctl 1
  2900 top      CALL  __sysctl(0x7f7ffffff770,6,0,0x7f7ffffff318,0,0)
  2900 top      RET   __sysctl 0
  2900 top      CALL  __sysctl(0x7f7ffffff770,6,0x528000,0x7f7ffffff318,0,0)
  2900 top      RET   __sysctl -1 errno 12 Cannot allocate memory
  2900 top      CALL  write(2,0x7f7fffffe740,0xa)
  2900 top      GIO   fd 2 wrote 10 bytes
       "kvm_open: "
  2900 top      RET   write 10/0xa
  2900 top      CALL  write(2,0x7f7fffffe820,0xc)
  2900 top      GIO   fd 2 wrote 12 bytes
       "kvm_getproc2"
  2900 top      RET   write 12/0xc
  2900 top      CALL  issetugid
  2900 top      RET   issetugid 0
[...]

njoly@calimero [~]> uname -a
NetBSD calimero.sis.pasteur.fr 1.6ZK NetBSD 1.6ZK (GENERIC.MP) #2: Thu Feb 19 18:53:24 CET 2004  njoly@calimero.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/GENERIC.MP amd64

Thanks in advance,
Regards.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.