Page MenuHomePhabricator

When matching process titles, don't attempt a match if we're out of "argv" parts
ClosedPublic

Authored by epriestley on Jun 25 2019, 10:21 PM.
Tags
None
Referenced Files
F15428697: D20620.diff
Sun, Mar 23, 9:46 PM
F15428136: D20620.id.diff
Sun, Mar 23, 6:39 PM
F15406819: D20620.diff
Tue, Mar 18, 2:02 PM
F15377679: D20620.id49194.diff
Thu, Mar 13, 10:10 AM
F15377477: D20620.id49193.diff
Thu, Mar 13, 9:07 AM
F15324643: D20620.diff
Fri, Mar 7, 1:46 AM
Unknown Object (File)
Sat, Feb 22, 6:11 AM
Unknown Object (File)
Feb 10 2025, 5:19 AM
Subscribers
None

Details

Summary

Ref T13321. In general, if we try to match against "array('x', 'y')" and there's an "array('x')" process, we may run out of arguments before matching the whole pattern.

On Ubuntu, there are a bunch of system processes which look like [khugepaged] in ps. These have no /proc/123/cmdline, so we end up with an empty "argv", which is causing us to hit the bug. Just let this be for now, we don't currently care about these processes.

Test Plan

Ran bin/phd status on Ubuntu.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable