Skip to content

Segmentation fault in ubuntu:18.04 #13

@theanurin

Description

@theanurin

Hi,

I need to build MetaHash from sources inside ubuntu:18.04.
Looks like build is completed successfully, but the MetaHash crashes after few seconds with Segmentation fault.

I would happy for any advices.
Thanks!

How to reproduce:

  1. Take my Dockerfile
  2. Execute in shell:
docker build --tag metahash . && docker run -it metahash

Actual result:

Version: 1.15.0
Revision: f4256ac8da4a0cb8f8e8844af6010e2b6d43205b
Build Date: Tue, 7 May 2019 23:13:46 +0200
Torrent addresses:
172.104.153.103:5795     57 ms
172.104.142.37:5795      58 ms
139.162.161.88:5795      58 ms
139.162.159.62:5795      59 ms
172.104.248.78:5795      59 ms
172.104.157.248:5795     60 ms
172.104.135.57:5795      64 ms
139.162.190.134:5795     65 ms
139.162.167.109:5795     69 ms
95.179.136.28:5795       72 ms
95.179.141.140:5795      72 ms
Proxy addresses:
139.162.157.232:9999     61 ms
172.104.239.101:9999     65 ms
206.189.13.140:9999      78 ms
206.189.13.155:9999      81 ms
96.126.100.131:9999      372 ms
Service runing at 0.0.0.0:9999
./run.sh: line 2:     8 Segmentation fault      /build/metahash-fullnode-client/build/src/metahash-fullnode-client --any --config /build/settings.json.main
 ~/tmp $

Expected result:
Correct work as precompiled sources

Dockerfile content

FROM ubuntu:18.04

WORKDIR /build

RUN apt update

RUN apt install -y build-essential cmake gcc-8 g++-8 git libgmp-dev libcurl4-gnutls-dev wget

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

RUN echo "Cloning repositories..." && \
	git clone https://github.com/Tencent/rapidjson.git && \
	git clone --depth=1 https://github.com/metahashorg/metahash-fullnode-client.git

RUN echo "Building rapidjson..." && \
	cd /build/rapidjson && \
	git checkout 01950eb7acec78818d68b762efc869bba2420d82 && \
	mkdir build && \
	cd build && \
	cmake .. && \
	make -j$(nproc) && \
	make install

RUN echo "Building MetaHash Fullnode Client..." && \
	cd /build/metahash-fullnode-client && \
	mkdir build && \
	cd build && \
	cmake -DCMAKE_BUILD_TYPE=Release .. && \
	make -j$(nproc)

RUN echo "Retrieve settings.json.main..." && \
	wget https://raw.githubusercontent.com/metahashorg/metahash-fullnode-client/master/pre_compiled/settings.json.main

RUN echo "Making run script..." && \
	echo "#!/bin/bash" > run.sh && \
	echo "/build/metahash-fullnode-client/build/src/metahash-fullnode-client --any --config /build/settings.json.main" >> run.sh && \
	echo "sleep 5" >> run.sh && \
	chmod +x run.sh

#ENTRYPOINT [ "/bin/bash" ]
#ENTRYPOINT ["/build/metahash-fullnode-client/build/src/metahash-fullnode-client", "--any", "--config", "/build/settings.json.main"]
ENTRYPOINT [ "./run.sh" ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions