Skip to content

tools: add missing uv_setup_argv() calls #35491

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Oct 4, 2020

Refs: #34751

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@addaleax addaleax requested a review from cjihrig October 4, 2020 00:08
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Oct 4, 2020
@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 4, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 4, 2020
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Oct 4, 2020

@addaleax addaleax added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 6, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 6, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2020

Landed in b5490d0

@github-actions github-actions bot closed this Oct 6, 2020
nodejs-github-bot pushed a commit that referenced this pull request Oct 6, 2020
Refs: #34751

PR-URL: #35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@danielleadams danielleadams mentioned this pull request Oct 6, 2020
danielleadams pushed a commit that referenced this pull request Oct 6, 2020
Refs: #34751

PR-URL: #35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs added a commit that referenced this pull request Oct 14, 2020
This reverts commit 70e77f123164ecbdbdd4abc2e4919ce1b193421e.

Refs: #35491

PR-URL: #35641
Reviewed-By: Richard Lau <rlau@redhat.com>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Refs: #34751

PR-URL: #35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Nov 3, 2020
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Refs: #34751

PR-URL: #35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Refs: nodejs#34751

PR-URL: nodejs#35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request May 30, 2021
Refs: #34751

PR-URL: #35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@targos
Copy link
Member

targos commented May 30, 2021

ASAN reports a leak if this is applied to v14.x:

==58694==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 145 byte(s) in 1 object(s) allocated from:
    #0 0x9ed47d in malloc (/home/runner/work/node/node/out/Release/node_mksnapshot+0x9ed47d)
    #1 0xaace3c in uv_setup_args /home/runner/work/node/node/out/../deps/uv/src/unix/proctitle.c:68:14
    #2 0x103d2bb in main (/home/runner/work/node/node/out/Release/node_mksnapshot+0x103d2bb)
    #3 0x7f46755ee0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: 145 byte(s) leaked in 1 allocation(s).
make[2]: *** [node.target.mk:26: /home/runner/work/node/node/out/Release/obj/gen/node_snapshot.cc] Error 1
make[2]: *** Waiting for unfinished jobs....
rm 2ad06b2c9baade6b27c5c82cdcc7af11c369378d.intermediate 9ac559b3661ef3e3ae7143f36ccc6691e578b31c.intermediate 02a486ff0aa87df511c38b125409357fdc559df2.intermediate 5e4cf980d3dc346b9b9ba01305d21285c5aecbf4.intermediate
make[1]: *** [Makefile:104: node] Error 2
make: *** [Makefile:530: build-ci] Error 2

Do you know what would be missing on the branch to fix it? Otherwise, I guess we can mark dont-land as v14.x seems to work fine without it...

@addaleax addaleax deleted the tools-uv-setup-args branch May 30, 2021 21:40
@addaleax
Copy link
Member Author

@targos I think this would be fine to omit this PR if it doesn’t turn out to be necessary for other work, yes. At the same time, adding uv_library_shutdown() to the main() functions here should be enough to resolve that leak, and I’m not really understanding why it only shows up on v14.x.

Trott pushed a commit to Trott/io.js that referenced this pull request Jun 1, 2021
Refs: nodejs#34751

PR-URL: nodejs#35491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.