OS:
RHEL 7.5
App Version:
18.09.1
linux/amd64
Issue:
After calling a script to make 50 zombie processes, docker exec ...
hangs.
Steps to Repro:
Make this script:
#!/usr/bin/env python
import os
import subprocess
import time
pid = os.fork()
if pid == 0: # child
# time.sleep(100)
pid2 = os.fork()
if pid2 != 0: # parent
while True:
print('The zombie pid will be: {}'.format(pid2))
time.sleep(30)
else: # parent
# os.waitpid(pid, 0)
subprocess.check_call(('ps', 'xawuf'))
time.sleep(5)
Make another script to call the previous script.
for i in `seq 1 50`
do
docker exec dashDB python /tmp/bad_parent.py &
done
wait
Run the previous script and make the zombie processes. Then docker exec ...
exhibits the hanging behavior.
We would expect docker exec ...
to run regardless of the number of zombie processes spawned.