Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2022 21:45:57 -0700
From:      Alex Arslan <ararslan@comcast.net>
To:        Dmitry Chagin <dchagin@heemeyer.club>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Hang in futex wait with a Node.js binary in Linuxulator
Message-ID:  <DB369AAA-AB5A-4540-992F-3BFBCE10A4A4@comcast.net>
In-Reply-To: <YvyYqVQghwbj4CeU@heemeyer.club>
References:  <16777BDC-22D3-4ACC-95E8-95933D587341@comcast.net> <YvyYqVQghwbj4CeU@heemeyer.club>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Dmitry, thanks for the help! Regarding the version, I've observed the =
hang on FreeBSD 12.2, 12.3, and 13.0. When looking at the kdump output, =
I see

linux_sys_futex(0x8427eeb70,0x80,0x2,0,0,0)

as the last output before the SIGINT I sent to stop the hang. If I =
understand correctly, this is the same as what I posted before=E2=80=94a =
futex waiting for the value 2 to be written to a process-private =
address=E2=80=94which would mean that the address the wake-up missed was =
0x8427eeb70, the first argument to the call. Is that right? There is no =
wake-up sent though. I looked for that address in the full kdump output =
and didn't find it, and I'm not sure what else to be looking for. =
Apologies if I'm missing something obvious here, I'm quite new to this =
kind of debugging.

> On Aug 17, 2022, at 12:28 AM, Dmitry Chagin <dchagin@heemeyer.club> =
wrote:
>=20
> On Mon, Aug 15, 2022 at 09:43:29PM -0700, Alex Arslan wrote:
>> Hi folks,
>>=20
>> I'm trying to run the Linux binary for Codecov's official coverage =
uploader (https://docs.codecov.com/docs/codecov-uploader =
<ihttps://docs.codecov.com/docs/codecov-uploader>) on FreeBSD via =
Linuxulator. It's a statically compiled Node.js application built with =
the Node.js package called pkg. The application's own verbose logging =
shows that it completes, but the process just hangs indefinitely, using =
0 CPU and not letting go of its memory. With devel/linux-c7-strace, it =
appears it's getting stuck on:
>>=20
>> futex(0x8427f1b70, FUTEX_WAIT_PRIVATE, 2, NULL
>>=20
>> Too stuck to even finish printing the argument list or closing =
parenthesis, apparently! A Cirrus CI build log where I set the process =
to terminate via timeout is available at =
https://cirrus-ci.com/task/6610515924353024 =
<https://cirrus-ci.com/task/6610515924353024>; but it's actually =
reproducible for me locally with just
>>=20
>> curl -O https://uploader.codecov.io/latest/linux/codecov
>> chmod +x codecov
>> ./codecov -h
>>=20
>> Does anyone have any advice for how to debug this further?
>>=20
>=20
> hi, mostly by ktrace -di/kdump -HAR and see which uaddr wake-up =
missed,
> which freebsd version you are used?
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DB369AAA-AB5A-4540-992F-3BFBCE10A4A4>