Wind River Support Network

HomeDefectsLIN8-6322
Fixed

LIN8-6322 : wait/ptrace: avoid creating unreapable zombies

Created: Mar 30, 2017    Updated: Dec 3, 2018
Resolved Date: Apr 12, 2017
Found In Version: 8.0
Fix Version: 8.0.0.17
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Kernel

Description

A process can create permanent zombie children by cloning a thread, calling ptrace() on it, then exiting. If the init system is not waiting for exiting processes in the right way, that particular thread will go unnoticed and unreaped.

root@qemu3:~# ./zombie
root@qemu3:~# 
root@qemu3:~# ps aux | grep -i zombie
root       361  0.0  0.0      0     0 ttyS0    Zl   07:25   0:00 [zombie] <defunct>
root       365  0.0  0.0   4420   768 ttyS0    S+   07:25   0:00 grep -i zombie
root@qemu3:~# 
root@qemu3:~# kill -9 361 362
root@qemu3:~# 
root@qemu3:~# ps aux | grep -i zombie
root       361  0.0  0.0      0     0 ttyS0    Zl   07:25   0:00 [zombie] <defunct>
root       377  0.0  0.0   4420   788 ttyS0    S+   07:45   0:00 grep -i zombie

Steps to Reproduce

Run the attached reproducer.

root@qemu3:~# ./zombie
root@qemu3:~# 
root@qemu3:~# ps aux | grep -i zombie
root       361  0.0  0.0      0     0 ttyS0    Zl   07:25   0:00 [zombie] <defunct>
root       365  0.0  0.0   4420   768 ttyS0    S+   07:25   0:00 grep -i zombie
root@qemu3:~# 
root@qemu3:~# kill -9 361 362
root@qemu3:~# 
root@qemu3:~# ps aux | grep -i zombie
root       361  0.0  0.0      0     0 ttyS0    Zl   07:25   0:00 [zombie] <defunct>
root       377  0.0  0.0   4420   788 ttyS0    S+   07:45   0:00 grep -i zombie

Other Downloads


Live chat
Online