mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Christof Marti <chrmarti@microsoft.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Loading of Node.js native module segfaults in Alpine 3.10 (works in 3.9)
Date: Fri, 6 Sep 2019 13:10:45 +0000	[thread overview]
Message-ID: <A28A49CD-FE0B-48FD-95C8-E0CFB5B89931@contoso.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

Hi everyone,

We have a Node.js native module that fails to load on Alpine 3.10 (musl-1.1.22-r3). It loads fine on Alpine 3.9 (musl-1.1.20-r4) and other (Debian / CentOS base) Linux distros. I also specifically tested with alpine:3.10 and debian:8 Docker images and Node.js 10.16.3 to rule out differences between Node.js versions and the Debian image does not show the problem.

The Dockerfile to reproduce is:

FROM alpine:3.10
RUN apk add g++ python make npm
RUN npm i spdlog
CMD /bin/sh -c "node -p 'require(\"spdlog\")'"

This is with the latest Docker for Windows and on Linux. At least one Docker for Mac does not reproduce it, not sure what the difference is with that.

I have built the Dockerfile for convenience: `docker run chrmarti/alpine-spdlog-segfault`

The source of the spdlog node module is at: https://github.com/Microsoft/node-spdlog

Removing line-by-line from the source suggests that as soon as the wrapped library (spdlog itself) is linked in the loading in Node.js fails. Loading the wrapped library in an executable outside of Node.js did work.

I have filed an issue for Alpine, but it was suggested that I should follow-up upstream: https://gitlab.alpinelinux.org/alpine/aports/issues/10767

We couldn't establish the source of the problem with certainty. Any help on tracking this down further is appreciated.

Thanks,

Christof


[-- Attachment #2: Type: text/html, Size: 5114 bytes --]

             reply	other threads:[~2019-09-06 13:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 13:10 Christof Marti [this message]
2019-09-06 13:23 ` Rich Felker
2019-09-06 14:44   ` Szabolcs Nagy
2019-09-06 16:06 ` A. Wilcox
2019-09-10  9:49   ` Christof Marti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A28A49CD-FE0B-48FD-95C8-E0CFB5B89931@contoso.com \
    --to=chrmarti@microsoft.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).