进程永久卡在D状态 [英] Process permanently stuck on D state

查看:665
本文介绍了进程永久卡在D状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 10.04.3 LTS上的某些进程陷入D状态时遇到问题.

I have an issue with some processes stuck in a D state on Ubuntu 10.04.3 LTS.

自11月5日(今天是12月6日)以来,他们一直处于这种状态.我知道这些是不间断的睡眠状态,通常与等待来自硬件(如硬盘)的数据有关.这是一台生产服务器,因此重启是最后的选择,是否有人可以弄清楚这些进程可能是什么?

They have been in this state since Nov the 5th (today being December 6th). I understand these are uninterruptible sleep states often related to waiting for data from hardware such as a hard disk. This is a production server so rebooting is a very last resort, is anyone able to shed any light on what these processes might be?

这是ps -aux

www-data 22851  0.0  0.0      0     0 ?        D    Nov05   0:00 [2637.64]
www-data 26306  0.0  0.0   4008    12 ?        D    Nov05   0:00 ./2.6.37
www-data 26373  0.0  0.0   4008    12 ?        D    Nov05   0:00 ./n2
www-data 26378  0.0  0.0   4008    12 ?        D    Nov05   0:00 ./n2

这是ps axl | awk '$10 ~ /D/'的输出,以获取更多信息.

This is output of ps axl | awk '$10 ~ /D/' for a little more info.

0    33 22851     1  20   0      0     0 econet D    ?          0:00 [2637.64]
1    33 26306     1  20   0   4008    12 ec_dev D    ?          0:00 ./2.6.37
1    33 26373     1  20   0   4008    12 ec_dev D    ?          0:00 ./n2
1    33 26378     1  20   0   4008    12 ec_dev D    ?          0:00 ./n2

有没有办法杀死这些?重新启动时使进程处于这种状态是否会引起任何问题?

Is there a way to kill these? Does having processes in this state when rebooting cause any issues?

推荐答案

这是进程的可怕的不间断(TASK_UNINTERRUPTIBLE)状态.在这种状态下,直到开始等待之前,过程才对信号做出反应. 不幸的是,这是必不可少的罪恶.请参见此处和此处什么是不间断的进程?.

This is the dreaded un-interruptible (TASK_UNINTERRUPTIBLE) state of a process. This is the state where the process doesn't react to signals until what it started to wait for, gets done. Unfortunately it is a necessary evil. See here and here What is an uninterruptable process?.

我的答案是重新引导系统.
重新启动会引起任何问题吗?
很难说,可能没有.处于D状态的进程可能必须进行一些关键的更新,如果您重新启动,则不会进行更新.
如果您真的无力重启,请尝试查找该进程正在等待的磁盘,然后通过打开,关闭,读/写该磁盘来查看磁盘是否工作正常

My answer is to reboot the system.
Do rebooting cause any issues ?
Hard to tell, it may it may not. The process which is in the D state may have to do some crucial updates which it wont if you reboot.
If you really cant afford to reboot, try to find the disk on which the process is waiting and see if the disk is working fine by opening, closing, reading/writing into it

这篇关于进程永久卡在D状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆