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

Exit code 139 on startup #3424

Closed
yangm97 opened this Issue Nov 6, 2016 · 12 comments

Comments

Projects
None yet
4 participants
@yangm97

yangm97 commented Nov 6, 2016

Client version: self-compiled
Server OS: Alpine 3.4 inside Docker
Commit id: 32b38fb

Expected behavior

Successful startup

Actual behavior

Container exits with code 139 (seg fault?)

Steps to reproduce the behavior

Dockerfile

FROM alpine:3.4
MAINTAINER Yan Minari <yangm97@gmail.com>

ENV APP_REPO=https://github.com/cuberite/cuberite.git
ENV APP_BRANCH=master
ENV BUILD_TYPE=RELEASE
WORKDIR /tmp

RUN apk add --no-cache --virtual build-dependencies \
    build-base \
    clang \
    cmake \
    git \
    perl &&\
    git clone \
    -b ${APP_BRANCH} \
    --recursive \
    ${APP_REPO} /tmp

RUN cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} && make -j 2

RUN mkdir -p /opt/app && \
    cp -a /tmp/Server/* /opt/app && \
    apk del build-dependencies && \
    rm -rf /tmp/*

RUN apk add --no-cache libstdc++

WORKDIR /opt/app

CMD ["./Cuberite"]

docker-compose.yml

cuberite:
  build: .
  ports:
   - "25566:25565"
   - "8080:8080"
#  volumes:
#   - ./Server:/opt/app/
  tty: true
  stdin_open: true
@madmaxoft

This comment has been minimized.

Show comment
Hide comment
@madmaxoft

madmaxoft Nov 6, 2016

Member

I'm not familiar with Docker at all, but one thing that stands out for me is the filename. You're using the DEBUG build, and that produces the executable Cuberite_debug, which I don't see mentioned anywhere. Could that be the cause?

Member

madmaxoft commented Nov 6, 2016

I'm not familiar with Docker at all, but one thing that stands out for me is the filename. You're using the DEBUG build, and that produces the executable Cuberite_debug, which I don't see mentioned anywhere. Could that be the cause?

@yangm97

This comment has been minimized.

Show comment
Hide comment
@yangm97

yangm97 Nov 6, 2016

Consider that a typo. I did not try the debug build yet.
As for the Docker bit, you just need to install docker and docker-compose, create the mentioned files and docker-compose up --build. Results should be the same on your machine.

yangm97 commented Nov 6, 2016

Consider that a typo. I did not try the debug build yet.
As for the Docker bit, you just need to install docker and docker-compose, create the mentioned files and docker-compose up --build. Results should be the same on your machine.

@yangm97

This comment has been minimized.

Show comment
Hide comment
@yangm97

yangm97 Nov 10, 2016

Just ran the DEBUG build. Output.

yangm97 commented Nov 10, 2016

Just ran the DEBUG build. Output.

@yangm97

This comment has been minimized.

Show comment
Hide comment
@yangm97

yangm97 Nov 10, 2016

Possible duplicate of #3406

yangm97 commented Nov 10, 2016

Possible duplicate of #3406

@madmaxoft

This comment has been minimized.

Show comment
Hide comment
@madmaxoft

madmaxoft Nov 10, 2016

Member

The log says "core dumped", could you possibly analyze the core a bit with GDB? The forum thread on reporting Linux crashes should help you: https://forum.cuberite.org/thread-631.html

Member

madmaxoft commented Nov 10, 2016

The log says "core dumped", could you possibly analyze the core a bit with GDB? The forum thread on reporting Linux crashes should help you: https://forum.cuberite.org/thread-631.html

@madmaxoft

This comment has been minimized.

Show comment
Hide comment
@madmaxoft

madmaxoft Nov 10, 2016

Member

Note-worthy deviations from a standard install: The server complains about missing Plugins folder, there are no plugins loaded and no prefabs loaded. Questionable whether items.ini or crafting.txt were loaded.

Member

madmaxoft commented Nov 10, 2016

Note-worthy deviations from a standard install: The server complains about missing Plugins folder, there are no plugins loaded and no prefabs loaded. Questionable whether items.ini or crafting.txt were loaded.

@Cl1608Ho

This comment has been minimized.

Show comment
Hide comment
@Cl1608Ho

Cl1608Ho Nov 11, 2016

Member

@madmaxoft missing files isn't a subject to crash the server, cuberite works with no files at all, although crafting is disabled, then.

Member

Cl1608Ho commented Nov 11, 2016

@madmaxoft missing files isn't a subject to crash the server, cuberite works with no files at all, although crafting is disabled, then.

@yangm97

This comment has been minimized.

Show comment
Hide comment
@yangm97

yangm97 Nov 14, 2016

core.9.zip

Finally got the core.

yangm97 commented Nov 14, 2016

core.9.zip

Finally got the core.

@madmaxoft

This comment has been minimized.

Show comment
Hide comment
@madmaxoft

madmaxoft Nov 16, 2016

Member

The core dump is useless without the executable that created the dump, and I'm not sure if two different Linux distros can read each other's core dumps. Please try to follow the forum post I linked earlier, and provide an analysis - in the very least the stacktrace of the crash.

Member

madmaxoft commented Nov 16, 2016

The core dump is useless without the executable that created the dump, and I'm not sure if two different Linux distros can read each other's core dumps. Please try to follow the forum post I linked earlier, and provide an analysis - in the very least the stacktrace of the crash.

@yangm97

This comment has been minimized.

Show comment
Hide comment
@yangm97

yangm97 Nov 18, 2016

Output

crash.txt

Currently logging to "crash.txt".
Logs will be appended to the log file.
Output is being logged and displayed.
Starting program: /tmp/cuberite/Server/Cuberite_debug 
warning: Error disabling address space randomization: Operation not permitted
During startup program terminated with signal SIGSEGV, Segmentation fault.
No threads.

Binary and core dump. Also, should be noted Alpine uses musl libc instead of glibc.

yangm97 commented Nov 18, 2016

Output

crash.txt

Currently logging to "crash.txt".
Logs will be appended to the log file.
Output is being logged and displayed.
Starting program: /tmp/cuberite/Server/Cuberite_debug 
warning: Error disabling address space randomization: Operation not permitted
During startup program terminated with signal SIGSEGV, Segmentation fault.
No threads.

Binary and core dump. Also, should be noted Alpine uses musl libc instead of glibc.

@Seadragon91

This comment has been minimized.

Show comment
Hide comment
@Seadragon91

Seadragon91 Nov 20, 2016

Contributor

Thanks for the binary and the core file.
I checked with gdb under alpine linux and it's the same crash from issue #3406.

Contributor

Seadragon91 commented Nov 20, 2016

Thanks for the binary and the core file.
I checked with gdb under alpine linux and it's the same crash from issue #3406.

@yangm97

This comment has been minimized.

Show comment
Hide comment
@yangm97

yangm97 Nov 20, 2016

Ok, going to close this one as it is a duplicate.

yangm97 commented Nov 20, 2016

Ok, going to close this one as it is a duplicate.

@yangm97 yangm97 closed this Nov 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment