From nobody Sun Apr 16 12:48:19 2023 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 4Pzqjc2fN6z45Hfp for ; Sun, 16 Apr 2023 12:48:20 +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 4Pzqjc0xrhz4LxB for ; Sun, 16 Apr 2023 12:48:20 +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=1681649300; 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=6dGD9iMP7tWxB+SgxOEFMybRCCMHaDE8N4wTpdxC+ck=; b=iv63n8R6RtWrKxzttdRInoCVFQE2aNds/0uckokE4jk/Kzl6U+PIN3zeA5+qUxeRs3hDZU tNs2zOXakDocs6sY6f6er4B5CpnUCZ/d5/A1x1897HathpCxJFjI1ZlM6Q0H7VCOnwdMoa LlC4ra4NtkImmZM62yVLgZrRcyG/bS4fit48maNtgEQCdPpuBt4g/EGqG5nzrGHakDRDu3 RakKysl22b6ZnW8BUS5/QQzvxBgYAqsOOJzWodsqMkZ9tZ6hGMn9FQP6erA4emGQa/TAp7 CcSr0bKwqi3mS2W5wpwU1q6z9gsuWZONscGCSLxNC/jNiwexFW1RdpPkCBLk0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681649300; a=rsa-sha256; cv=none; b=Qe3rZccahsa+DN47UDAes0buHDw8u/1jUXfzvvv4DVe3f7wdUH/b2y6jd4Ik/H2roR6cKh W0awnXZtyYMOY1QQc06YYGkoJdwvIRJQJ1LjuXdaQQ+7x+Djq1HTymFmbGCRXrJ2KXxV0F 8UvYqacS0IjeGuazKgx+JnZoegNiQdxePvrbog6keRb6KoiKSmC2IfrkkxN9sEQdVC14pF pJL6YwGLjgZa6i0X0iyXM1Cc6vWc5jqpxsBq+AEPfi6hjmK+DX+ElFV/iLwGcqg6emBthK dZg2k4vqVjTUtK80gcLBoL1GwqxO89Lt0zWkqr1Iu0JodttYNT2FiMv9VFseuQ== 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 4Pzqjb6psGznVG for ; Sun, 16 Apr 2023 12:48:19 +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 33GCmJKI013292 for ; Sun, 16 Apr 2023 12:48:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33GCmJ3B013291 for threads@FreeBSD.org; Sun, 16 Apr 2023 12:48:19 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 270785] Performance and power efficiency regression due to pthread_cond_timedwait() changes Date: Sun, 16 Apr 2023 12:48:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: performance, regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: bllcha013@myuct.ac.za X-Bugzilla-Status: Open 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: Sender: owner-freebsd-threads@freebsd.org X-BeenThere: freebsd-threads@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270785 --- Comment #12 from bllcha013@myuct.ac.za --- Thank you, I applied the updated patch and tested, now Java seems to hang a= fter Minecraft server has started when the sysctl kern.ipc.umtx_min_timeout is s= et to anything except 0. I tried 1, 10, 100000, 10000000, etc... which all resulted in a hang, but 0 is perfectly fine. These are the last few lines f= rom truss when Java hangs and the truss output stops. WCPU usage of java process drops to 0%. Only way to stop it at this point is kill -9. _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) =3D 0 (0x0) _umtx_op(0x27cea36b0188,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) =3D 0 (0x0) __sysctlbyname("vm.stats.vm.v_free_count",24,0x27d0328ecc04,0x27d0328ecbf8,= 0x0,0) =3D 0 (0x0) __sysctlbyname("vm.stats.vm.v_cache_count",25,0x27d0328ecc04,0x27d0328ecbf8= ,0x0,0) =3D 0 (0x0) __sysctlbyname("vm.stats.vm.v_inactive_count",28,0x27d0328ecc04,0x27d0328ec= bf8,0x0,0) =3D 0 (0x0) mprotect(0x27ceb6394000,65536,PROT_READ|PROT_WRITE|PROT_EXEC) =3D 0 (0x0) __sysctlbyname("vm.stats.vm.v_free_count",24,0x27d047c69c04,0x27d047c69bf8,= 0x0,0) =3D 0 (0x0) __sysctlbyname("vm.stats.vm.v_cache_count",25,0x27d047c69c04,0x27d047c69bf8= ,0x0,0) =3D 0 (0x0) __sysctlbyname("vm.stats.vm.v_inactive_count",28,0x27d047c69c04,0x27d047c69= bf8,0x0,0) =3D 0 (0x0) In addition, when the sysctl is set to anything except 0, dtrace shows this output from the moment I start Java/Minecraft to the moment it freezes: dtrace: description 'fbt::do_wait:entry ' matched 1 probe If I set the sysctl back to 0, kill and restart Java/Minecraft, then dtrace shows lots of output as expected. As soon as I set the sysctl again, then dtrace output immediately stops as well as truss output, leaving the above. It's as if it is not entering do_wait at all when the sysctl is set? --=20 You are receiving this mail because: You are the assignee for the bug.=