镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

16.1.0 with LTO: yarn 1 does not terminate #38553

Closed

Description

@dilyanpalauzov

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.

Activity

  1. Ayase-252 commented on May 6, 2021

    @Ayase-252
    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.
    
  2. dilyanpalauzov commented on May 6, 2021

    @dilyanpalauzov
    Author

    I have this on Linux.

  3. Ayase-252 commented on May 6, 2021

    @Ayase-252
    Member

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

  4. targos commented on May 6, 2021

    @targos
    Member

    I'm also unable to reproduce on Linux.

  5. dilyanpalauzov commented on May 6, 2021

    @dilyanpalauzov
    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

  6. 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[/+] on May 6, 2021
  7. gengjiawen commented on May 6, 2021

    @gengjiawen
    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 ?

  8. dilyanpalauzov commented on May 7, 2021

    @dilyanpalauzov
    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.

  9. added
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    on Aug 9, 2021
  10. richardlau commented on Feb 17, 2022

    @richardlau
    Member

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

  11. dilyanpalauzov commented on Feb 18, 2022

    @dilyanpalauzov
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions