NetBSD Problem Report #55721

From  Mon Oct 12 07:38:34 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id C0EC31A921F
	for <>; Mon, 12 Oct 2020 07:38:33 +0000 (UTC)
Message-Id: <>
Date: Mon, 12 Oct 2020 10:38:28 +0300 (EEST)
From: (Andreas Gustafsson)
Reply-To: (Andreas Gustafsson)
Subject: usr.sbin/cpuctl/t_cpuctl:nointr, offline tests fail
X-Send-Pr-Version: 3.95

>Number:         55721
>Category:       bin
>Synopsis:       usr.sbin/cpuctl/t_cpuctl:nointr, offline tests fail
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 12 07:40:00 +0000 2020
>Last-Modified:  Mon Oct 12 08:25:01 +0000 2020
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current
System: NetBSD
Architecture: x86_64
Machine: amd64

The "nointr" and "offline" test cases of the usr.sbin/cpuctl/t_cpuctl
test program now fail on real amd64 hardware:

The problem started some time between source dates 2020.
and 2020.



From: Rin Okuyama <>
To: Andreas Gustafsson <>
Subject: Re: bin/55721: usr.sbin/cpuctl/t_cpuctl:nointr, offline tests fail
Date: Mon, 12 Oct 2020 17:24:37 +0900

 This is due to mine:

 I doubt whether these tests are correct.

 As wrote in the commit log, we had ignored any errors when enabling or
 disabling interrupts for a CPU core by IOC_CPU_SETSTATE ioctl, until
 kern_cpu.c rev 1.91. This behavior was changed in rev 1.92; if
 enabling/disabling interrupts fails, the ioctl breaks there, and does
 not try to make that core online/offline. The newly failing tests
 depend on this behavior. However, this change resulted in regression
 described in the commit log.

 Yes, the current behavior of the ioctl is unclear. However, IMO, this
 is limitation of design of IOC_CPU_SETSTATE ioctl itself; both of
 whether intr/nointr and online/offline should be specified to a CPU
 core, and you cannot set one of them.

 Also, comment in the test says:
      184 	# Additional check that the boot processor cannot be
      185 	# set offline, as noted in the cpuctl(8) manual page.

 But there's no such explanation in cpuctl(8).


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.