[2.5] Large amount of <defunct> processes seen in MAAS over time

Bug #1793448 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

Steps to reproduce:

 - Leave MAAS running
 - Observe the output of a command such as 'ps fuaxww'.
 - A large amount of "[sudo] <defunct>" processes can be seen in the output. (These correlate in the logs with runs of "sudo systemctl status".)

https://paste.ubuntu.com/p/ndwjPVW3bC/

Tags: sprint track

Related branches

tags: added: track
Revision history for this message
Mike Pontillo (mpontillo) wrote :

I patched the code to add "-n 0 --no-pager" and remove "sudo" when calling "systemctl status"[1].

Now I see the following defunct process:

maas 24458 0.0 0.0 0 0 ? Z 23:48 0:00 | \_ [systemctl] <defunct>

So I've ruled out `sudo`, the pager (which shouldn't have been used anyway since there is no PTY), and extraneous log output causing issues.

[1]: https://paste.ubuntu.com/p/CpcKtmRDGm/

tags: added: sprint
Revision history for this message
Mike Pontillo (mpontillo) wrote :

See also: bug #277038.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

See also: bug #805423.

Seems like a general issue with getProcessOutputAndValue().

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Yesterday I tried removing `sudo` from the command and adding `-n 0 --no-pager` when running `systemctl status`. There was no impact on the amount of <defunct> processes.

I'm convinced this is a bug in Twisted now.

Changed in maas:
status: Triaged → In Progress
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.