nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨

Home Page:https://nodejs.org

Repository from Github https://github.comnodejs/nodeRepository from Github https://github.comnodejs/node

process.title don't change process name

CubixSystem opened this issue · comments

  • Version: v10.16.1
  • Platform: 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
  • Subsystem: process

Hello

In v10.16.1

process.title = "test";

stops changing process name

In v10.15.3
All works as expected

/cc @nodejs/platform-macos since on Linux this seems to work

I use nvm, my steps to reproduce:

nvm use v10.15.3 && /
node -e "process.title = 'process.title test'; process.stdin.resume();"

Screenshot 2019-08-02 at 21 16 21

nvm use v10.16.1 && /
node -e "process.title = 'process.title test'; process.stdin.resume();"

Screenshot 2019-08-02 at 21 16 59

Can I ask you to check to see if the current Node.js 12.x release works? Like to see if this regression is specific to 10.x or not.

Can I ask you to check to see if the current Node.js 12.x release works? Like to see if this regression is specific to 10.x or not.

I can reproduce the issue in 12.0.0 and 12.7.0. Like original reporter, I'm seeing the problem in 10.16.1 but not in 10.15.3. I also see the problem in 10.16.0.

8.16.0 does not have the bug.

So, to summarize for supported release lines on macOS:

  • All 12.x are affected.
  • 10.16.0 and newer are affected. 10.15.3 and earlier are not affected.
  • All 8.x are not affected.

Sounds like it could be libuv related based on the Node.js versions affected. Node.js 10.16.0 bumped libuv from 1.23.2->1.28.0.

Windows also appears to work as expected

git bisect confirms that this bug was introduced with the upgrade to libuv 1.24.0 in 9cef7b8. I suppose the thing to do is open an issue in the libuv repository. @nodejs/libuv

I can confirm that libuv/libuv@00c6b16 is responsible (but don't ask me why.) I've opened a revert in libuv/libuv#2405.

Re-opening since this isn’t fixed in Node.js yet.

And I think we'll want a regression test for this.

There’s test-setproctitle.js. Perhaps someone on macOS can figure out why it isn’t currently failing?

Perhaps someone on macOS can figure out why it isn’t currently failing?

It looks like ps and other commands use a different data source than the Activity Monitor. I don't know much beyond that, but the commands in test-setproctitle.js do return the correct title for me.

This appears to be an issue again in 14.x.x. Works in 13.x.x.

cc @cjihrig @addaleax @bnoordhuis @Trott

@coreybutler Can you file a new issue and link back to this one?