Re: [FreeBSD 5.3-RC2] Processes STILL hanging in unkillable state

From: David Xu <davidxu_at_freebsd.org>
Date: Fri, 05 Nov 2004 12:42:31 +0800
Please try following patch:

Index: kern_thread.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_thread.c,v
retrieving revision 1.205
diff -u -r1.205 kern_thread.c
--- kern_thread.c	4 Nov 2004 22:13:16 -0000	1.205
+++ kern_thread.c	5 Nov 2004 04:23:24 -0000
_at__at_ -832,11 +832,10 _at__at_
  						continue;
  					/*
  					 * maybe other inhibitted states too?
-					 * XXXKSE Is it totally safe to
-					 * suspend a non-interruptable thread?
  					 */
-					if (td2->td_inhibitors &
-					    (TDI_SLEEPING | TDI_SWAPPED))
+					if ((td2->td_flags & TDF_SINTR) &&
+					    (td2->td_inhibitors &
+					    (TDI_SLEEPING | TDI_SWAPPED)))
  						thread_suspend_one(td2);
  					break;
  				}

Boris Kovalenko wrote:
> Hello!
> 
> 
>>In particular if you manage to wedge processes in an unkillable state
>>the output of "ps -o f -l" might be useful.  I'd like to see all of the
>>flags set for a process that gets wedged.
>>
>> 
>>
> 
> Got it, see attachment.
> 
> Regards,
>     Boris
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
>   UID   PID  PPID CPU PRI NI   VSZ  RSS MWCHAN STAT  TT       TIME COMMAND                F
>     0     0     0   0 -16  0     0    4 sched  DLs   ??    0:00,14 [swapper]            200
>     0     1     0   0   8  0   792  184 wait   ILs   ??    0:00,05 /sbin/init --       4200
>     0     2     0   0  -8  0     0   12 -      DL    ??    0:02,77 [g_event]            204
>     0     3     0   0  -8  0     0   12 -      DL    ??    0:23,13 [g_up]               204
>     0     4     0   0  -8  0     0   12 -      DL    ??    0:59,44 [g_down]             204
>     0     5     0   0   8  0     0   12 -      DL    ??    0:00,00 [kqueue taskq]       204
>     0     6     0   0   8  0     0   12 -      DL    ??    0:00,00 [thread taskq]       204
>     0     7     0   0  -8  0     0   12 -      DL    ??    0:00,15 [fdc0]               204
>     0     8     0   0 -16  0     0   12 psleep DL    ??    0:05,82 [pagedaemon]         204
>     0     9     0   2  20  0     0   12 psleep DL    ??    0:00,00 [vmdaemon]           204
>     0    10     0   0 -16  0     0   12 ktrace DL    ??    0:00,00 [ktrace]             204
>     0    11     0 118 110  0     0   12 -      RL    ??  1197:46,03 [idle]               20c
>     0    12     0   0 -60  0     0   12 -      WL    ??    0:01,10 [irq1: atkbd0]       204
>     0    13     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq2:]              204
>     0    14     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq3:]              204
>     0    15     0   0 -60  0     0   12 -      WL    ??    0:00,00 [irq4: sio0]         204
>     0    16     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq5:]              204
>     0    17     0   0 -64  0     0   12 -      WL    ??    0:00,00 [irq6: fdc0]         204
>     0    18     0   0 -60  0     0   12 -      WL    ??    0:00,00 [irq7: ppc0]         204
>     0    19     0   0 -84  0     0   12 -      WL    ??    0:00,00 [irq8: rtc]          204
>     0    20     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq9:]              204
>     0    21     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq10:]             204
>     0    22     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq11:]             204
>     0    23     0   0 -60  0     0   12 -      WL    ??    0:15,83 [irq12: psm0]        204
>     0    24     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq13:]             204
>     0    25     0   0 -64  0     0   12 -      WL    ??    0:00,00 [irq14: ata0]        204
>     0    26     0   0 -64  0     0   12 -      WL    ??    0:00,00 [irq15: ata1]        204
>     0    27     0   0 -64  0     0   12 -      WL    ??    0:00,00 [irq16: uhci0]       204
>     0    28     0   0 -80  0     0   12 -      WL    ??    0:12,36 [irq17: pcm0]        204
>     0    29     0   0 -64  0     0   12 -      WL    ??    0:18,65 [irq18: uhci2+]      204
>     0    30     0   0 -64  0     0   12 -      WL    ??    0:00,00 [irq19: uhci1]       204
>     0    31     0   0 -68  0     0   12 -      WL    ??    0:27,42 [irq20: bge0]        204
>     0    32     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq21:]             204
>     0    33     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq22:]             204
>     0    34     0   0 -21  0     0   12 -      WL    ??    0:00,00 [irq23:]             204
>     0    35     0   0 -84  0     0   12 -      WL    ??    0:00,00 [irq0: clk]          204
>     0    36     0   1 -28  0     0   12 -      WL    ??    2:22,65 [swi5: clock sio     20c
>     0    37     0   0 -32  0     0   12 -      WL    ??    0:00,00 [swi4: vm]           204
>     0    38     0   0 -44  0     0   12 -      WL    ??    0:35,86 [swi1: net]          204
>     0    39     0   0  76  0     0   12 -      DL    ??    0:10,44 [yarrow]             204
>     0    40     0   0 -24  0     0   12 -      WL    ??    0:00,00 [swi6:+]             204
>     0    41     0   0 -40  0     0   12 -      WL    ??    0:00,00 [swi2: camnet]       204
>     0    42     0   0 -36  0     0   12 -      WL    ??    0:00,00 [swi3: cambio]       204
>     0    43     0   0 -24  0     0   12 -      WL    ??    0:00,00 [swi6: task queu     204
>     0    44     0   0 -24  0     0   12 -      WL    ??    0:00,00 [swi6:+]             204
>     0    45     0   0   8  0     0   12 usbevt DL    ??    0:00,00 [usb0]               204
>     0    46     0   0   8  0     0   12 usbtsk DL    ??    0:00,00 [usbtask]            204
>     0    47     0   0   8  0     0   12 usbevt DL    ??    0:00,00 [usb1]               204
>     0    48     0   0   8  0     0   12 usbevt DL    ??    0:00,00 [usb2]               204
>     0    49     0   0 -48  0     0   12 -      WL    ??    0:00,00 [swi0: sio]          204
>     0    50     0   0 171  0     0   12 -      RL    ??    0:04,78 [pagezero]           20c
>     0    51     0   0 -16  0     0   12 psleep DL    ??    0:00,32 [bufdaemon]          204
>     0    52     0   0  -4  0     0   12 vlruwt DL    ??    0:00,21 [vnlru]              204
>     0    53     0   0  20  0     0   12 syncer DL    ??    0:13,36 [syncer]             204
>     0    54     0   0  -8  0     0   12 -      DL    ??    0:04,55 [schedcpu]           204
>     0   202     1 129  20  0  1308  452 pause  Is    ??    0:00,00 adjkerntz -i           0
>     0   258     1   0   4  0   548   20 select Is    ??    0:00,09 /sbin/devd             0
>     0   282     1   0  96  0  1444  688 select Is    ??    0:00,47 /usr/sbin/syslog       0
>    53   296     1   0  20  0  5684 2712 kserel Ss    ??    0:00,92 /usr/sbin/named     8180
>     0   368     1   0  96  0  1360  556 select Is    ??    0:00,18 /usr/sbin/usbd         0
>     0   386     1   0   4  0  1416  560 select Is    ??    0:00,08 /usr/sbin/lpd          0
>     0   398     1   0  96  0  3212 1048 select Ss    ??    0:01,91 /usr/sbin/ntpd -       0
>     0   425     1   0   4  0  3712  776 select Is    ??    0:00,07 /usr/sbin/sshd       100
>     0   441     1   0   8  0  1496  748 nanslp Ss    ??    0:00,18 /usr/sbin/cron -       0
>     0   458     1   0  96  0  1556  880 select Is    ??    0:00,29 binkd: server ma       0
>     0   459   458   0   8  0  1556  936 nanslp I     ??    0:01,31 binkd: client ma       0
> 65534   471     1   0  96  0  2460  840 select Ss    ??    0:00,44 proftpd: (accept     101
>     0   501     1   0  96  0  1356  560 select Ss    ??    0:13,76 /usr/sbin/moused       0
>     0   527     1   0   4  0  1564  612 select Is    ??    0:00,09 /usr/sbin/inetd        0
>     0   543     1   0   4  0  2540  716 select I     ??    0:00,18 /usr/local/bin/k    4001
>     0   545   543   0  96  0 112756 92344 select S     ??    5:50,95 /usr/X11R6/bin/X    4000
>     0   546   543  48   8  0  2876 1012 wait   I     ??    0:00,01 /usr/local/bin/k       0
>  1001   556   546   0   8  0  1816  592 wait   Is    ??    0:00,02 /bin/sh /usr/loc    4000
>  1001   584     1   0  96  0 26520 9200 select Is    ??    0:00,29 kdeinit: Running       0
>  1001   587     1   0  96  0 25360 8992 select I     ??    0:00,77 kdeinit: dcopser       1
>  1001   590   584   0  96  0 27220 9680 select S     ??    0:00,65 kdeinit: klaunch       1
>  1001   593     1   0  96  0 31096 10920 select S     ??    2:24,24 kdeinit: kded (k       1
>  1001   605   584   0  20  0 14656 1836 kserel S     ??    1:55,17 /usr/local/bin/a    c080
>  1001   607     1   0  96  0 34804 10680 select S     ??    1:19,81 kdeinit: knotify       1
>  1001   611   556   0   8  0  1448  548 nanslp S     ??    0:01,09 kwrapper ksmserv    4000
>  1001   613     1   0  96  0 26936 10116 select I     ??    0:00,36 kdeinit: ksmserv       1
>  1001   614   584   0  96  0 29936 12012 select S     ??    0:16,52 kdeinit: kwin -s       1
>  1001   617     1   0  96  0 27268 10152 select S     ??    0:02,72 kdeinit: khotkey       1
>  1001   618     1   0  96  0 30196 12256 select S     ??    0:34,60 kdeinit: kdeskto       1
>  1001   620     1   0  96  0 32060 13200 select S     ??    0:38,94 kdeinit: kicker        1
>  1001   621   584   0   4  0 27660 9324 select I     ??    0:00,09 kdeinit: kio_fil       0
>  1001   623     1   0  96  0 28532 10864 select S     ??    0:30,44 kdeinit: klipper       1
>  1001   627     1   0  96  0 27484 11456 select I     ??    0:00,67 kkbswitch -sessi       1
>  1001   629     1   0  96  0 29032 11084 select S     ??    1:00,59 kdeinit: kmix -s       1
>  1001   631     1   0  96  0 31432 10944 select S     ??    0:35,47 korgac --miniico       1
>  1001   632     1   0  96  0 37048 12164 select S     ??    0:54,56 sim -session 110       1
>  1001   638   584   0  96  0 32092 12924 select S     ??    0:43,05 kdeinit: konsole       1
>  1001 42171     1   0  96  0 47888 15468 select S     ??    2:21,45 kmldonkey -icon        1
>  1001 42172   593   1  20 19 248800 234512 kserel SN    ??   10:23,91 /usr/local/bin/m    c080
>  1001 48254   584  20   8  0  1816  608 wait   I     ??    0:00,01 /bin/sh ./mozill    4000
>  1001 48263 48254  37   8  0  1828  608 wait   I     ??    0:00,00 /bin/sh ./run-mo    4000
>  1001 48267 48263   0  20  0 67940 35920 kserel S     ??    0:50,66 ./mozilla-bin       c080
>  1001 48403 48267  14  97  0 88684 36888 -      TL    ??    0:04,28 /usr/local/OpenO   8c081
>     0 48651   458   0  96  0  1656  984 select S     ??    0:00,02 binkd: i 2:5078/       0
>  1001 10736 10734   0   5  0  2432 1032 ttyin  Is+   p1    0:00,06 bash -rcfile .ba   15002
>  1001 33370   638   0   5  0  2428 1424 ttyin  Is+   p2    0:00,02 /usr/local/bin/b    4002
>  1001   713   638   0   8  0  2428  944 wait   Is    p3    0:00,01 /usr/local/bin/b    4002
>  1001 10734   713   0  96  0  4960 1384 select I+    p3    0:00,70 mc                  4002
>     0   738   638   0   8  0  1740  632 wait   Is    p4    0:00,01 su -                4102
>     0   739   738   0   8  0  2444  960 wait   I     p4    0:00,01 -su (bash)          4002
>     0   740   739   0  96  0  5220 1612 select S+    p4    0:02,46 mc                  4002
>     0   742   740   0   8  0  2428 1440 wait   Ss    p5    0:00,21 bash -rcfile .ba   15002
>     0 48657   742   1  96  0  1604  868 -      R+    p5    0:00,00 ps -axfl -o flag    4002
>     0  8421   638   4   8  0  1740  632 wait   Is    p6    0:00,02 su -                4102
>     0  8427  8421   0   8  0  2444  972 wait   I     p6    0:00,01 -su (bash)          4002
>     0  8516  8427   0   4  0  5380 1152 select I+    p6    0:10,84 mc                  4002
>     0  8518  8516   0   5  0  2428 1028 ttyin  Is+   p8    0:00,10 bash -rcfile .ba   15002
>     0   539     1 118   5  0  1408  600 ttyin  Is+   v0    0:00,00 /usr/libexec/get    4002
>     0   540     1 118   5  0  1408  600 ttyin  Is+   v1    0:00,00 /usr/libexec/get    4002
>     0   541     1 118   5  0  1408  600 ttyin  Is+   v2    0:00,00 /usr/libexec/get    4002
>     0   542     1 118   5  0  1408  600 ttyin  Is+   v3    0:00,00 /usr/libexec/get    4002
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Fri Nov 05 2004 - 03:37:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:21 UTC