kobolog / gorb

IPVS on steroids – REST API, heartbeats, service discovery and more
GNU Lesser General Public License v3.0
809 stars 83 forks source link

Segmentation Fault: The command '/bin/sh -c pip install pyinotify' returned a non-zero code: 139 #50

Closed zenny closed 5 years ago

zenny commented 6 years ago

Hi,

Trying to build on alpinelinux v3.6 host by fetching master (82f9de7f6d8d11fb4ddd1e2168be6ff32237db56) . But I get interrupted at,

Segmentation fault The command '/bin/sh -c pip install pyinotify' returned a non-zero code: 139

The output is as follows:

# docker build -t gorb .
Sending build context to Docker daemon  78.17MB
Step 1/16 : FROM golang:1.8
 ---> ba52c9ef0f5c
Step 2/16 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> dc0a08ee87c7
Step 3/16 : RUN apt-get update   && apt-get install -y software-properties-common python-pip   python-setuptools   python-dev   build-essential   libssl-dev   libffi-dev   && apt-get install --no-install-suggests --no-install-recommends -y   curl   git   build-essential   python-netaddr   unzip   vim   wget   inotify-tools   && apt-get clean -y   && apt-get autoremove -y   && rm -rf /var/lib/apt/lists/* /tmp/*
 ---> Using cache
 ---> 4a101a7c98a0
Step 4/16 : RUN pip install pyinotify
 ---> Running in 6a306dfc707f
Downloading/unpacking pyinotify
Segmentation fault
The command '/bin/sh -c pip install pyinotify' returned a non-zero code: 139

In my case, this does not seem like a swap issue as described at http://samwize.com/2016/05/19/docker-error-returned-a-non-zero-code-137/ because, I have adequate RAM allocated to the VM:

# free -m
             total       used       free     shared    buffers     cached
Mem:          7974        405       7568         10         27        243
-/+ buffers/cache:        134       7839
Swap:         2047          0       2047

Thanks for a nice project.

Season's greetings and cheers, /zenny

kobolog commented 6 years ago

It actually looks like something is wrong with pip. It might be a transient issue with Docker or golang:1.8 image I guess, but I don't think it's memory-related.

zenny commented 6 years ago

@kobolog You appear to be right, because I tried with a cetos7 image with abundance of memory and disk-space and landed at the same error. The gorb images at doker hub are two years old when I checked yesterday. :-)

kobolog commented 6 years ago

Yeah I probably need to update that =) Will do over the weekend!

zenny commented 6 years ago

@kobolog Methough it could be a glibc issue in alpineliunx (musl-based), yet landed in the same error even after adding the packages from https://github.com/sgerrand/alpine-pkg-glibc, fyi.

callamd commented 6 years ago

I'm getting 139 on a variety of docker-compose files on Fedora 28.

edit:

It was a SELinux issue.