With build 16 of WD-gtk I am noticing more and more defunct processes starting and hanging around. Sometimes they seem to occur after the “access violation” errors that show up in the programerrorlog.txt or in STDOUT. The system seems to be performing okay but this is a concern from a sysop viewpoint.
You use GoWeather.sh to start the process: ./GoWeather.sh which starts the WeatherD process. I use the following ./GoWeather.sh >myconsole.log 2>&1 & so that it runs in background and as a GUI app freeing up the terminal session. The defunct processes are child processes of the WeatherD process. See the attached image
Tried this no luck. The nohup just keeps the process active if the terminal session ends and the >/dev/null send stdout to the null device. I did a ps aux and found the defunct processes are zombies.
Yup, glad you’re starting to understand about `nohup’ As you probably figuring out, the zombies are there because there is no process to catch the death of the child proccess’ signal.
Please add `&’ so it looks as follows:
# Then run the program.
nohup $DIR_PATH/WeatherD > /dev/null &
Let’s see if that gives us what we want. I think it will.
The parent process is there though. In this case I think the zombies are being created due to an issue with build 16, as build 15 did not have this issue. Zombies are dead processes that can be caused because the parent process have put them in a wait state and checking the status. I do know after a number of zombie processes are created it can cause a problem.
Zombies are processes whose parents have not setup an error handler to ignore the death of the child.
Brian was having the same problems fork()‘ing the cron* processes. I wrote a little C library for him to use to avoid the issue with those processes. So I `kinda’ know a little bit about zombie processes.
Sorry for the delayed response – traveling again this week.
No the problem was not resolved. The ‘&’ just placed the process in the background and had no impact on the creation of zombies. I have build 15 and when I get home I may drop back to that release and validate if the problem occurs there as the changes made to build 16 could be causing the problem.
Can you explain to me how the nohup may or may not impact the creation of zombies? The way I start the software the GUI session is always active which I expect in my environment and I run the primary process in background anyway to free up the GUI terminal session for other uses. Also, the ‘>/dev/null’ dumps the STDOUT messages to null so I lose those which do not help in monitoring the status of the environment.