From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30792 invoked from network); 29 Oct 2020 22:22:13 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 29 Oct 2020 22:22:13 -0000 Received: (qmail 1127 invoked by uid 550); 29 Oct 2020 22:22:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1109 invoked from network); 29 Oct 2020 22:22:06 -0000 Date: Thu, 29 Oct 2020 23:21:53 +0100 From: Szabolcs Nagy To: Milan =?utf-8?Q?P=2E_Stani=C4=87?= Cc: musl@lists.openwall.com Message-ID: <20201029222153.GB2947641@port70.net> Mail-Followup-To: Milan =?utf-8?Q?P=2E_Stani=C4=87?= , musl@lists.openwall.com References: <20201026005028.GI534@brightrain.aerifal.cx> <20201026005912.GJ534@brightrain.aerifal.cx> <20201027211735.GV534@brightrain.aerifal.cx> <20201028185608.GG534@brightrain.aerifal.cx> <20201028230610.GA3269@arya.arvanta.net> <20201029161348.GA2947641@port70.net> <20201029205541.GA13778@arya.arvanta.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201029205541.GA13778@arya.arvanta.net> Subject: Re: [musl] [PATCH v2] MT fork * Milan P. Stani=C4=87 [2020-10-29 21:55:41 +0100]: > On Thu, 2020-10-29 at 17:13, Szabolcs Nagy wrote: > > * Milan P. Stani=C4=87 [2020-10-29 00:06:10 +0100]: > > > =20 > > > Applied this patch on top of current musl master, build it on Alpine = and > > > installed. > > >=20 > > > Tested by building ruby lang. Works fine. > > > Also tested building zig lang, works fine. > > > But crystal lang builds fine, but running it hangs. strace shows: > > > ------------- > > > [pid 5573] futex(0x7efc50fba9e4, FUTEX_WAIT_PRIVATE, 2, NULL > > > [pid 5568] futex(0x7efc5118f984, FUTEX_REQUEUE_PRIVATE, 0, 1, 0x7efc= 514b67a4) =3D 1 > > > [pid 5568] futex(0x7efc514b67a4, FUTEX_WAKE_PRIVATE, 1) =3D 1 > > > [pid 5571] <... futex resumed>) =3D 0 > > > [pid 5568] futex(0x7efc511099e4, FUTEX_WAIT_PRIVATE, 2, NULL > > > [pid 5571] futex(0x7efc510409e4, FUTEX_WAIT_PRIVATE, 2, NULL > > > ------------- > > > where it hangs. > >=20 > > try to attach gdb to the process that hang and do > >=20 > > thread apply all bt > >=20 > > (make sure musl-dbg is installed) >=20 > I cannot attach gdb for running process because my Alpine development > boxes are lxc containers where CAP_SYS_PTRACE is not enabled afaik. there should be a way to config lxc to allow ptrace. > I installed musl-dbg and run program with 'gdb .build/crystal' and result= is: > ---------- > Reading symbols from .build/crystal... > (gdb) run > Starting program: /home/mps/aports/community/crystal/src/crystal-0.35.1/.= build/crystal >=20 > Program received signal SIGSEGV, Segmentation fault. hm segfault is not a hang.. libgc tries to find stack bounds by registering a segfault handler and walking stack pages until it triggers. gdb stops at signals, this one is harmless, you should just continue until you see a hang, then interrupt and bt. > 0x00007ffff401c463 in GC_find_limit_with_bound () from /usr/lib/libgc.so.1 > (gdb) bt > #0 0x00007ffff401c463 in GC_find_limit_with_bound () from /usr/lib/libgc= =2Eso.1 > #1 0x00007ffff401c522 in GC_init_linux_data_start () from /usr/lib/libgc= =2Eso.1 > #2 0x00007ffff401b2e0 in GC_init () from /usr/lib/libgc.so.1 > #3 0x00005555555668d8 in init () at > /home/mps/aports/community/crystal/src/crystal-0.35.1/src/gc/boehm.cr:127 > #4 main () at /home/mps/aports/community/crystal/src/crystal-0.35.1/src/= crystal/main.cr:35 > #5 main () at /home/mps/aports/community/crystal/src/crystal-0.35.1/src/= crystal/main.cr:114 > (gdb) > ---------- >=20 > Same with 'thread apply all bt'. >=20 > gc lib (garbage collector, https://hboehm.info/gc/) version is > gc-dev-8.0.4-r1 on Alpine. >=20 > I can't test this on native machine because currently I don't have any > x86_64 with enough resources to build crystal. On aarch64 it even can't > be built with mt-fork patch, hangs always during build. >=20 > --=20 > Regards