From nobody Tue Apr 23 13:48:23 2024 X-Original-To: threads@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 4VP3Nm0FyVz5HHTr for ; Tue, 23 Apr 2024 13:48:24 +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 4VP3Nl5QYQz4mSN for ; Tue, 23 Apr 2024 13:48:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713880103; a=rsa-sha256; cv=none; b=Vtwq8MPW8UJqaapoW1DM36wvmUCJf4jhpYQ0UvhcC+C20O7lRKc5WBwEJ0331s3YUHYKMa avaGaxC+7DGJJ4pxUSoFvtJzO6gKGN4QqHLN3wG2h2tH5ah6PZaE7TBDZY0LdAKTgEMP6R D8jPCyWDNpChUaKpcINdOxNKBkQfaPDrlw3aiEBBny4qwwFIZkfAC6WtJYqgSeJvLJBok0 1Iz8mSJcBLQvFuoZnRJbfV8HhPIe3dOto8D+kJsRFwKjAiyZCe1IUGPleC1oTJ/eyTI5s3 j1qN9JjY+4KNcmq3Sk8N8CVM0y7sdmx9+PU/FZFlgdN4CSlma4CCOP5CdxIPkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713880103; 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=6hxK8qQggXJJdbUDD9S5LBrckaI4w//Tm9LWOhBmqI4=; b=HafHRxgdwhvBDITDTDUMYlZLy7cfvejP8eWGh5be3VKsPQnQQ/OBtAsPKOWUoCVrV4Ml7T 1C8ngX8VDfM8sJgbTG6L/JfvVswo6dVvpUdf3RNW0UviTI949zkZKu7XsSKGv35hZRwxQU BQSQo5XNYXkd4A/D5mmu7uVweXyFYheDYPHqRvcyjt1AQjGY+dkPwrNMt2cmJToHHT/y5/ S1ZF4Q4XyBZC9XXdY1u+lmCKLtIW+Rj3GtngPFIdVbO1V6gNsIYvdbL0oZYudidQXWD1xR PGUAeNjhbR3KxX/liJyDrAMM5TvgFY1UPm0qQa+V25VVYQhCYsXmXUlS1mfFvg== 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 4VP3Nl4rRZzYqj for ; Tue, 23 Apr 2024 13:48:23 +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 43NDmNlu087147 for ; Tue, 23 Apr 2024 13:48:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43NDmNqD087146 for threads@FreeBSD.org; Tue, 23 Apr 2024 13:48:23 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join kills the process with a return code of 134 Date: Tue, 23 Apr 2024 13:48:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mohammedgoder@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 Bug ID: 278551 Summary: pthread_join kills the process with a return code of 134 Product: Base System Version: 14.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: threads Assignee: threads@FreeBSD.org Reporter: mohammedgoder@gmail.com Created attachment 250181 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250181&action= =3Dedit Console Output Code: void* kernel(void* par) { printf("kernel\n"); return NULL; } int main(int argc, const char* const* args){ pthread_t thread; pthread_create( &thread, NULL, kernel, NULL ); pthread_join(thread, NULL); printf("FreeBSD RELEASE 14.0 doesn't reach here.\n"); return 0; } Console Output: kernel The code above demonstrates that the call to pthread_join() with valid parameters terminates the program with a return code of 134. I have not tested this issue on bare metal so I don't know if my assigned severity level is valid. I'm using FreeBSD RELEASE 14.0 running on Proxmox with an 8 Core x86_64 Int= el XEON chip. My libraries work fine on Windows, MacOS, Linux, and OpenBSD. pthread_join(= ) is the only thing causing problems on FreeBSD thus far. Everything else seems = to be functional. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Tue Apr 23 13:53:54 2024 X-Original-To: threads@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 4VP3W63cfTz5HJF8 for ; Tue, 23 Apr 2024 13:53:54 +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 4VP3W61HxTz4pHm for ; Tue, 23 Apr 2024 13:53:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713880434; a=rsa-sha256; cv=none; b=BPgMPDhAe0F89Yr0cL7M1BEvG222mC6CUT7f1+7B0NN0n/rzUMj5HtFLmP7oMAtnUejWU9 8s2RVBY2bFOygre3b7ybTpZznKLilStoOOcKKy5VZLBt3LMAbDmIEcEMGaZQzdvYVnbnfi EsXT6a05O3+oJ97RlBwALhC+nicLpxF85B7v81z1JVcW/TM5K0v1x0TX9wUYkgcErEMJ01 PcHxZKW9V3rTrwQ4AcuXLROILIJo1sWH3e1MV2lryPN4vOm1ECKf+igSLzoUfwl9j010tw 58CUpRrI86B2KzCsYk3s2yn6O6ht0a+jd00PfrE2ArBdgS08G92vhSwMp/4f+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713880434; 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: in-reply-to:in-reply-to:references:references; bh=3l6wB3QvsqAA/WFuOGQOWP/L5FjhaYAAKfZQEgxtiJ4=; b=duPzInMlqzuXz6IrdQoZCvm3XyOUy8m8BzXkg/EM8A73WOl1ghuqljw46hHGSC69AqO4aD wQ1qyv+LTjGKKAlLHYzKwqirt0gRMO4tvUVjHanIhgs/e0h6Z/BZDJSAn6/fQxO34Hurzs 9FkRssdYM27I1hQQL9tmo9wOjeq/YDEzJh3pGS/V/zN0MH30uXWSY65hJq3eW1xBAUBz5s hPIlQ0Y1iqmwdcaF3JfvqHXRXddPKglivDS6OqjmyeZS3TNQkTAPSogvWwbAQmAohJd2ds tGvRPwq2Vs7XHC16jyVboM7WkxDBTykLGQ+F0/++t3UO7xf8sbY06O9JDHMvgg== 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 4VP3W60vvDzZXJ for ; Tue, 23 Apr 2024 13:53:54 +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 43NDrsZM024023 for ; Tue, 23 Apr 2024 13:53:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43NDrsCl024017 for threads@FreeBSD.org; Tue, 23 Apr 2024 13:53:54 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join() kills the process with a return code of 134 Date: Tue, 23 Apr 2024 13:53:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mohammedgoder@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc Message-ID: In-Reply-To: References: 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 Mohammed Goder changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|pthread_join kills the |pthread_join() kills the |process with a return code |process with a return code |of 134 |of 134 --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Tue Apr 23 14:25:01 2024 X-Original-To: threads@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 4VP4C137vzz5HLvQ for ; Tue, 23 Apr 2024 14:25:01 +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 4VP4C06ynNz4rl3 for ; Tue, 23 Apr 2024 14:25:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713882301; a=rsa-sha256; cv=none; b=cImbRzRA9Wps7mdv5R9kmYaYO4wxJQDMxrUp2pMJ/JQ/6keLmKEtsuzgKfoY7W58mmkK8J dbwZ4n/uXDUbNr/TBBbbrHgeN21e6Nc87mcQAiYfGvvz01vstU3KBw8gd/NPrAzQxHgKYT cVyeJbxMMuMj0CsR1NJpMi2YfPY/WdFAeBHbPOhMuuBaskwmQSUUJThl6EzDNe8X6hmA6/ /TtnlLFUzDXqhgBA7wntPHFroqbhl0+T2Bl3Ba6dv2Kh/iLv6Tz7iqSq8LbbEwAX6blpbr vgAtJzgnjEy7AODU9bNY0Pjb6TF+cLxv778Xhe8Pdbm4sjS4XLBc/meSUhAqQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713882301; 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: in-reply-to:in-reply-to:references:references; bh=wcdeD8WflTocD5DIDmABwfmG0Ar4IY2oB9+ENL+GJvg=; b=uggVNMxiTCmK/iBecqakV5alP6YPbCusS+YukIE729ZkfQ8LOW6ryMsKse8DKuPX5UGPnN gO608qDdR+qr1wrDQV4nSo12+1HGeVLNHQQhcBxx7ObQp8IsLEDlkHE6wT/xlJszMt3Tay oG9j0ek0oWtbAsxybjqDKgewJgllpU1Y7+nee8XQwbQfM2RXCoEqFwdAatOoCu6HtTb9JL 1gKfowoNkrRwyek4b94sPV9CW908OLxPsZm2pl1De3Ejs2qr5k0n7GbPAt4wHHE/3cLrhc CrMbkmWapl/0srGyahbBy5giNFTe9LCWWz/i1qXMeLwMB5RSwe64AozAEyzMiw== 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 4VP4C06V1Kzbds for ; Tue, 23 Apr 2024 14:25:00 +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 43NEP0fb008635 for ; Tue, 23 Apr 2024 14:25:00 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43NEP0uV008634 for threads@FreeBSD.org; Tue, 23 Apr 2024 14:25:00 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join() kills the process with a return code of 134 Date: Tue, 23 Apr 2024 14:25:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mohammedgoder@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 --- Comment #1 from Mohammed Goder --- I forgot to mention that I've tested this with both GCC (g++) and Clang (clang++). --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Tue Apr 23 16:05:30 2024 X-Original-To: threads@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 4VP6R02NPLz5HXGs for ; Tue, 23 Apr 2024 16:05:32 +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 4VP6Qz1G73z44fr for ; Tue, 23 Apr 2024 16:05:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713888331; a=rsa-sha256; cv=none; b=kqcoEC0mbro/55tsBAI0WEz6BmBOl/7Xgt0JnOcCve4VjLSB8q221hLY/7Yko5ubPW4hhY YZjxFOZKO2uT81G6WKv9bRPiFm1r+TUUIhswIElMo8/M9VO+YLpwe12pBR0v4+SmId86aC yPJjRfPurBpZwN/b37k0sdfjdnSR6TzYLgb38uWKd/2hJFBmMwS482RhTfM4VegstK/dG7 jnmvkFnl7lR7d6mro9699+YvxGK7jmgwfU4tVp/OmB3UAOFe7IhHAf2t95B1L9lLXULf/Q 6iJ44kNlaxg2P3QvKADpR5mjIiHz5gK7+qjcsawZzNEElfzJYfBvluM/HUPgYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713888331; 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: in-reply-to:in-reply-to:references:references; bh=i0pjm4NoBNJtqKSFQ/4xzj73FGZE9E5B1G23doriMwc=; b=GNQotFKukQnnOIe8VX4n0paWdBcxFxroDk8o4C/jrjy9eo7i7KPNay2LsI/tYUc//BtW0R rUSWoQ9y2A8+P+wHTxtHyYjMZHwudOe85r51SnLXtVDEMPTThXZ7ugEksMIjdkeABdohVh OwYhvkMpKlqKJYN94Mn8qAdHKKcQd1TiBONQFJhrnllXpzbPQMDolZOU59UxFjmYi2Fuzl m058843mdaNuVj2peLAb4V9o/Tr/nZAUuVCu4ZjvOUNATvXsiALDUrthWLkHYgfak4AipL t0P3u7JNFRhI0GDhPNsxuMkFyaMUl8heLbBsDTojHQQ4swQplAzp+C/1wCFg5Q== 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 4VP6Qz0ll5zf8H for ; Tue, 23 Apr 2024 16:05:31 +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 43NG5VdW006688 for ; Tue, 23 Apr 2024 16:05:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43NG5VZa006683 for threads@FreeBSD.org; Tue, 23 Apr 2024 16:05:31 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join() kills the process with a return code of 134 Date: Tue, 23 Apr 2024 16:05:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #2 from Konstantin Belousov --- This is not a valid complete code, at least it lacks required includes. After adding it, the fragment works fine for me. You need to provide complete reproduction, including full source and the exact build recipe. pthread_join() is too fundamental to be broken in this trivial way, it would cause almost all threading programs to fail. BTW, code 134 is SIGNALLED SIGABRT exit. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Tue Apr 23 19:05:16 2024 X-Original-To: threads@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 4VPBQN4qXcz5HsJX for ; Tue, 23 Apr 2024 19:05:16 +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 4VPBQN3mBhz4c05 for ; Tue, 23 Apr 2024 19:05:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713899116; a=rsa-sha256; cv=none; b=e/uGxzYglXYV99fMW/JE5ay7WVFUzwDnplUFom9w7/uT8zynm25PGI6I8Gup5DBI9eRK69 0/oK4XFbK3Lgkgh0qcLFUdtcJEP1tszRYfA4n79lsnUHtHALgL2c3Xd4g+Xz16zQZXqQ+M AiQksl7bgi5AcJSV2zrGLW/tanvXTk/hOrV2ubqvj8TAyS4ynxiq5mO/IFmdaUtKyOddbE MX++cGn2NsiLCuP20i4FOU4PMkSEzTdOOQDpuTFW9qCSPnCLQHfM0Hgx8pd3kYTlG4JJcD CEXUCp8LmB3Jz1iAKpm2uiXHJ6IQ2nzs3G9ZuyJzsL8Dv3Hi6fm0D9EHve3qpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713899116; 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: in-reply-to:in-reply-to:references:references; bh=CjSvQZE6Ja9icz1BfBSqBsVbaJCwSmtP2zn72b8J8zU=; b=rraMXh3Qqm6AAwRY+5DyB088O0IRmm/3nW2tzyFVNsBQgK/zhQMU8RIZcYg7XsY7/cB4fU KhXXL/ZhU7heqPHXBLhliJng5C9CESBF/8W1fdUQYohq4YU0fhK+Mc09VUSSwZuDkPN84n 5YGgDw9ytUlXkuObCQeR+TKQ6BrPNloO7DfZg37lznblo29tshWv4bF8P+fq+/OKnpq0M0 p+36GSFRfGgT2fc5/+dm5vzvyz7kNPovqExUvbPie1a81/k1UA5IWHPVTWqJ4HACt/0V3K mraLMpeoAGVsJkes7HY5at9lCDVjdT3Am6XlrqutFA8mVR4y4p1WJi4KQl8J0g== 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 4VPBQN3Jzzzjvl for ; Tue, 23 Apr 2024 19:05:16 +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 43NJ5GIY033489 for ; Tue, 23 Apr 2024 19:05:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43NJ5GuF033488 for threads@FreeBSD.org; Tue, 23 Apr 2024 19:05:16 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join() kills the process with a return code of 134 Date: Tue, 23 Apr 2024 19:05:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mohammedgoder@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 --- Comment #3 from Mohammed Goder --- (In reply to Konstantin Belousov from comment #2) I apologize; this is the first time I've ever filed a bug report to a proje= ct. I'm aware of the return code message. I'm 100 percent sure that this has to= do with the FreeBSD or it's compiler toolchain/libraries. main.cpp: #include "iostream" // iostream's static library has issues on freebsd. #include "cstdio" #include "pthread.h" #include "pthread_np.h" void* kernel(void* par) { printf("kernel\n"); return NULL; } int main(int argc, const char* const* args){ pthread_t thread; pthread_create( &thread, NULL, kernel, NULL ); pthread_join(thread, NULL); printf("FreeBSD RELEASE 14.0 doesn't reach here.\n"); return 0; } build.sh: #!/bin/sh g++ -std=3Dc++20 -static-libgcc -static-libstdc++ -static -pthread -O3 "mai= n.cpp" -o "main_g++" clang++ -std=3Dc++20 -static-libgcc -static-libstdc++ -static -pthread -O3 "main.cpp" -o "main_clang++" Problem: I've narrowed the issue down to "iostream" and it's static libraries causing problems. The issue goes away if you remove the flags to statically link libraries or remove the "iostream" header from the list of includes. Also, please keep in mind that this is all still being done in a virtual machine = so I don't know if the issue persists on bare metal. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Wed Apr 24 15:52:37 2024 X-Original-To: threads@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 4VPk5d6prSz5HrYR for ; Wed, 24 Apr 2024 15:52:37 +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 4VPk5d4gwHz4j59 for ; Wed, 24 Apr 2024 15:52:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713973957; a=rsa-sha256; cv=none; b=GOYLB/E8iZcA2mDKkbZyzwttsrMn/Lsd5aqtUuisZuiWJ0LlomWNjM9d5fpO7s0FJ1pjzk XbA+SX3hOirsYLvilt5XUJeWT9lR++DMis2bc6FhCk4QNsiCAdCCTCNVIzgnhFBy+k7wSh eAtMbovqcyb9kdoZV9YWVokmjfzs3ZWFePq4iNvI1xwOHDA1eaKOLs4N1OM3fCCkKdeAMj t5CW/OYQwLF+g0LIZk0IPAHYnchVSJSnKcMkXUWCevZFOm1H3FUWpuLJ1efDEuqfoU++gB yh6Np49pd13DWgw2vDLHI4T0P6025dO5yj5uAnJkFU07rKAj2JTbOcN/HGLFBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713973957; 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: in-reply-to:in-reply-to:references:references; bh=0y0EXv0YrbvR9hUZYGndrm7iNAS6qVFZK2QZBthG4jU=; b=LxtwRdwj7/0nsnSHqoFybwVIBEGLtpI1RNRQRWQzkrBvDCclPmVBTZCZ4rv87VqrLsc5rO cbaBYlecKlU4eE9ajB9YCJ+V6wH0oQUFGEyqpRw3XZR6bGhB3JkncbMpJBAFF3xG8JjpNh xDbzjDZQPqr8vLdd6kPP2oZuvFLDsMQ3CLlX+s/MJm3mb1EiL13Bm0Da1YR/YB5hyXe3xN EG4yw3jTH8kp/xgK4sm1ZH+xPVazBnJd/tfLUHYR5Pf6u73fRc2Ga1ORHpzBWPrXyq15x8 txor3gNkfgRS3WFwdO3x2crdJZX+WntxswQSf6rHc7KS/nbK8WtG6kHaOWufNA== 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 4VPk5d4HhpzMDS for ; Wed, 24 Apr 2024 15:52:37 +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 43OFqb2l022368 for ; Wed, 24 Apr 2024 15:52:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43OFqbeh022365 for threads@FreeBSD.org; Wed, 24 Apr 2024 15:52:37 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join() kills the process with a return code of 134 Date: Wed, 24 Apr 2024 15:52:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dim@FreeBSD.org --- Comment #4 from Konstantin Belousov --- So this issue only happens for the static binary built with gcc. The thing that fails is the gcc unwinder: #0 0x00000000004d4dca in thr_kill () #1 0x00000000004c226f in raise () #2 0x00000000004df6f9 in abort () #3 0x0000000000402bef in uw_init_context_1 ( context=3Dcontext@entry=3D0x7fffdfffdd50,=20 outer_cfa=3Douter_cfa@entry=3D0x7fffdfffdf80,=20 outer_ra=3D0x4b2326 ) at ../../../gcc-13.2.0/libgcc/unwind-dw2.c:1336 #4 0x00000000004ad986 in _Unwind_ForcedUnwind (exc=3D0x800818940,=20 stop=3D0x4b24d0 , stop_argument=3D0x0) at ../../../gcc-13.2.0/libgcc/unwind.inc:212 #5 0x00000000004b2326 in thread_unwind () #6 0x00000000004b228c in _pthread_exit_mask () #7 0x00000000004b21fb in pthread_exit () #8 0x00000000004b1e6d in thread_start () #9 0x0000000000000000 in ?? () It fails because gcc' _Unwind_IteratePhdrCallback() insists on finding PT_GNU_EH_FRAME which is missed for gcc-compiled binary: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 0x00000000001523d8 0x00000000001523d8 R E 0x1000 LOAD 0x0000000000153000 0x0000000000553000 0x0000000000553000 0x0000000000050274 0x0000000000273c30 RW 0x1000 NOTE 0x0000000000000158 0x0000000000400158 0x0000000000400158 0x0000000000000048 0x0000000000000048 R 0x4 TLS 0x00000000001973f0 0x00000000005973f0 0x00000000005973f0 0x0000000000001850 0x0000000000002080 R 0x10 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 0x10 The EH_FRAME segment is present for clang++. I have no idea why. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Wed Apr 24 15:53:47 2024 X-Original-To: threads@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 4VPk6z2mSNz5HrwB for ; Wed, 24 Apr 2024 15:53:47 +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 4VPk6z1fSVz4j9g for ; Wed, 24 Apr 2024 15:53:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713974027; a=rsa-sha256; cv=none; b=uDGJyB/2jP78LppFmPkBOKCMJ9eDp6ZTcPWDl3Y/Zqchzg0JtN1dYMEuY0p7U7BWm0eXhm S3uShMBRG9L2qfODya23xfRPSwMPbTBaSHX0X+jzkVpUzWQEo4DHueXZ8Ua2ZDBKco44ZH sn72Yqny2H3w1m4jViqyq/L+9tqRSwX8Uk95T6n1+ZhyeAmqIFHg0mvhh2O8IdPlaSrbFN 9EGM2EvMQPPk6Qr3SB5Nelr0zpVU2pkPZ9BTtWsPXDA+s9AqF7qsQlo1zMgPSElF0pYGKt 3KtpfciEXNqzbGwf0ZZplmOKWEY8gu3tKg/z9bIwB0MquhCu4tghBbmmrM6ajA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713974027; 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: in-reply-to:in-reply-to:references:references; bh=6u+eldauw490nWKNhQTktkzXhYsKIWtE3+ubavGmjg4=; b=f6wRaJg/xWDvXYnoR0LplEvXCONte6vHxsY6bfIiOURIc478McVd3fFVo55GT3wWxr5b5o qB+TaiGWprJIeomS0EaTL/+58Y095ED2jNO5GPQqfuPaHscPKYB5D1HmftECr4ILrKjm8A hOz99FbLw/tK6oc8JIXIMfOPXnCmXMRowE/nCXa1KqSL/lrP8OTcm1fvgNf2JJ6/jG5yzd zgnnBY2z5MBvyWFwh5TMiVkbinxskE+L4zWNlPjxN8I9gVheZRy33CYf6rlsRslochCeb9 WaGbLCcxl6/LAEs5o6rWXLIrOZjSSMxwy7GQeJUfzVYGIKQvYYKVJ1kMfzVcEw== 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 4VPk6z1CVRzMDV for ; Wed, 24 Apr 2024 15:53:47 +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 43OFrlCR027757 for ; Wed, 24 Apr 2024 15:53:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43OFrlKa027752 for threads@FreeBSD.org; Wed, 24 Apr 2024 15:53:47 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: threads@FreeBSD.org Subject: [Bug 278551] pthread_join() kills the process with a return code of 134 Date: Wed, 24 Apr 2024 15:53:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: 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: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278551 Konstantin Belousov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |salvadore@freebsd.org Assignee|threads@FreeBSD.org |toolchain@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.=