@FellippeHeitor @SpriggsySpriggs EDIT: I have been informed that there are commits that address zombie processes. I have been running these from the 8109b81 build, and the issues below are from that.
While testing the new development build, including the $DEBUG enhancements, I have been also watching my PIDs closer than I normally do.
What I have noticed is that Zombie processes are getting out of control.
I just checked my PIDs, and I have more than 100 zombie processes from both QB64 and mysqlPGM, a program I was testing until today. I've attached some screen shots of what I am seeing.
I also know that
@Richard had an issue where his IDE froze up while running a test over multiple days. I am willing to bet his issue has to do with zombie processes. I was also having IDE issues, and noticed these in my htop display.
I have to take an issue with
@luke in that zombie process are harmless (he implied this). A zombie process is the result of a program spawning off one or more child processes, and does not wait for its status (waitpid(pid, &status, 0)). the parent does not wait and when the child process ends, it stays in the system process table. I realize that many people contribute to this project, so some issues may get overlooked.
While some say that these processes are benign, I disagree. They at least take up PID's, which there are a limited number of them. Also, some of the child processes are still running, as the parent process hasn't check their status to kill them when they are done. This takes up clock cycles (the CPU does check all zombie's to see if they need resources).
I have also noticed system slowdowns due to tasks not getting a PID immediately.
This needs to be fixed. Telling us to just quit the IDE does not clear all the issues (I've had to manually kill PID's after terminating the QB64 IDE).
Below shows both the Zombie processes (S=Z) as well as a program that hasn't run since yesterday (mysqlPGM). Some of these processes have run for more than 36 hours!
[ You are not allowed to view this attachment ]
[ You are not allowed to view this attachment ]
Edited: Added a pstree and a ps piped grep showing more about the processes. I have 159 processes running/zombies currently.
[ You are not allowed to view this attachment ]
[ You are not allowed to view this attachment ]
Update: I noticed something else. When checking into some of the processes more, I noticed that for one (and probably many of them) the PGID for the processes below do not have a process, yet instead of showing up a an OPRHAN, they are in a SL status.
(base) gjmcginn@optiplex990:~$ ps jp 223051
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
1334 223051 207117 6511 pts/0 248264 Sl 1000 23:20 ./mysqlPGM
(base) gjmcginn@optiplex990:~$ ps jp 207315
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
1334 207315 207117 6511 pts/0 248270 Sl 1000 91:45 ./qb64
(base) gjmcginn@optiplex990:~$ ps jp 207117
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
(base) gjmcginn@optiplex990:~$ ps a | grep 207117
248284 pts/0 S+ 0:00 grep --color=auto 207117