Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.title don't change process name #28945

Closed
CubixSystem opened this issue Aug 2, 2019 · 17 comments · Fixed by libuv/libuv#2405 or #29070
Closed

process.title don't change process name #28945

CubixSystem opened this issue Aug 2, 2019 · 17 comments · Fixed by libuv/libuv#2405 or #29070
Labels
confirmed-bug Issues with confirmed bugs. libuv Issues and PRs related to the libuv dependency or the uv binding. macos Issues and PRs related to the macOS platform / OSX. process Issues and PRs related to the process subsystem.

Comments

@CubixSystem
Copy link

  • 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

@addaleax
Copy link
Member

addaleax commented Aug 2, 2019

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

@addaleax addaleax added the macos Issues and PRs related to the macOS platform / OSX. label Aug 2, 2019
@CubixSystem
Copy link
Author

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

@jasnell
Copy link
Member

jasnell commented Aug 2, 2019

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.

@Trott
Copy link
Member

Trott commented Aug 2, 2019

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.

@Trott Trott added confirmed-bug Issues with confirmed bugs. process Issues and PRs related to the process subsystem. labels Aug 2, 2019
@Trott
Copy link
Member

Trott commented Aug 2, 2019

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.

@richardlau
Copy link
Member

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.

@jasnell
Copy link
Member

jasnell commented Aug 2, 2019

Windows also appears to work as expected

@richardlau
Copy link
Member

Maybe libuv/libuv@00c6b16#diff-60fd60fae228080a06862eae92a6e25 which came with libuv 1.24.0?

@Trott
Copy link
Member

Trott commented Aug 3, 2019

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

bnoordhuis added a commit to bnoordhuis/libuv that referenced this issue Aug 3, 2019
This reverts commit 00c6b16.

It's been reported (and I can confirm) that this change breaks
`process.title = 'foo'` in Node.js.

Since libuv just calls out to Core Services and Application Services,
and since those frameworks are really just black boxes that you can't
look inside, it's impossible to debug what exactly goes wrong. Revert
it is then.

Fixes: nodejs/node#28945
bnoordhuis added a commit to bnoordhuis/libuv that referenced this issue Aug 3, 2019
This reverts commit 00c6b16.

It's been reported (and I can confirm) that this change breaks
`process.title = 'foo'` in Node.js.

Since libuv just calls out to Core Services and Application Services,
and since those frameworks are really just black boxes that you can't
look inside, it's impossible to debug what exactly goes wrong. Revert
it is then.

Fixes: nodejs/node#28945
@bnoordhuis
Copy link
Member

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

@bnoordhuis bnoordhuis added the libuv Issues and PRs related to the libuv dependency or the uv binding. label Aug 3, 2019
bnoordhuis added a commit to bnoordhuis/libuv that referenced this issue Aug 3, 2019
This reverts commit 00c6b16.

It's been reported (and I can confirm) that this change breaks
`process.title = 'foo'` in Node.js.

Since libuv just calls out to Core Services and Application Services,
and since those frameworks are really just black boxes that you can't
look inside, it's impossible to debug what exactly goes wrong. Revert
it is then.

Fixes: nodejs/node#28945
PR-URL: libuv#2405
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
@addaleax
Copy link
Member

addaleax commented Aug 3, 2019

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

@addaleax addaleax reopened this Aug 3, 2019
@ronkorving
Copy link
Contributor

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

@richardlau
Copy link
Member

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

@cjihrig
Copy link
Contributor

cjihrig commented Aug 4, 2019

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.

cjihrig added a commit to cjihrig/node that referenced this issue Aug 11, 2019
Notable changes:

- UV_FS_O_FILEMAP has been added for faster access to memory
  mapped files on Windows.
- uv_fs_mkdir() now returns UV_EINVAL for invalid filenames
  on Windows. It previously returned UV_ENOENT.
- The uv_fs_statfs() API has been added.
- The uv_os_environ() and uv_os_free_environ() APIs have
  been added.

Fixes: nodejs#28599
Fixes: nodejs#28945
Fixes: nodejs#29008
PR-URL: nodejs#29070
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
targos pushed a commit that referenced this issue Aug 19, 2019
Notable changes:

- UV_FS_O_FILEMAP has been added for faster access to memory
  mapped files on Windows.
- uv_fs_mkdir() now returns UV_EINVAL for invalid filenames
  on Windows. It previously returned UV_ENOENT.
- The uv_fs_statfs() API has been added.
- The uv_os_environ() and uv_os_free_environ() APIs have
  been added.

Fixes: #28599
Fixes: #28945
Fixes: #29008
PR-URL: #29070
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
BethGriggs pushed a commit to BethGriggs/node that referenced this issue Feb 26, 2020
Notable changes:

- UV_FS_O_FILEMAP has been added for faster access to memory
  mapped files on Windows.
- uv_fs_mkdir() now returns UV_EINVAL for invalid filenames
  on Windows. It previously returned UV_ENOENT.
- The uv_fs_statfs() API has been added.
- The uv_os_environ() and uv_os_free_environ() APIs have
  been added.

Fixes: nodejs#28599
Fixes: nodejs#28945
Fixes: nodejs#29008
PR-URL: nodejs#29070
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
BethGriggs pushed a commit that referenced this issue Mar 2, 2020
Notable changes:

- UV_FS_O_FILEMAP has been added for faster access to memory
  mapped files on Windows.
- uv_fs_mkdir() now returns UV_EINVAL for invalid filenames
  on Windows. It previously returned UV_ENOENT.
- The uv_fs_statfs() API has been added.
- The uv_os_environ() and uv_os_free_environ() APIs have
  been added.

Fixes: #28599
Fixes: #28945
Fixes: #29008
PR-URL: #29070
Backport-PR-URL: #31969
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@coreybutler
Copy link
Member

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

cc @cjihrig @addaleax @bnoordhuis @Trott

@bnoordhuis
Copy link
Member

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

@coreybutler
Copy link
Member

@bnoordhuis sure, ^^

Trott pushed a commit that referenced this issue Aug 4, 2020
Many users assume the act of assigning a value to `process.title` will
update the name of their application in apps like macOS Activity Monitor
or Windows Services Manager. This has worked in the past, but fails in
some versions of Node.js. Ultimately developers are left confused,
especially when it works in one version of Node.js and not another.
Given the recurring nature and complexity of the underlying problem, it
does not seem like a resolvable problem. This note clarifies the source
of the problem, sets developer expectations.

Refs: #28945
PR-URL: #34557
Fixes: #34280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
codebytere pushed a commit that referenced this issue Aug 6, 2020
Many users assume the act of assigning a value to `process.title` will
update the name of their application in apps like macOS Activity Monitor
or Windows Services Manager. This has worked in the past, but fails in
some versions of Node.js. Ultimately developers are left confused,
especially when it works in one version of Node.js and not another.
Given the recurring nature and complexity of the underlying problem, it
does not seem like a resolvable problem. This note clarifies the source
of the problem, sets developer expectations.

Refs: #28945
PR-URL: #34557
Fixes: #34280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
codebytere pushed a commit that referenced this issue Aug 11, 2020
Many users assume the act of assigning a value to `process.title` will
update the name of their application in apps like macOS Activity Monitor
or Windows Services Manager. This has worked in the past, but fails in
some versions of Node.js. Ultimately developers are left confused,
especially when it works in one version of Node.js and not another.
Given the recurring nature and complexity of the underlying problem, it
does not seem like a resolvable problem. This note clarifies the source
of the problem, sets developer expectations.

Refs: #28945
PR-URL: #34557
Fixes: #34280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
addaleax pushed a commit that referenced this issue Sep 22, 2020
Many users assume the act of assigning a value to `process.title` will
update the name of their application in apps like macOS Activity Monitor
or Windows Services Manager. This has worked in the past, but fails in
some versions of Node.js. Ultimately developers are left confused,
especially when it works in one version of Node.js and not another.
Given the recurring nature and complexity of the underlying problem, it
does not seem like a resolvable problem. This note clarifies the source
of the problem, sets developer expectations.

Refs: #28945
PR-URL: #34557
Fixes: #34280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
addaleax pushed a commit that referenced this issue Sep 22, 2020
Many users assume the act of assigning a value to `process.title` will
update the name of their application in apps like macOS Activity Monitor
or Windows Services Manager. This has worked in the past, but fails in
some versions of Node.js. Ultimately developers are left confused,
especially when it works in one version of Node.js and not another.
Given the recurring nature and complexity of the underlying problem, it
does not seem like a resolvable problem. This note clarifies the source
of the problem, sets developer expectations.

Refs: #28945
PR-URL: #34557
Fixes: #34280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. libuv Issues and PRs related to the libuv dependency or the uv binding. macos Issues and PRs related to the macOS platform / OSX. process Issues and PRs related to the process subsystem.
Projects
None yet
9 participants