Author Topic: Zombie Procecsses Getting Out of Hand  (Read 2602 times)

0 Members and 1 Guest are viewing this topic.

Offline George McGinn

  • Global Moderator
  • Forum Regular
  • Posts: 210
    • View Profile
    • Resume
Zombie Procecsses Getting Out of Hand
« on: July 18, 2021, 03:11:29 pm »
@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.

Quote
(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
« Last Edit: July 18, 2021, 04:26:05 pm by George McGinn »
____________________________________________________________________
George McGinn
Theoretical/Applied Computer Scientist
Member: IEEE, IEEE Computer Society
Technical Council on Software Engineering
IEEE Standards Association
American Association for the Advancement of Science (AAAS)

Offline NOVARSEG

  • Forum Resident
  • Posts: 509
    • View Profile
Re: Zombie Procecsses Getting Out of Hand
« Reply #1 on: July 18, 2021, 09:54:47 pm »
@George McGinn

Zombie proceses - that is a new one. Are these similar to the old DOS TSR?

Anyway, I find it a bit disturbing that code is still running that originated from running a QB64 IDE and or EXE. Hey, let's hope these Zombie processes are not viruses.

what is an SL status?

You know I think Windows is more buggy than the old DOS 6.22.  Over complexity is not the solution.   I did say that Windows programming is the most complex on the planet.   No wonder we get updates almost daily because the over complicated OSes allow for just about anything - like zombie processes.
« Last Edit: July 18, 2021, 11:05:16 pm by NOVARSEG »

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Zombie Procecsses Getting Out of Hand
« Reply #2 on: July 19, 2021, 03:19:28 am »
@George McGinn

Zombie proceses - that is a new one. Are these similar to the old DOS TSR?

Anyway, I find it a bit disturbing that code is still running that originated from running a QB64 IDE and or EXE. Hey, let's hope these Zombie processes are not viruses.

what is an SL status?

You know I think Windows is more buggy than the old DOS 6.22.  Over complexity is not the solution.   I did say that Windows programming is the most complex on the planet.   No wonder we get updates almost daily because the over complicated OSes allow for just about anything - like zombie processes.

Could these be daemonic entities?