Page MenuHomePhabricator

QUnit and npm jobs sometimes fail with "npm ERR! code ENOENT"
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/mediawiki-core-qunit/61900/console

21:49:25 npm ERR! Linux 3.13.0-83-generic
21:49:25 npm ERR! argv "node" "/usr/local/bin/npm" "install"
21:49:25 npm ERR! node v0.10.25
21:49:25 npm ERR! npm  v2.14.12
21:49:25 npm ERR! path /mnt/jenkins-workspace/workspace/mediawiki-core-qunit/src/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/package.json
21:49:25 npm ERR! code ENOENT
21:49:25 npm ERR! errno 34
21:49:25 
21:49:25 npm ERR! enoent ENOENT, open '/mnt/jenkins-workspace/workspace/mediawiki-core-qunit/src/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/package.json'
21:49:25 npm ERR! enoent This is most likely not a problem with npm itself
21:49:25 npm ERR! enoent and is related to npm not being able to find a file.
21:49:25 npm ERR! enoent 
21:49:26

This specific ENOENT error on socket.io-client module seems to be happening quite often lately.

Event Timeline

Krinkle renamed this task from QUnit job sometimes fails with "npm ERR! code ENOENT" to QUnit and npm jobs sometimes fail with "npm ERR! code ENOENT".Mar 31 2016, 1:37 AM

Mentioned in SAL [2016-03-31T01:40:03Z] <Krinkle> Purge npm cache in integration-slave-trusty-1015:/mnt/home/jenkins-deploy/.npm was corrupted around March 23 19:00 for unknown reasons (T130895)

Had the same again at https://integration.wikimedia.org/ci/job/npm/60457/console for https://gerrit.wikimedia.org/r/280595.

22:46:53 npm ERR! path /mnt/jenkins-workspace/workspace/npm/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/package.json
22:46:53 npm ERR! code ENOENT
22:46:53 npm ERR! errno 34
22:46:53 
22:46:53 npm ERR! enoent ENOENT, open '/mnt/jenkins-workspace/workspace/npm/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/package.json'

Same package as previously. (engine.io-client)

They both ran on integration-slave-trusty-1015. And after some debugging it turns out that instance had a corrupted npm cache. Something happened on March 23 around 19:00 that caused lots of packages to be corrupted with over 300 unreleased lock files.

-rw-r--r--    1 jenkins-deploy wikidev      0 Mar 23 19:16 b2ad1a5b--vinyl-fs-node-modules-strip-bom.lock
-rw-r--r--    1 jenkins-deploy wikidev      0 Mar 23 19:17 b2fe66eb-ules-path-type-node-modules-pify.lock
-rw-r--r--    1 jenkins-deploy wikidev      0 Mar 23 19:16 b3350ddc-rough2-filter-node-modules-xtend.lock
-rw-r--r--    1 jenkins-deploy wikidev      0 Mar 23 19:17 b390ac98-ata-node-modules-hosted-git-info.lock
-rw-r--r--    1 jenkins-deploy wikidev      0 Mar 23 19:12 b3d82ed4-cat-stream-node-modules-inherits.lock
...

Could be related, https://wikitech.wikimedia.org/wiki/Release_Engineering/SAL

2016-03-23

  • 19:02 legoktm: restarted zuul

This may've aborted a job (though Zuul restart shouldn't kill Jenkins jobs, right?) - which then corrupted npm's internal state (which is also unexpected).

hashar claimed this task.
hashar subscribed.

I guess it was a transient issue.