Page MenuHomePhabricator

RESTBase's compiled nodejs shared objects break vagrant git-update if service is running
Closed, ResolvedPublic

Description

When just installing MediaWiki-Vagrant fresh and running vagrant git-update after a week, the following happens:

==> Updating restbase ...
[*] Updating repo in /vagrant/srv/restbase ...
From https://github.com/wikimedia/restbase
   7d1161a..1da3e91  master     -> origin/master
 * [new tag]         v0.11.2    -> v0.11.2
 * [new tag]         v0.11.3    -> v0.11.3
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 1da3e918499a82ff5f71fc5b2b5b402b4f0476e7.
[*] Updating dependencies for restbase ...
rm: cannot remove ‘node_modules/restbase-mod-table-sqlite/node_modules/sqlite3/lib/binding/node-v46-linux-x64’: Directory not empty
 ***** Could not update dependencies of restbase !

I don't know why it happened. I didn't change anything. It should recover from this or not happen in the first place. I can think of a way to forcefully recover manually, but that shouldn't be necessary.

Event Timeline

This errror is only ever possible when NFS issues are encountered, in which case the only medicine is to restart the box, so I don't think there's a concrete step the update script can actually do since it's running inside the guest.

This errror is only ever possible when NFS issues are encountered, in which case the only medicine is to restart the box, so I don't think there's a concrete step the update script can actually do since it's running inside the guest.

Isn't this caused by npm compiling the node_sqlite3.node file rather than NFS issues?

Isn't this caused by npm compiling the node_sqlite3.node file rather than NFS issues?

I have witnessed this exact same error multiple times. Yes, it's happening while compiling the sqlite3 module, but that directory cannot be removed because of failed NFS execution.

vagrant@mediawiki-vagrant:~$ sudo rm -r /vagrant/srv/restbase/node_modules/restb
ase-mod-table-sqlite/node_modules/sqlite3/lib/binding/node-v46-linux-x64
rm: cannot remove ‘/vagrant/srv/restbase/node_modules/restbase-mod-table-sqlite/node_modules/sqlite3/lib/binding/node-v46-linux-x64/.nfs00000000001045a30000000c’: Device or resource busy
vagrant@mediawiki-vagrant:~$ file /vagrant/srv/restbase/node_modules/restbase-mod-table-sqlite/node_modules/sqlite3/lib/binding/node-v46-linux-x64/.nfs00000000001045a30000000c
/vagrant/srv/restbase/node_modules/restbase-mod-table-sqlite/node_modules/sqlite3/lib/binding/node-v46-linux-x64/.nfs00000000001045a30000000c: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=958bfd166c36db003618fe028a800953b5435ca9, not stripped

RESTBase still has the shared module open preventing it from being removed.

bd808 renamed this task from vagrant git-update should be resilient against git errors as part of normal use to RESTBase's compiled nodejs shared objects break vagrant git-update if service is running.Mar 17 2016, 1:33 AM

Change 279252 had a related patch set uploaded (by Mobrovac):
git-update: Stop services before updating their dependencies

https://gerrit.wikimedia.org/r/279252

mobrovac triaged this task as Medium priority.
mobrovac added a project: User-mobrovac.
mobrovac moved this task from Backlog to Awaiting review on the MediaWiki-Vagrant board.

Change 279252 merged by jenkins-bot:
git-update: Stop services before updating their dependencies

https://gerrit.wikimedia.org/r/279252

mobrovac moved this task from Awaiting review to Done on the MediaWiki-Vagrant board.
mobrovac removed a project: Patch-For-Review.
mobrovac removed a subscriber: gerritbot.