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
F14109266: D20620.diff
Wed, Nov 27, 2:01 PM
Unknown Object (File)
Sat, Nov 23, 10:31 PM
Unknown Object (File)
Wed, Nov 20, 7:02 PM
Unknown Object (File)
Oct 1 2024, 11:34 PM
Unknown Object (File)
Oct 1 2024, 4:20 AM
Unknown Object (File)
Sep 25 2024, 2:06 AM
Unknown Object (File)
Sep 12 2024, 11:59 PM
Unknown Object (File)
Sep 6 2024, 6:31 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
Branch
pname1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23065
Build 31662: Run Core Tests
Build 31661: arc lint + arc unit