Subject: systat(:swap) misbehaving
To: None <port-sparc@NetBSD.ORG>
From: Paul Boven <e.p.boven@student.utwente.nl>
List: port-sparc
Date: 01/21/1997 03:33:30
Hello everyone,
While compiling something large I was using systat to monitor the use
of virtual memory by looking at the :swap display. Alas, in this mode
systat never really lives very long, exciting with SIGSEGV's for instance.
Usually this is preceded by a "cannot read swapmap: kwm_read: Bad address"
generated in fetchswap(). "Uptime" for systat is rarely more than 10
minutes while compiling, it seems to last longer when swap isn't being
used so heavily. I compiled systat (current sources and includes, current
kernel) with -g, and here is the output from gdb:
P.s. the man page for systat, or at least the :vmstat part of it, is rather
out of sync with how the display looks
cannot read swapmap: kvm_read: Bad address
Program received signal SIGSEGV (11), Segmentation fault
0x8578 in fetchswap () at swap.c:172
172 for (mp++; mp->m_addr != 0; mp++) {
(gdb) bt
#0 0x8578 in fetchswap () at swap.c:172
#1 0x54e8 in display (signo=14) at main.c:227
#2 0xf7ffff74 in end ()
#3 0x100ef208 in __sread ()
#4 0x2c20726d in end ()
#5 0x100de250 in __srefill ()
#6 0x100de0a4 in __srget ()
#7 0x1004160c in wgetch ()
#8 0x4b8c in keyboard () at keyboard.c:64
#9 0x5364 in main (argc=0, argv=0xf7fff7a0) at main.c:192
(gdb) print mp
$1 = (struct mapent *) 0x65000
(gdb) print mp->m_addr
Error accessing memory address 0x65004: Operation not permitted.
(gdb)
--
----------------------------------------------------------------------
Paul Boven, <e.p.boven@student.utwente.nl> PE1NUT QRV 145.575 JO32KF
Nothing would get done in the world, if we didn't have insomniacs.
Or at least, nothing would get done at night.
----------------------------------------------------------------------