Issue with running child process inside container

Hi Guys,
Good Morning! I am new to Docker. I have been able to deploy containers in our organization and that seem to be working fine. We run Linux based container ( Centos 8 ). The issue that we are facing is that we do run a logger process inside container and that logger process forks a child process to run parallel logger process. But as soon as its forked it becomes Defunct / Zombie while its parent process keep running.

I tried running init process inside container but that also didn’t help.

Please help in it.

Thanks.

It seems CentOS 8 is end-of-life, don’t use it, it’s an increasing security risk.

This is a tech forum, so you should provide some tech info: Docker version info, Dockerfile, docker-compose.yml, maybe some code if it’s relevant.

Also, I did download amd64/rockylinux 8.9 images from docker hub , run the container using this image and installed some pkgs inside the container which are necessary for our processes to run. So, I don’t have Dockerfile.

But on the host with the same OS we aren’t facing this issue. Only inside the container we are facing this issue.

Here is Docker Version :-

docker -v
Docker version 26.0.2, build 3c863ff

And here are processes state :-

ps -ef | grep 443
trading 1447 1 0 07:23 pts/3 00:00:00 443_test/bin/in443_test/443_test/config/test.cfg 20230731

trading 1453 1447 0 07:23 pts/3 00:00:00 [in443_test_logg]

So, you can see that the parent process with pid 1447 is running while the child process with pid 1453 becomes defunct.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1447 trading 20 0 368584 324572 10900 S 0.0 0.2 0:00.02 in443_test

1453 trading 20 0 0 0 0 Z 0.0 0.0 0:00.11 in443_test_logg