Subject: Re: Processes hanging in disk access
To: Quentin Garnier <cube@cubidou.net>
From: Thomas Klausner <wiz@NetBSD.org>
List: current-users
Date: 02/10/2006 18:15:38
On Fri, Feb 10, 2006 at 06:11:04PM +0100, Quentin Garnier wrote:
> Why using gdb when ps can do the same?  (ps -M <core>).

Oh, cool. Thanks!

USER      PID %CPU %MEM  VSZ RSS TTY    STAT STARTED       TIME COMMAND UID   PID        PPID   CPU PRI NI  VSZ RSS WCHAN    STAT TTY          TIME COMMAND
root        0  0.0  0.0    0   0 ?      RWKs Wed01PM    0:00.00 [swappe   0     0 -1145249248     0 -18  0    0   0 schedule RWKs ?         0:00.00 [swapper]
root        1  0.0  0.0   72   0 ?      RWs  Wed01PM    0:00.00 init      0     1 -1145249248     0  10  0   72   0 wait     RWs  ?         0:00.00 init 
root        2  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [sysmon   0     2 -1145249248     0 -18  0    0   0 smtaskq  RWK  ?         0:00.00 [sysmon]
root        3  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     3 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus0]
root        4  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     4 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus1]
root        5  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     5 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus2]
root        6  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     6 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus3]
root        7  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     7 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus4]
root        8  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     8 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus5]
root        9  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0     9 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus6]
root       10  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atabus   0    10 -1145249248     0  -6  0    0   0 atath    RWK  ?         0:00.00 [atabus7]
root       11  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [usb0]    0    11 -1145249248     0  10  0    0   0 usbevt   RWK  ?         0:00.00 [usb0]
root       12  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [usbtas   0    12 -1145249248     0  10  0    0   0 usbtsk   RWK  ?         0:00.00 [usbtask]
root       13  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [usb1]    0    13 -1145249248     0  10  0    0   0 usbevt   RWK  ?         0:00.00 [usb1]
root       14  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [usb2]    0    14 -1145249248     0  10  0    0   0 usbevt   RWK  ?         0:00.00 [usb2]
root       15  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [usb3]    0    15 -1145249248     0  10  0    0   0 usbevt   RWK  ?         0:00.00 [usb3]
root       16  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [usb4]    0    16 -1145249248     0  10  0    0   0 usbevt   RWK  ?         0:00.00 [usb4]
root       17  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [atapib   0    17 -1145249248     0  -6  0    0   0 sccomp   RWK  ?         0:00.00 [atapibus0]
root       18  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [raid0]   0    18 -1145249248     0  -6  0    0   0 rfwcond  RWK  ?         0:00.00 [raid0]
root       19  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [raidio   0    19 -1145249248     0  -6  0    0   0 raidiow  RWK  ?         0:00.00 [raidio0]
root       20  0.0  0.0    0   0 ?      RWK  Wed01PM  106:48.01 [pageda   0    20 -1145249248  6408 -18  0    0   0 pgdaemon RWK  ?       106:48.01 [pagedaemon]
root       21  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [ioflus   0    21 -1145249248     0  18  0    0   0 syncer   RWK  ?         0:00.00 [ioflush]
root       22  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [aiodon   0    22 -1145249248     0 -18  0    0   0 aiodoned RWK  ?         0:00.00 [aiodoned]
root       94  0.0  0.0    0   0 ?      RWK  Wed01PM    0:00.00 [physio   0    94 -1145249248     0  -6  0    0   0 physiod  RWK  ?         0:00.00 [physiod]
root       96  0.0  0.0   56   0 ?      RWL  Wed01PM  138:44.01 nfsd: s   0    96 -1145249248  8324   2  0   56   0 nfsd     RWL  ?       138:44.01 nfsd: server 
root       97  0.0  0.0   56   0 ?      RWL  Wed01PM  138:44.01 nfsd: s   0    97 -1145249248  8324   2  0   56   0 nfsd     RWL  ?       138:44.01 nfsd: server 
root       98  0.0  0.0   56   0 ?      RWL  Wed01PM  138:44.01 nfsd: s   0    98 -1145249248  8324   2  0   56   0 nfsd     RWL  ?       138:44.01 nfsd: server 
root      166  0.0  0.0 1116   0 ?      RWs  Wed01PM    0:00.00 /usr/sb   0   166 -1145249248     0  18  0 1116   0 pause    RWs  ?         0:00.00 /usr/sbin/ntpd 
root      183  0.0  0.0  304   0 ?      RWs  Wed01PM    4:40.00 /usr/sb   0   183 -1145249248   280   2  0  304   0 select   RWs  ?         4:40.00 /usr/sbin/sshd 
root      357  0.0  0.0  192   0 ?      RWs  Wed01PM    0:00.00 /usr/li   0   357 -1145249248     0   2  0  192   0 select   RWs  ?         0:00.00 /usr/libexec/postfix/master 
postfix   373  0.0  0.0  232   0 ?      RW   Wed01PM    0:00.00 (qmgr)   12   373 -1145249248     0   2  0  232   0 select   RW   ?         0:00.00 (qmgr)
root      476  0.0  0.0  188   0 ?      RWs  Wed01PM    0:00.00 (syslog   0   476 -1145249248     0   2  0  188   0 -        RWs  ?         0:00.00 (syslogd)
root      562  0.0  0.0 1096   0 ?      RWs  Wed03PM    0:00.00 (screen   0   562 -1145249248     0   2  0 1096   0 select   RWs  ?         0:00.00 (screen-4.0.2)
root      665  0.0  0.0  164   0 ?      RWs  Wed01PM    0:00.00 /usr/sb   0   665 -1145249248     0   2  0  164   0 poll     RWs  ?         0:00.00 /usr/sbin/rpcbind -l 
root     1051  0.0  0.0  272   0 ?      RWs  Wed01PM    0:00.00 (mountd   0  1051 -1145249248     0   2  0  272   0 select   RWs  ?         0:00.00 (mountd)
root     1112  0.0  0.0   56   0 ?      RWL  Wed01PM  138:44.01 nfsd: s   0  1112 -1145249248  8324   2  0   56   0 nfsd     RWL  ?       138:44.01 nfsd: server 
root     1178  0.0  0.0  124   0 ?      RWs  Wed01PM    0:00.00 (nfsd)    0  1178 -1145249248     0   2  0  124   0 poll     RWs  ?         0:00.00 (nfsd)
root     1373  0.0  0.0  244   0 ?      RWs  Wed01PM    0:00.00 (cron)    0  1373 -1145249248     0  10  0  244   0 nanoslee RWs  ?         0:00.00 (cron)
root     1403  0.0  0.0   68   0 ?      RWs  Wed01PM  166:40.01 (inetd)   0  1403 -1145249248 10000   2  0   68   0 kqread   RWs  ?       166:40.01 (inetd)
postfix  5843  0.0  0.0  192   0 ?      RW   Wed11PM    0:00.00 (pickup  12  5843 -1145249248     0   2  0  192   0 select   RW   ?         0:00.00 (pickup)
wiz       630  0.0  0.0  808   0 ttyp2  RWs  Wed03PM    9:29.00 (bash)  100   630 -1145249248   569  10  0  808   0 wait     RWs  ttyp2     9:29.00 (bash)
root      679  0.0  0.0  244   0 ttyp2  RW+  Wed03PM    0:00.00 (ksh)     0   679 -1145249248     0   3  0  244   0 ttyin    RW+  ttyp2     0:00.00 (ksh)
root     1568  0.0  0.0 3728   0 ttyp2  RW   Wed11PM  192:11.01 (cc1)     0  1568 -1145249248 11531  -2  0 3728   0 vnlock   RW   ttyp2   192:11.01 (cc1)
root     2472  0.0  0.0   72   0 ttyp2  RW   Wed11PM  106:55.01 (umount   0  2472 -1145249248  6415  -2  0   72   0 vnlock   RW   ttyp2   106:55.01 (umount)
root     2619  0.0  0.0   24   0 ttyp2  RW   Wed11PM   56:15.00 (umount   0  2619 -1145249248  3375  -2  0   24   0 vfs_busy RW   ttyp2    56:15.00 (umount)
root    16681  0.0  0.0  172   0 ttyp2  TW   Wed11PM    0:00.00 (sh)      0 16681 -1145249248     0  10  0  172   0 -        TW   ttyp2     0:00.00 (sh)
root    14807  0.0  0.0 3684   0 ttyp6- RW   Wed11PM 1120:56.07 (cc1)     0 14807 -1145249248 67256  -2  0 3684   0 vnlock   RW   ttyp6- 1120:56.07 (cc1)
root      427  0.0  0.0  172   0 ttyE0  RWs  Wed01PM   17:04.00 /usr/li   0   427 -1145249248  1024  10  0  172   0 wait     RWs  ttyE0    17:04.00 /usr/libexec/getty Pc ttyE1 (login)
wiz      9554  0.0  0.0  376   0 ttyE0  RW+  Thu12AM    0:00.00 (screen 100  9554 -1145249248     0  18  0  376   0 pause    RW+  ttyE0     0:00.00 (screen-4.0.2)
wiz     24490  0.0  0.0  776   0 ttyE0  RW   Wed06PM    0:18.00 (bash)  100 24490 -1145249248    18  10  0  776   0 wait     RW   ttyE0     0:18.00 (bash)
root      420  0.0  0.0   56   0 ttyE1  RWs+ Wed01PM  131:25.01 /usr/li   0   420 -1145249248  7885   3  0   56   0 ttyin    RWs+ ttyE1   131:25.01 /usr/libexec/getty Pc ttyE2 
root      429  0.0  0.0   56   0 ttyE2  RWs+ Wed01PM  131:25.01 /usr/li   0   429 -1145249248  7885   3  0   56   0 ttyin    RWs+ ttyE2   131:25.01 /usr/libexec/getty Pc ttyE3 
root      432  0.0  0.0   56   0 ttyE3  RWs+ Wed01PM  131:25.01 (getty)   0   432 -1145249248  7885   3  0   56   0 ttyin    RWs+ ttyE3   131:25.01 (getty)


The relevant lines seem to be:
USER      PID %CPU %MEM  VSZ RSS TTY    STAT STARTED       TIME COMMAND UID   PID        PPID   CPU PRI NI  VSZ RSS WCHAN    STAT TTY          TIME COMMAND
root     1568  0.0  0.0 3728   0 ttyp2  RW   Wed11PM  192:11.01 (cc1)     0  1568 -1145249248 11531  -2  0 3728   0 vnlock   RW   ttyp2   192:11.01 (cc1)
root     2472  0.0  0.0   72   0 ttyp2  RW   Wed11PM  106:55.01 (umount   0  2472 -1145249248  6415  -2  0   72   0 vnlock   RW   ttyp2   106:55.01 (umount)
root     2619  0.0  0.0   24   0 ttyp2  RW   Wed11PM   56:15.00 (umount   0  2619 -1145249248  3375  -2  0   24   0 vfs_busy RW   ttyp2    56:15.00 (umount)
root    14807  0.0  0.0 3684   0 ttyp6- RW   Wed11PM 1120:56.07 (cc1)     0 14807 -1145249248 67256  -2  0 3684   0 vnlock   RW   ttyp6- 1120:56.07 (cc1)

What next?
 Thomas