GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — npm: last nightly / v8-canary make `npm update` unusable · Issue #19405 · nodejs/node

npm: last nightly / v8-canary make npm update unusable #19405

New issue
Copy link
New issue
Copy link
Closed
Closed
npm: last nightly / v8-canary make npm update unusable#19405
Copy link
Labels
npmIssues and PRs related to the npm client dependency or the npm registry.utilIssues and PRs related to the built-in util module.

Description

@vsemozhetbyt
vsemozhetbyt
opened on Mar 17, 2018
Issue body actions
  • Version: Node.js master (10.0.0 after 2018-01-15, see npm: last nightly / v8-canary make npm update unusable #19405 (comment)), npm 5.6.0
  • Platform: Windows 7 x64 (maybe all)
  • Subsystem: npm

Please, check if this is reproducible:

  1. Install/download last nightly or v8-canary build.

  2. Run npm update or npm update -g for a package with many dependencies (see an example in npm: last nightly / v8-canary make npm update unusable #19405 (comment)).

I have 1.5 GB memory consumption, ~100% CPU, and never-ending process without any output messages.

Installing / using Node.js v9.8.0 with the same npm fixes the issue.

Activity

Next
  1. vsemozhetbyt
    added
    windowsIssues and PRs related to the Windows platform.
    npmIssues and PRs related to the npm client dependency or the npm registry.
    on Mar 17, 2018
  2. vsemozhetbyt commented on Mar 17, 2018

    @vsemozhetbyt
    vsemozhetbyt
    on Mar 17, 2018
    ContributorAuthor
    More actions

    The issue seems to appear if something does need to be updated: after successfully updating (npm update -g) with Node.js v9.8.0, npm update -g returns immediately with Node.js v10.0.0, but npm update with outdated packages hangs.

  3. vsemozhetbyt
    changed the title [-]npm: last nightly / v8-canary make `npm update` unusable[/-] [+]npm: last nightly / v8-canary make `npm update` unusable on Windows[/+] on Mar 17, 2018
  4. vsemozhetbyt commented on Mar 17, 2018

    @vsemozhetbyt
    vsemozhetbyt
    on Mar 17, 2018
    ContributorAuthor
    More actions

    Narrowed case.

    https://github.com/eslint/eslint/releases — last versions: 4.18.2, 4.19.0.

    md test-npm && cd test-npm
    npm install [email protected]
    npm update

    The last command hangs trying to update to 4.19.0.

  5. targos commented on Mar 17, 2018

    @targos
    targos
    on Mar 17, 2018
    Member
    More actions

    can you run it in verbose mode so we have a better idea about when it starts hanging?

    Reacted by Vse Mozhe Buty
  6. vsemozhetbyt commented on Mar 17, 2018

    @vsemozhetbyt
    vsemozhetbyt
    on Mar 17, 2018
    ContributorAuthor
    More actions
    j:\temp\test-npm>npm update --verbose
    npm info it worked if it ends with ok
    npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
    npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
    npm verb cli   'update',
    npm verb cli   '--verbose' ]
    npm info using [email protected]
    npm info using [email protected]
    npm verb npm-session 5aebf4c4722b2950
    npm verb update computing outdated modules to update
    npm verb request uri https://registry.npmjs.org/eslint
    npm verb request no auth needed
    npm info attempt registry request try #1 at 16:17:48
    npm verb request using bearer token for auth
    npm verb request id f1120122477c2bf9
    npm http request GET https://registry.npmjs.org/eslint
    npm http 200 https://registry.npmjs.org/eslint
    npm verb headers { 'content-type': 'application/json; charset=UTF-8',
    npm verb headers   server: 'UploadServer',
    npm verb headers   'cache-control': 'max-age=300',
    npm verb headers   'last-modified': 'Sat, 17 Mar 2018 14:17:19 GMT',
    npm verb headers   etag: '"5aad236f-8c747"',
    npm verb headers   'x-npm-region': 'EU-East',
    npm verb headers   'content-encoding': 'gzip',
    npm verb headers   'content-length': '35168',
    npm verb headers   'accept-ranges': 'bytes',
    npm verb headers   date: 'Sat, 17 Mar 2018 14:17:50 GMT',
    npm verb headers   via: '1.1 varnish',
    npm verb headers   age: '21',
    npm verb headers   connection: 'keep-alive',
    npm verb headers   'x-served-by': 'cache-hhn1528-HHN',
    npm verb headers   'x-cache': 'HIT',
    npm verb headers   'x-cache-hits': '1',
    npm verb headers   'x-timer': 'S1521296270.344240,VS0,VE1',
    npm verb headers   vary: 'Accept-Encoding, Accept' }

    Hangs here.

  7. vsemozhetbyt commented on Mar 18, 2018

    @vsemozhetbyt
    vsemozhetbyt
    on Mar 18, 2018
    ContributorAuthor
    More actions

    Some debugging data:

    v10.0.0-nightly2018011585739b6c5b is OK
    v10.0.0-nightly20180116f75bc2c1a5 hangs

    So the cause seems to be here: 85739b6...f75bc2c

    These frames are the beginning of the infinite spin:

    node/deps/npm/lib/update.js

    Line 53 in 1329844

    log.info('outdated', 'updating', wanted)
    ->

    node/deps/npm/node_modules/npmlog/log.js

    Line 286 in 1329844

    return this.log.apply(this, a)
    ->

    node/deps/npm/node_modules/npmlog/log.js

    Line 194 in 1329844

    message = util.format.apply(util, a)

    From there, the data in recursive chains of util.format()/util.inspect() and their sub-calls begins to differ.

    So maybe #17907 is the cause.

    We may need to fix this before v10 release.

    cc @nodejs/util

  8. vsemozhetbyt
    changed the title [-]npm: last nightly / v8-canary make `npm update` unusable on Windows[/-] [+]npm: last nightly / v8-canary make `npm update` unusable[/+] on Mar 18, 2018
  9. vsemozhetbyt
    added
    utilIssues and PRs related to the built-in util module.
    and removed
    windowsIssues and PRs related to the Windows platform.
    on Mar 18, 2018
  10. BridgeAR commented on Mar 21, 2018

    @BridgeAR
    BridgeAR
    on Mar 21, 2018
    Member
    More actions

    This seems to be a formerly hidden bug in npm and not a bug in Node.js.

    I do understand that this is something we have to find a solution for soon though. We might just use a high depth limit to circumvent issue like these but that is more like a hack than anything else and could only be a intermediate step. It will still be a recursive call up to the maximum limit and anyone who changes the default to unlimited is also going to run into this.

    We could set the limit to e.g., 1000 for now to circumvent the issue. I am just not a fan of doing so because it will prevent anyone else from realizing that there is an issue with their code if they also have a unlimited recursion.

    @vsemozhetbyt are you fine with opening a PR against npm to fix the issue? You already know how this works, so I guess it should be relatively straight forward?

  11. vsemozhetbyt commented on Mar 21, 2018

    @vsemozhetbyt
    vsemozhetbyt
    on Mar 21, 2018
    ContributorAuthor
    More actions

    @BridgeAR Sorry, I've tried to debug to the end but got more and more confused. I am afraid I do not know enough to propose a fix. I've posted an issue in npm, but it has no traction there yet.

  12. vsemozhetbyt commented on Mar 23, 2018

    @vsemozhetbyt
    vsemozhetbyt
    on Mar 23, 2018
    ContributorAuthor
    More actions

    @Fishrock123, @MylesBorins, can you suggest somebody from npm team to cc here for looking into this issue? Otherwise, we may release v10 with broken npm.

  13. BridgeAR commented on Mar 23, 2018

    @BridgeAR
    BridgeAR
    on Mar 23, 2018
    Member
    More actions

    @nodejs/npm please take a look at this. We have to find a solution for this problem before the next major Node.js release and this is therefore urgent.

    Reacted by Vse Mozhe Buty
  14. 29 remaining items

  15. jasnell
    added a commit that references this issue on Apr 17, 2018

    Revert "util: change util.inspect depth default"

    554ed37
  16. jasnell commented on Apr 17, 2018

    @jasnell
    jasnell
    on Apr 17, 2018
    Member
    More actions

    Landed the revert of the change in v10.x-staging

  17. jasnell
    removed this from the 10.0.0 milestone on Apr 19, 2018
  18. jasnell commented on Apr 19, 2018

    @jasnell
    jasnell
    on Apr 19, 2018
    Member
    More actions

    Note: the revert landed in 10.x but this is still an open issue in master.

  19. addaleax
    added a commit that references this issue on May 6, 2018

    Revert "util: change util.inspect depth default"

    135a766
  20. BridgeAR
    added a commit that references this issue on May 11, 2018

    Revert "util: change util.inspect depth default"

    849aaae
  21. BridgeAR
    closed this as completedin 849aaaeon May 11, 2018
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

    npmIssues and PRs related to the npm client dependency or the npm registry.utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.