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.=