Skip to content

Incorrect ps output for node process on AIX. #10607

Closed
@hhellyer

Description

@hhellyer
  • Version: v6.9.3
  • Platform: AIX dal-pacha 1 6 00F460A94C00
  • Subsystem:

The command line arguments to the node process seem to be becoming corrupted on AIX when displayed by the ps command. For example if I run a simple script and use a command line option:

> node --abort_on_uncaught_exception --experimental_extras --max_old_space_size=300 --no-warnings simplehttp.js opt1 opt2 opt3

The output of running the ps command is:

[hhellyer@dhcp-9-20-187-94 nodereport.git]$ ps -f 3654
  UID   PID  PPID   C STIME   TTY           TIME CMD
  hhellyer 16187482  7274616   1 10:18:00  pts/0  0:00 node simplehttp.js opt1 opt2 opt3 simplehttp.js opt1 opt2 opt3

It looks like the script name and arguments have moved up but not cleared from their original position. It doesn’t seem to be specific to using v8 arguments beginning with --, using -r to require a module causes the same problem.

If I run the same script with the same options on Linux or Mac the output from ps is correct. e.g from Linux:

UID        PID  PPID  C STIME TTY          TIME CMD
hhellyer 10015  2888  0 15:19 pts/9    00:00:00 node --abort_on_uncaught_exception --experimental_extras --max_old_space_size=300 --no-warnings simplehttp.js opt1 opt2 opt3

which is exactly what was on the command line. On AIX if I run a script that prints process.argv and process.execArgv with the same options they are in in the correct positions, it's only the output from ps that looks wrong. It may be something specific in how the options are handled on AIX or it may be node always corrupts argv but that AIX is the only platform that gives the process the real argv array that’s also used by the ps command.

@nodejs/platform-aix - Probably worth the AIX team looking at this in the first instance however it may be a more general problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aixIssues and PRs related to the AIX platform.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions