Skip to content

concore stop can kill unrelated processes due to overly broad substring matching #580

Description

@bhuvan-somisetty

Ran into another one while going through concore_cli/commands/stop.py (status.py has the same code).

Process matching there is just "concore" in cmdline_str.lower(), a plain substring check. So any process that happens to have "concore" anywhere in its command line gets treated as a concore process and force killed.

Easy to hit by accident too, since a lot of people will clone this repo into a folder literally named concore. Anything else running from inside that folder, an editor, a script, whatever, ends up with that path in its argv and matches.

Tested it by pulling the exact matching logic out of stop.py and running it against a few unrelated cmdlines, all came back as a match even though none of them are concore processes.

Different from #391 and #280, those were about the old concorekill.bat mechanism and taskkill's return code. This is earlier than that, the process discovery itself is too loose.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions