From nobody Tue Feb 28 14:07:51 2023 X-Original-To: ports-bugs@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 4PQzj41Tk1z3vVFY for ; Tue, 28 Feb 2023 14:07:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQzj36rCdz4Jtd for ; Tue, 28 Feb 2023 14:07:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677593272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NVOMiVjm85JFZ+xDgzZA9MnUC48j7Lh3FHSJPK/XddQ=; b=nXHDvYvU9uiXniRVUsSQEtVotKEtaMGdl1we4KWd0bjE1JdBNL7bhZggjjZH9vp5umLyS7 wBDa54UmY/wogejL7wU7E9Vyxw5qxB5+4uuYcyYnWBwCViIMZFEjwFtYWaWMpA0lhbctEs 870IwxHOLnDZ2zx6WSZNOgstQEI/w21uAHeWv2bTodQhWjjqf323gfyxTCU1fEEgm5WPCj 1+pGczk1PyJuHtx/wRUm3mGsSTM2jD6ouNrCh6Dl5KhskabG1pt6JON9vsVsMSsqpOIv9E uN01rL+qHFu72QAPchA5WifE0SceAntDxYQQSi9AKFT1goO5aDuCpk41jSzasg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677593272; a=rsa-sha256; cv=none; b=rkGjPyfhzdGRhsTe9oIVTOR1M8ELs4VS5WGo2ESDTeGQeQtttN8YA4IfpmtqTpUP7Mw2Qy LtRS2UHouOYLdLYNmekkw7uNhA0ankyXbErxOquvBsP4GzvAuVoz6HyLkCjS7pjROi9FGK 9j+yEM0RZnGHF1fphK03YpBNWpzjASbdusLBhV4sSKycfcGODLbbqb4jQ1FxezvmsfpXZt pXBnJCmfHueigwcZN9NpFOcfdn9sfqltVFcpa+C9FO3+h0UC4cUuwgroDRp3nlOFVU0Ri+ LpDB4XM0PvDbPa26MtaAVyN5NMwsTmPUjrBgqSF4JjhpNeRbd2/mEuBm/huv+w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PQzj35rQBz19Kb for ; Tue, 28 Feb 2023 14:07:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 31SE7p18072122 for ; Tue, 28 Feb 2023 14:07:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 31SE7peC072121 for ports-bugs@FreeBSD.org; Tue, 28 Feb 2023 14:07:51 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 269875] devel/libunwind: cherry-pick fix for 64-bit FreeBSD from upstream Date: Tue, 28 Feb 2023 14:07:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mizhka@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: sunpoet@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269875 Bug ID: 269875 Summary: devel/libunwind: cherry-pick fix for 64-bit FreeBSD from upstream Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: sunpoet@FreeBSD.org Reporter: mizhka@FreeBSD.org Flags: maintainer-feedback?(sunpoet@FreeBSD.org) Assignee: sunpoet@FreeBSD.org Hi, Shortly speaking, we've found out that actual version of libunwind returns broken stack for PostgreSQL processes. But fix is already in upstream (not = yet released): https://github.com/libunwind/libunwind/commit/400b3f819ad44ff4e15487b163cc3= 613389cb4c8 Details. We're trying to use libunwind to get stacktrace in case of PostgreSQL crash. Sometimes stack looks hang on wrong position like: 1 libthr.so.3 + 0x1a4b0 0x0008009ba58e 0x00007fffffffc130 _pthread_sigmask + 0x54e 2 libthr.so.3 + 0x19a00 0x0008009b9b3f 0x00007fffffffc4f0 _pthread_setschedparam + 0x82f 3 [vdso] + 0x2d0 0x7ffffffff8a3 0x00007fffffffc560 + 0xffffffff 4 libc.so.7 + 0x138570 0x00080143457a 0x00007fffffffc560 __sys_kevent + 0xa 5 libthr.so.3 + 0x19870 0x0008009b9a00 0x00007fffffffc568 _pthread_setschedparam + 0x6f0 6 0x000000000000 0x00007fffffffc570 + 0xffffffff 7 libthr.so.3 + 0x1ccc0 0x0008009bcd13 0x00007fffffffc578 _pthread_getspeci= fic + 0x1903 8 libthr.so.3 + 0x1ccc0 0x0008009bcd13 0x56415741e5894865 _pthread_getspeci= fic + 0x1903 9 libthr.so.3 + 0x1ccc0 0x0008009bcd13 0x56415741e5894865 _pthread_getspeci= fic + 0x1903 10 libthr.so.3 + 0x1ccc0 0x0008009bcd13 0x56415741e5894865 _pthread_getspec= ific + 0x1903 The problem isn't reproduced on latest commit of libunwind. Git-bisect poin= ted to commit:=20 https://github.com/libunwind/libunwind/commit/400b3f819ad44ff4e15487b163cc3= 613389cb4c8 On this commit stack looks good in all test invocations: 1 libthr.so.3 + 0x1a4b0 0x0008009ba58e 0x00007fffffffc130 _pthread_sigmask + 0x54e 2 libthr.so.3 + 0x19a00 0x0008009b9b3f 0x00007fffffffc4f0 _pthread_setschedparam + 0x82f 3 [vdso] + 0x2d0 0x7ffffffff8a3 0x00007fffffffc560 + 0xffffffff 4 libc.so.7 + 0x138570 0x00080143457a 0x00007fffffffc9b8 __sys_kevent + 0xa 5 libthr.so.3 + 0x1ccc0 0x0008009bcd13 0x00007fffffffc9c0 _pthread_getspeci= fic + 0x1903 6 postgres + 0x7acc00 0x0000007acd44 0x00007fffffffca10 WaitEventSetWait + 0x144 7 postgres + 0x7ac790 0x0000007ac8d6 0x00007fffffffcac0 WaitLatchOrSocket + 0x146 8 postgres + 0x746170 0x000000746284 0x00007fffffffcb20 pgstat_start + 0x1b4 9 postgres + 0x7460d0 0x000000746129 0x00007fffffffd350 pgstat_start + 0x59 10 postgres + 0x74f2e0 0x00000074f81b 0x00007fffffffd370 InitProcessGlobals= + 0x129b 11 libthr.so.3 + 0x1a4b0 0x0008009ba580 0x00007fffffffd7e0 _pthread_sigmask= + 0x540 12 libthr.so.3 + 0x19a00 0x0008009b9b3f 0x00007fffffffdba0 _pthread_setschedparam + 0x82f 13 [vdso] + 0x2d0 0x7ffffffff8a3 0x00007fffffffdc10 + 0xffffffff 14 libc.so.7 + 0x138730 0x00080143473a 0x00007fffffffe068 __sys_select + 0xa 15 libthr.so.3 + 0x1c9c0 0x0008009bca02 0x00007fffffffe070 _pthread_getspec= ific + 0x15f2 16 postgres + 0x7504b0 0x000000750ac4 0x00007fffffffe0b0 InitProcessGlobals= + 0x2544 17 postgres + 0x74d6a0 0x00000074e371 0x00007fffffffe610 PostmasterMain + 0= xcd1 18 postgres + 0x6ad8d0 0x0000006adbac 0x00007fffffffea70 main + 0x2dc 19 postgres + 0x4b4100 0x0000004b4100 0x00007fffffffeaa0 _start + 0x100 20 0x000800981008 0x00007fffffffeae0 + 0xffffffff It's hard to provide simple reproducible case without compiling PostgreSQL = and extensions.=20 Also worth mentioning that issue is reproduced only on 64-bit FreeBSD, neit= her on Linux distributions (Debian/Ubuntu) nor on 32-bit FreeBSD. What is best way to solve it? To cherry-pick patch to port? I'll appreciate your help. Thanks, Michael. --=20 You are receiving this mail because: You are the assignee for the bug.=