NetBSD Problem Report #55230
From www@netbsd.org Mon May 4 15:04:48 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id AE2131A9213
for <gnats-bugs@gnats.NetBSD.org>; Mon, 4 May 2020 15:04:48 +0000 (UTC)
Message-Id: <20200504150447.EEA5D1A9219@mollari.NetBSD.org>
Date: Mon, 4 May 2020 15:04:47 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: futex wakes do not wake the highest priority waiter
X-Send-Pr-Version: www-1.0
>Number: 55230
>Category: kern
>Synopsis: futex wakes do not wake the highest priority waiter
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: thorpej
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 04 15:05:00 +0000 2020
>Last-Modified: Sun Aug 16 15:48:51 +0000 2020
>Originator: Jason Thorpe
>Release: NetBSD 9.99.59
>Organization:
Riscy Business
>Environment:
NetBSD 9.99.59
>Description:
Futex wake operations do not wake the highest priority waiter. Instead, the wake the waiters in FIFO order.
>How-To-Repeat:
Enqueue a low priority waiter before a high priority waiter. Wake one waiter. The waiter that's awoken will be the low priority waiter.
>Fix:
Do not use a queue of "wait" structures each with their own condvar. Instead, each futex should have its own sleepq and operate as a first-class synchronization object.
>Release-Note:
>Audit-Trail:
From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55230 CVS commit: src/tests/lib/libc/sys
Date: Mon, 4 May 2020 15:09:34 +0000
Module Name: src
Committed By: thorpej
Date: Mon May 4 15:09:34 UTC 2020
Modified Files:
src/tests/lib/libc/sys: t_futex_ops.c
Log Message:
Add a test case for PR kern/55230. It is currently marked as expect-fail.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_futex_ops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Sun, 16 Aug 2020 15:48:51 +0000
Responsible-Changed-Why:
Take.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.