Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build driver-os-monitor (0.5.2-dev) fails with seg fault #311

Open
cgreenhalgh opened this issue Feb 22, 2019 · 4 comments
Open

build driver-os-monitor (0.5.2-dev) fails with seg fault #311

cgreenhalgh opened this issue Feb 22, 2019 · 4 comments

Comments

@cgreenhalgh
Copy link

When I try to build driver-os-monitor, branch 0.5.2-dev, npm/node exit with segmentation fault (e.g. at npm install step):

$ docker build -t databoxsystems/driver-os-monitor-amd64:0.5.2  .
Sending build context to Docker daemon  262.1kB
Step 1/10 : FROM amd64/alpine:3.8
 ---> 491e0ff7a8d5
Step 2/10 : WORKDIR /app
 ---> Using cache
 ---> 4d2f5e899dae
Step 3/10 : RUN addgroup -S databox && adduser -S -g databox databox && apk --no-cache add build-base pkgconfig nodejs npm libzmq zeromq-dev libsodium-dev python  && npm install zeromq@4.6.0 --zmq-external --verbose && apk del build-base pkgconfig libsodium-dev python zeromq-dev
 ---> Using cache
 ---> 97161b42183f
Step 4/10 : ADD ./package.json package.json
 ---> Using cache
 ---> 28b0e780cad0
Step 5/10 : RUN npm install --production && npm run clean
 ---> Running in f363a5802d4f
Segmentation fault
The command '/bin/sh -c npm install --production && npm run clean' returned a non-zero code: 139

strangely, if i edit the Dockerfile to end at that point and run it then node / npm segfault, but if I apk del then re-add npm it seems to work again. So the seg fault only appears when npm has been installed at an earlier step in the docker build (i.e. in a previous build container).

This is on an alpine VM running Docker version 18.09.1-ce.

@Toshbrown
Copy link
Contributor

Hi Chris,

I've just run docker build -t databoxsystems/driver-os-monitor-amd64:test . --no-cache on my build machine and can't replicate the issue. Can you rerun with --no-cache and see if it builds?

@cgreenhalgh
Copy link
Author

I have replicated this issue but only on an Alpine VM (e.g. it doesn't occur in Docker for Mac or in a Debian Stretch VM). It is repeatable with --no-cache.

The Alpine VM Is based on Vagrant's "alpine/alpine64" base image, plus

sudo apk update
sudo apk upgrade

and docker installed as per alpine docs

I've confirmed that alpine (which didn't work) and debian (which did) both report docker is using the overlay2 storage engine.

So my best guess is that there is something different about the overlayFS support in the alpine kernel vs debian, or something like that :-/

So I'm using debian for now in Intel.

@Toshbrown
Copy link
Contributor

would that be Alpine 3.9 or 3.8?

@cgreenhalgh
Copy link
Author

/etc/alpine-release says 3.9.0.

/etc/apk/repositories are

http://nl.alpinelinux.org/alpine/v3.7/community
http://nl.alpinelinux.org/alpine/edge/main
http://nl.alpinelinux.org/alpine/edge/community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants