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
Unknown Object (File)
May 7 2025, 10:33 PM
Unknown Object (File)
Apr 29 2025, 8:01 PM
Unknown Object (File)
Apr 29 2025, 6:01 PM
Unknown Object (File)
Apr 26 2025, 9:41 AM
Unknown Object (File)
Apr 25 2025, 3:06 PM
Unknown Object (File)
Apr 24 2025, 12:25 AM
Unknown Object (File)
Mar 28 2025, 7:03 AM
Unknown Object (File)
Mar 26 2025, 2: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