Project

General

Profile

Actions

Bug #40645

closed

"npm ci" continues running when it fails

Added by Nathan Cutler almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The command "npm ci" is run

2019-07-02T20:59:20.652 INFO:teuthology.orchestra.run.target192168000130.stderr:+ npm ci
2019-07-02T20:59:22.079 INFO:teuthology.orchestra.run.target192168000130.stderr:Unhandled rejection Error: Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/zzakir/ng2-toastr.git /root/.npm/_cacache/tmp/git-clone-3c4c0a3e
2019-07-02T20:59:22.079 INFO:teuthology.orchestra.run.target192168000130.stderr:fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-3c4c0a3e': Permission denied
2019-07-02T20:59:22.079 INFO:teuthology.orchestra.run.target192168000130.stderr:
2019-07-02T20:59:22.080 INFO:teuthology.orchestra.run.target192168000130.stderr:    at ChildProcess.exithandler (child_process.js:289:12)
2019-07-02T20:59:22.080 INFO:teuthology.orchestra.run.target192168000130.stderr:    at ChildProcess.emit (events.js:182:13)
2019-07-02T20:59:22.080 INFO:teuthology.orchestra.run.target192168000130.stderr:    at maybeClose (internal/child_process.js:962:16)
2019-07-02T20:59:22.080 INFO:teuthology.orchestra.run.target192168000130.stderr:    at Socket.stream.socket.on (internal/child_process.js:381:11)
2019-07-02T20:59:22.080 INFO:teuthology.orchestra.run.target192168000130.stderr:    at Socket.emit (events.js:182:13)
2019-07-02T20:59:22.081 INFO:teuthology.orchestra.run.target192168000130.stderr:    at Pipe._handle.close (net.js:606:12)

Here it hangs . . . forever. Many hours later I killed the "npm ci" processes (there were two of them running), and npm wrote to the log that there is an error within npm itself.

2019-07-03T09:48:05.996 INFO:teuthology.orchestra.run.target192168000130.stderr:npm ERR! cb() never called!
2019-07-03T09:48:05.996 INFO:teuthology.orchestra.run.target192168000130.stderr:
2019-07-03T09:48:05.997 INFO:teuthology.orchestra.run.target192168000130.stderr:npm ERR! This is an error with npm itself. Please report this error at:
2019-07-03T09:48:05.997 INFO:teuthology.orchestra.run.target192168000130.stderr:npm ERR!     <https://npm.community>
2019-07-03T09:48:06.020 INFO:teuthology.orchestra.run.target192168000130.stderr:
2019-07-03T09:48:06.021 INFO:teuthology.orchestra.run.target192168000130.stderr:npm ERR! A complete log of this run can be found in:
2019-07-03T09:48:06.021 INFO:teuthology.orchestra.run.target192168000130.stderr:npm ERR!     /root/.npm/_logs/2019-07-03T09_48_06_005Z-debug.log

I suspect the root cause here was a mistake on my side in that I ran "npm ci" as root.

Still, at the very least, I should probably run "npm ci" via timeout to prevent a hang from tying up testing resources.

Also, I was rather surprised to see that "npm ci" is cloning a git repo from github - this is something we try to avoid doing in the CI, since it exposes the CI to the momentary state of the github infrastructure.

Actions #1

Updated by Nathan Cutler almost 5 years ago

  • Description updated (diff)

I've been told the "git clone git://github.com/zzakir/ng2-toastr.git" will be dropped in Octopus, so that part of the bug can be considered resolved.

I will open a PR to run npm with "timeout -v 3h" or similar.

Actions #2

Updated by Nathan Cutler almost 5 years ago

  • Subject changed from "npm ci" continues running when it fails, and silently clones repos from github to "npm ci" continues running when it fails
Actions #3

Updated by Nathan Cutler almost 5 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 28994
Actions #4

Updated by Ricardo Marques almost 5 years ago

PR #28994 has been merged. This issue can now be marked as Resolved.

Actions #5

Updated by Tiago Melo almost 5 years ago

  • Status changed from Fix Under Review to Resolved
  • Target version set to v15.0.0
Actions

Also available in: Atom PDF