从下述案例中可以看到使用kill -928051并未将28051进程杀死
[root@iZufxxxxxxxxxxxx2tnZ devops-xxl-job]# kill -9 28051[root@iZufxxxxxxxxxxxx2tnZ devops-xxl-job]# jps28051 Launcher29247 Jps[root@iZufxxxxxxxxxxxx2tnZ devops-xxl-job]# jps28051 Launcher29539 Jps[root@iZufxxxxxxxxxxxx2tnZ devops-xxl-job]# cd /proc/28051[root@iZufxxxxxxxxxxxx2tnZ 28051]# jps28051 Launcher29582 Jps[root@iZufxxxxxxxxxxxx2tnZ 28051]# cat statusName: javaState: Z (zombie)Tgid: 28051Ngid: 0Pid: 28051PPid: 28000TracerPid:0Uid: 0 0 0 0Gid: 0 0 0 0FDSize: 0Groups: 0 Threads: 1SigQ: 3/31202SigPnd: 0000000000000000ShdPnd: 0000000000004100SigBlk: 0000000000000000SigIgn: 0000000000000000SigCgt: 2000000181005ccfCapInh: 0000000000000000CapPrm: 0000001fffffffffCapEff: 0000001fffffffffCapBnd: 0000001fffffffffCapAmb: 0000000000000000Seccomp: 0Speculation_Store_Bypass: vulnerableCpus_allowed: fCpus_allowed_list:0-3Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001Mems_allowed_list:0voluntary_ctxt_switches: 19nonvoluntary_ctxt_switches:2[root@iZufxxxxxxxxxxxx2tnZ 28051]# kill -9 28000
杀不掉的原因有两种:
1.这个进程是僵尸进程2.此进程是"核心态"进程
解决方案:
1、进入到“/proc/进程号”目录下,执行“cat status”命令可以查询到指定进程的父进程
2、利用“kill -9 父进程的进程号”将父进程给删除掉;
3、利用“kill 进程号”重新删除指定进程即可
如果觉得《Linux 进程kill -9 无法杀死解决方案》对你有帮助,请点赞、收藏,并留下你的观点哦!