Skip to content

Silently returns incorrect results sporadically (Ubuntu) #79

Description

@logidelic

I have been using ps-node in production for about a year. I have experienced some mystery issues very rarely but never investigated closely enough until today. Finally I realize that, rarely, ps-node is failing to parse the process list correctly and is therefor returning incorrect results.

I know that there is a note about "limitations" for multiple-bytes characters. Is it possible that there was some other process in the system that was using a multi-byte character? Sure, how would I know? The point is that users can't know this, so the "limitation" should be rephrased as, "ps-node is unreliable and sometimes it returns incorrect information". I think this needs to be put up front, at the very top of the readme.

To summarize: ps-node is not to be used anywhere that reliability is important.

I still appreciate the work done by the module writers... I understand that parsing the command-line output is problematic and maybe even impossible in this case. I just think that users should understand this...

For what it's worth, below is an exerpt of what ps-node returned to me in the problem case. I haven't been able to repro since then so I don't know what tickled it. Note that instead of the actual command, some incorreclty-parsed digits are returned:

[
    {
        "pid": "1314",
        "command": "0:00",
        "arguments": [
            "/lib/systemd/systemd-logind"
        ],
        "ppid": "1"
    },
    {
        "pid": "1324",
        "command": "0:20",
        "arguments": [
            "/usr/lib/snapd/snapd"
        ],
        "ppid": "1"
    },
    {
        "pid": "1346",
        "command": "0:00",
        "arguments": [
            "/usr/sbin/sshd",
            "-D"
        ],
        "ppid": "1"
    },
    {
        "pid": "1441",
        "command": "0:00",
        "arguments": [
            "/sbin/agetty",
            "--keep-baud",
            "115200",
            "38400",
            "9600",
            "ttyS0",
            "vt220"
        ],
        "ppid": "1"
    },
    {
        "pid": "1444",
        "command": "0:00",
        "arguments": [
            "/sbin/agetty",
            "--noclear",
            "tty1",
            "linux"
        ],
        "ppid": "1"
    }
]

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions