From nobody Thu Aug 18 04:45:57 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M7XQt38QQz4ZKFR for ; Thu, 18 Aug 2022 04:46:30 +0000 (UTC) (envelope-from ararslan@comcast.net) Received: from resqmta-h1p-028589.sys.comcast.net (resqmta-h1p-028589.sys.comcast.net [IPv6:2001:558:fd02:2446::6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4M7XQs0Y5rz40ym for ; Thu, 18 Aug 2022 04:46:28 +0000 (UTC) (envelope-from ararslan@comcast.net) Received: from resomta-h1p-027908.sys.comcast.net ([96.102.179.197]) by resqmta-h1p-028589.sys.comcast.net with ESMTP id OX54oaD3VXQ9eOXQDo9mEa; Thu, 18 Aug 2022 04:46:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1660797981; bh=AklBm0mF2VtIqPw7YTU3dOO0OOiDw98rVyFdbBChH5I=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=3tApV8BZ0X1cqxk4g8iF5XdokWYCWeoQqJibua75oeEaywwmfgcaOw/gmInfDp0rN oRHnarAFGbmrSWFf1lSlYMr8Z0P5avho5g6cqVzRZxxbD/tp/QpFXCKgzqIwVisuUN Uf1sBQlD9ZPjZyRJi2jjmxIUw6KSSuQ7fQit0U76Z0CevQwxG0KDx7Ua28R0KHxWUx 4yhCm/vAuXh3aIsoHMjDC2fccG3PlOaHQsA2C+W/7Zxi0nx+trYKzfisgOQAFhu+FI pBsIOrS0Et2jlJFTLmyMlmCIo4MqlCIvLqfsWuiFyYpvXH0JMMLrroB4VCgvswTfAf eQwi/1cTGk50A== Received: from smtpclient.apple ([71.231.182.61]) by resomta-h1p-027908.sys.comcast.net with ESMTPA id OXPpovrF5yhzHOXPqo1s7w; Thu, 18 Aug 2022 04:46:00 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehjedgkeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpeetlhgvgicutehrshhlrghnuceorghrrghrshhlrghnsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeejtdektedtgefhgeefhedvieehjeelgedvveefvedvudekkeffheegtdehkeefgfenucffohhmrghinheptghouggvtghovhdrtghomhdptghirhhruhhsqdgtihdrtghomhdptghouggvtghovhdrihhonecukfhppeejuddrvdefuddrudekvddriedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepshhmthhptghlihgvnhhtrdgrphhplhgvpdhinhgvthepjedurddvfedurddukedvrdeiuddpmhgrihhlfhhrohhmpegrrhgrrhhslhgrnhestghomhgtrghsthdrnhgvthdpnhgspghrtghpthhtohepvddprhgtphhtthhopegutghhrghgihhnsehhvggvmhgvhigvrhdrtghluhgspdhrtghpthhtohepfhhrvggvsghsugdqhhgrtghkvghrshesfhhrvggvsghsugdrohhrgh X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=utf-8 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Hang in futex wait with a Node.js binary in Linuxulator From: Alex Arslan In-Reply-To: Date: Wed, 17 Aug 2022 21:45:57 -0700 Cc: "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <16777BDC-22D3-4ACC-95E8-95933D587341@comcast.net> To: Dmitry Chagin X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4M7XQs0Y5rz40ym X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=comcast.net header.s=20190202a header.b=3tApV8BZ; dmarc=pass (policy=none) header.from=comcast.net; spf=pass (mx1.freebsd.org: domain of ararslan@comcast.net designates 2001:558:fd02:2446::6 as permitted sender) smtp.mailfrom=ararslan@comcast.net X-Spamd-Result: default: False [-0.41 / 15.00]; HFILTER_HELO_5(3.00)[resqmta-h1p-028589.sys.comcast.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; NEURAL_HAM_MEDIUM(-0.92)[-0.924]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[comcast.net,none]; R_DKIM_ALLOW(-0.20)[comcast.net:s=20190202a]; R_SPF_ALLOW(-0.20)[+ip6:2001:558:fd02:2446::/64]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[comcast.net:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEMAIL_FROM(0.00)[comcast.net]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[comcast.net]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[comcast.net:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N 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 = 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 = ) 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 = 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