question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

segfault on Alpine Linux

See original GitHub issue
docker pull alpine
docker run -it alpine /bin/sh
apk update
apk add nodejs
npm install -g dat
mkdir test
cd test
echo "hi" > test.txt
dat share .
Segmentation fault (core dumped)

SEGFAULT!

Possible cause: Alpine linux has a smaller than usual stack size. You may find that the default stack size on Alpine processes is too small for dat and causes the crash.

This needs to be addressed by the dat process requesting a certain stack size. You could use the default in common distros such as Debian, or investigate how large a one you actually need.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
arvaticommented, Apr 14, 2019

It works on Alpne installing dat this way:

apk update
apk add nodejs nodejs-npm
apk add python make g++ libtool autoconf automake gettext
apk add m4 libsodium libsodium-dev

apk del iptables

npm install -g dat --unsafe-perm --build-from-source

Package sodium-native will be compiled during dat install and will take a lot of time to finish. There is a problem with utp-native that normally prebuilt binary is libc based, and thus doesn’t work on Alpine Linux which uses MUSL, thats why you have to give option --build-from-source.

0reactions
okdistributecommented, Mar 27, 2020

This should no longer be an issue on dat 14.0.2, can you test?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segfault on Alpine Linux 3.13 / musl 1.2.2 with prebuilt binaries
On the alpine:3.13 Docker image, install Sharp and attempt to load an image and run .metadata() on it. Node exits with a segmentation...
Read more >
Mysterious Segmentation fault that only happen in 3.14+ alpine
Hi, I have run into segmentation fault which doesn't appear to occur on ubuntu/mac, can only be repro-ed in alpine distro.
Read more >
Segmentation fault when trying to run Haxe on Alpine Linux ...
I'm new to Docker and I'm not a regular Linux user, but after some trial and error I've got Neko and Haxelib running...
Read more >
Docker alpine:3 Segmentation Fault - help - Rust Users Forum
Hi, I have strange problem. I've started write simple app. It runs on debian every time, also in docker containter with debian, ...
Read more >
Segmentation Fault in alpine docker image - Tor's Gitlab
Segmentation Fault in alpine docker image ... When running arti in the resulting container the program segfaults without any noticeable errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found