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

16.1.0 with LTO: yarn 1 does not terminate #38553

Closed
dilyanpalauzov opened this issue May 5, 2021 · 9 comments
Closed

16.1.0 with LTO: yarn 1 does not terminate #38553

dilyanpalauzov opened this issue May 5, 2021 · 9 comments
Labels
build Issues and PRs related to build files or the CI.

Comments

@dilyanpalauzov
Copy link

Using global yarn 1.22.10 calling

yarn init -y
yarn add imagemin
yarn outdated

terminates under Node 16.0.0 within reasonable time.

With node 16.1.0 neither yarn init -y nor yarn outdated terminate within reasonable time (I have not tried yarn add). Yarn under node 16.1.0 prints Done in 3.0s, but does not terminate on Linux.

@Ayase-252
Copy link
Member

Not reproducible on MacOS. It works fine. Am I missing something?

➜  demo node -v
v16.1.0
➜  demo yarn add imagemin
yarn add v1.21.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 37 new dependencies.
info Direct dependencies
└─ imagemin@8.0.0
info All dependencies
├─ @nodelib/fs.scandir@2.1.4
├─ @nodelib/fs.stat@2.0.4
├─ @nodelib/fs.walk@1.2.6
├─ @types/debug@4.1.5
├─ array-union@2.1.0
├─ braces@3.0.2
├─ dir-glob@3.0.1
├─ fast-glob@3.2.5
├─ fastq@1.11.0
├─ file-type@14.7.1
├─ fill-range@7.0.1
├─ glob-parent@5.1.2
├─ globby@11.0.3
├─ graceful-fs@4.2.6
├─ ieee754@1.2.1
├─ ignore@5.1.8
├─ imagemin@8.0.0
├─ is-extglob@2.1.1
├─ is-glob@4.0.1
├─ is-number@7.0.0
├─ is-typedarray@1.0.0
├─ junk@3.1.0
├─ micromatch@4.0.4
├─ p-pipe@4.0.0
├─ path-type@4.0.0
├─ peek-readable@3.1.3
├─ picomatch@2.2.3
├─ queue-microtask@1.2.3
├─ readable-web-to-node-stream@2.0.0
├─ replace-ext@2.0.0
├─ reusify@1.0.4
├─ run-parallel@1.2.0
├─ slash@3.0.0
├─ strtok3@6.0.8
├─ to-regex-range@5.0.1
├─ token-types@2.1.1
└─ typedarray-to-buffer@3.1.5
✨  Done in 1.99s.
➜  demo yarn outdated
yarn outdated v1.21.1
✨  Done in 0.29s.

@dilyanpalauzov
Copy link
Author

I have this on Linux.

@Ayase-252
Copy link
Member

@dilyanpalauzov I have tried on Ubuntu 18.04, and it still works....
Screen Shot 2021-05-06 at 14 55 22

@targos
Copy link
Member

targos commented May 6, 2021

I'm also unable to reproduce on Linux.

@dilyanpalauzov
Copy link
Author

yarn 1 does not terminate under Linux, when Node 16.1.0 is compiled using --enable-lto. Without --enable-lto, it does terminate. Since Node 16.0.0 cannot be linked with LTO, this is not a regression compared to 16.0.0, but compared to Node 14.

I use ld.bfd 2.35.1-41.fc34 with g++ (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1).

The .gz output of strace -t -s2048 yarn init -y

@dilyanpalauzov dilyanpalauzov changed the title 16.1.0 regression compared to 16.0.0: yarn 1 does not terminate 16.1.0 with LTO: yarn 1 does not terminate May 6, 2021
@gengjiawen
Copy link
Member

I am using master branch, not able to reproudce too. Can you try https://github.com/gengjiawen/node-github-workflow/actions/runs/816993117 binary ?

@dilyanpalauzov
Copy link
Author

Building from the master branch still has this problem. I uploaded my binary at https://mail.aegee.org/dpa/n16/ .

Compiling CC=clang CXX=clang++ python configure.py --gdb --ninja --enable-lto fails with

Traceback (most recent call last):
  File "/git/node/configure.py", line 1877, in <module>
    configure_node(output)
  File "/git/node/configure.py", line 1224, in configure_node
    raise Exception(
Exception: The option --enable-lto is supported for gcc and gxx 5.4.1 or newer only.

Why am I not permitted to use LTO with clang?

Can I tell the compiler using configure.py to use ld.gold as linker?

The webpage https://github.com/gengjiawen/node-github-workflow/actions/runs/816993117 contains the information

Artifacts

Name: artifact, hyperlink to the text `artifact`: https://github.com/gengjiawen/node-github-workflow/suites/2666783862/artifacts/58758469 
Size: 1.37 GB

I cannot download https://github.com/gengjiawen/node-github-workflow/suites/2666783862/artifacts/58758469 using wget or curl. When I try to download it from FIrefox, the first time 500MB were downloaded, the second and third time 528MB were downloaded. That said I cannot download the uploaded artifact in its completeness.

@targos targos added the build Issues and PRs related to build files or the CI. label Aug 9, 2021
@richardlau
Copy link
Member

Does this still occur with #40631 (which is now on the most recent versions of Node.js 12, 14, 16 and 17) applied?

@dilyanpalauzov
Copy link
Author

With the change #40631 applied towards Node v16.14.0, the initial problem is gone. I compile using --enable-lto, then call yarn add -y and it terminates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

5 participants