From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12605 Path: news.gmane.org!.POSTED!not-for-mail From: Ryan Wilson-Perkin Newsgroups: gmane.linux.lib.musl.general Subject: Musl incompatibility with Docker and AWS's C5 class Date: Thu, 15 Mar 2018 09:37:28 -0400 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c4658caba410567739735" X-Trace: blaine.gmane.org 1521123825 30527 195.159.176.226 (15 Mar 2018 14:23:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Mar 2018 14:23:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12619-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 15 15:23:41 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1ewTn9-0007rX-M8 for gllmg-musl@m.gmane.org; Thu, 15 Mar 2018 15:23:39 +0100 Original-Received: (qmail 9480 invoked by uid 550); 15 Mar 2018 14:25:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 27786 invoked from network); 15 Mar 2018 13:37:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waveapps-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=P3Hz1dOJ9cyp9FbRAzb91ti7upYxnr+Ip4Ye5bjkDns=; b=HwGg3sqi7kyej+z22Jv7THluFpKNvOQ1II2Kq3XssYuH56i07n+mWH2T9d4+lcUwfT KcqeJJnWz82fegQ8PBdpSpwz8QSsFcWs45yLKFYnCfFGJKs+0hSFUSB2uXPicF11pzyu n6iJ5ozNN6z5QpuefdKZK8auxcEKm3wwWx5190o4LsREarV8NdaPVU6KHr2VaAmKvrjN 49MPVhpR/4fQgY0slXOpxX2ZK218ahEpQ76bvgN+aAbwwwtEa+5HTD+uburiF4e3OVd5 EudRlNOyBK09JwRho2GBv+cE4BrTx6/b95qXCsMh93RxzTQVVTIKaNrbaBzMr13AyrJh A+/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=P3Hz1dOJ9cyp9FbRAzb91ti7upYxnr+Ip4Ye5bjkDns=; b=e2oMNyvU5yhFj0BI2idwGi2nXa8B+mx3PIfs2+xqIq1IVMl+pC8RejyJgecFzPQIHr xfJdBOmDFKIyC9uhjaZsn6iF1Y+G+5f54/lhgHmE02N80WckbMBZSUoJA5ww9BAaghNH z2rlmDw7zATZUmirG+KM9HPVxmOUvHEhSS9JrGqrNdGRQ+uFToKRVXSkOXavNdkUXD0g xA4Tk5szD4BfHCUuwitd1Bv0x4jipubVdQVXLvnhRDIDDSjmjDpQNCgqJcHiJpfGrG7m SO2sIJXdD0IF81/6sJ/yX11kzrb+wQqN49HqPrSFjDez14Tg5saoBpPOrp9nxtFmk5/b 6pcQ== X-Gm-Message-State: AElRT7FuL4mCFc06JT+bCSV6V3iX+8pBZ3QwNUl1z7vWN6lTG40XWaOR vD1Hd3sgUqajAf8Wq6rXAzMndFpsim8x/3OXR2PwbfPejkU= X-Google-Smtp-Source: AG47ELt2NTZSN8IczSv42jyVxJNfRqATCyg1XSOBScCUosoy6NQGMV2NaGy0fab8nc92Me7diMkMvE5Yh2PKrvjox2A= X-Received: by 10.80.135.139 with SMTP id a11mr2697040eda.82.1521121049092; Thu, 15 Mar 2018 06:37:29 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:12605 Archived-At: --f403045c4658caba410567739735 Content-Type: text/plain; charset="UTF-8" Hey musl-devs, Yesterday we tested out the new C5 instance class that AWS offers using our Alpine-based images and discovered that we would get a segfault whenever we ran `npm install`. Tracing the code, it appeared to be happening due to the use of node's "process.setuid" and "process.setgid" commands, either of which would cause a segfault. We're running Alpine containers inside Docker on EC2, and the smallest thing I can provide to reproduce this issue would be to run the following on a C5 EC2 instance: docker run -it node:9-alpine sh -c "node -e 'process.setgid(0)'" A core dump provided the following limited information: Program terminated with signal SIGSEGV, Segmentation fault. warning: Unexpected size of section `.reg-xstate/26' in core file. #0 __cp_end () at src/thread/x86_64/syscall_cp.s:29 29 src/thread/x86_64/syscall_cp.s: No such file or directory. [Current thread is 1 (LWP 26)] (gdb) bt #0 __cp_end () at src/thread/x86_64/syscall_cp.s:29 #1 0x00007fd6161eecd8 in __syscall_cp_c (nr=202, u=, v=, w=, x=, y=, z=0) at src/thread/pthread_cancel.c:35 #2 0x00007fd6161ee2f5 in __timedwait_cp (addr=addr@entry=0x5612e9ebf820, val=val@entry=-1, clk=clk@entry=0, at=at@entry=0x0, priv=) at src/thread/__timedwait.c:31 #3 0x00007fd6161f0e2c in sem_timedwait (sem=0x5612e9ebf820, at=0x0) at src/thread/sem_timedwait.c:23 #4 0x00007fd615d7a5a4 in uv_sem_wait () from /usr/lib/libuv.so.1 #5 0x00005612e94dc00c in node::DebugSignalThreadMain(void*) () #6 0x00007fd6161ef665 in start (p=0x7fd616424ab0) at src/thread/pthread_create.c:145 #7 0x00007fd6161f13e4 in __clone () at src/thread/x86_64/clone.s:21 Backtrace stopped: frame did not save the PC *RYAN **WILSON-PERKIN* | Software Engineer Join our community on Facebook , LinkedIn , or Twitter This message and any attachments are intended only for the use of the addressee and should be considered confidential. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error or would like to stop receiving these emails, please notify the sender by replying to this email. Wave is located at 235 Carlaw Ave., Ste. 501, Toronto ON, M4M 2S1. --f403045c4658caba410567739735 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey musl-devs,

Yesterday we tested out = the new C5 instance class that AWS offers using our Alpine-based images and= discovered that we would get a segfault whenever we ran `npm install`. Tra= cing the code, it appeared to be happening due to the use of node's &qu= ot;process.setuid" and "process.setgid" commands, either of = which would cause a segfault.

We're running Al= pine containers inside Docker on EC2, and the smallest thing I can provide = to reproduce this issue would be to run the following on a C5 EC2 instance:=

docker run -it node:9-alpine sh= -c "node -e 'process.setgid(0)'"
A core dump provided the following limited information:
<= div>

= =
Program = terminated with signal SIGSEGV, Segmentation fault.
warning: Unexpected size of section `.reg-xstate/26' in= core file.
#0 __cp_end () at src/thread/x86_64/syscall_cp= .s:29
29 src/thread/x86_64/syscall_cp.s: No such file or dir= ectory.
[Current thread is 1 (LWP 26)]
(gdb) = bt
#0 __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1 0x00007fd6161eecd8 in __syscall_cp_c (nr=3D202, u=3D<op= timized out>, v=3D<optimized out>, w=3D<optimized out>, x=3D= <optimized out>, y=3D<optimized out>,
z=3D= 0) at src/thread/pthread_cancel.c:35
#2 0x00007fd6161ee2= f5 in __timedwait_cp (addr=3Daddr@entry=3D0x5612e9ebf820, val=3Dval@entry= =3D-1, clk=3Dclk@entry=3D0, at=3Dat@entry=3D0x0,
= priv= =3D<optimized out>) at src/thread/__timedwait.c:31
#= 3 0x00007fd6161f0e2c in sem_timedwait (sem=3D0x5612e9ebf820, at=3D0x0) at = src/thread/sem_timedwait.c:23
#4 0x00007fd615d7a5a4 in uv= _sem_wait () from /usr/lib/libuv.so.1
#5 0x00005612e94dc0= 0c in node::DebugSignalThreadMain(void*) ()
#6 0x00007fd6= 161ef665 in start (p=3D0x7fd616424ab0) at src/thread/pthread_create.c:145
#7 0x00007fd6161f13e4 in __clone () at src/thread/x86_64/c= lone.s:21
Backtrace stopped: frame did not save the PC

<= div style=3D"font-size:12.8px;background-color:rgb(255,255,255)">
= RYAN WILSON-= PERKIN=C2=A0|=C2=A0Software Engineer


Join our community on=C2=A0Facebook,=C2=A0= LinkedIn,=C2=A0or=C2=A0= Twitter

This message and any attachments are intend= ed only for the use of the addressee and should be considered confidential.= If you are not an intended recipient, you may not review, copy or distribu= te this message. If you have received this communication in error or would = like to stop receiving these emails, please notify the sender by replying t= o this email. Wave is located at 235 Carlaw Ave., Ste. 501, Toronto ON, M4M= 2S1.=C2=A0
--f403045c4658caba410567739735--