NetBSD Problem Report #56293

From hf@nt.tu-darmstadt.de  Fri Jul  2 11:03:38 2021
Return-Path: <hf@nt.tu-darmstadt.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 4079B1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  2 Jul 2021 11:03:38 +0000 (UTC)
Message-Id: <202107021103.162B3PE0001794@Unspitze.nt.e-technik.tu-darmstadt.de>
Date: Fri, 2 Jul 2021 13:03:25 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Xen Dom0 with no active DomUs stalls during shutdown
X-Send-Pr-Version: 3.95

>Number:         56293
>Category:       bin
>Synopsis:       Xen Dom0 with no active DomUs stalls during shutdown
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 02 11:05:01 +0000 2021
>Last-Modified:  Fri Jul 02 12:00:01 +0000 2021
>Originator:     Hauke Fath <hf@spg.tu-darmstadt.de>
>Release:        NetBSD 9.2_STABLE
>Organization:
Technische Universitaet Darmstadt
>Environment:


System: NetBSD Unspitze 9.2_STABLE NetBSD 9.2_STABLE (FEUERKOGEL_DOM0-$Revision$) #0: Wed Jun 30 02:13:46 CEST 2021 hf@Hochstuhl:/var/obj/netbsd-builds/9/amd64/sys/arch/amd64/compile/FEUERKOGEL_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:

	A Xen Dom0 with no active DomUs and the following rc.conf entries


# XEN support
# switch off when no active DomUs - xenstored busy-loops otherwise
xencommons=NO
xenwatchdog=NO

# XXX An empty, but set $xendomains will hang xl in state D during
# shutdown.

xendomains=" "
                       xendomains_config="/etc/pkg/xen/%s.conf"


	will stall during shutdown, with an attempt at listing the
	domains stuck in kernel land

2145 ?       D<   0:00.02 /usr/pkg/sbin/xl list 


	Commenting out xendomains and xendomains_config rc.conf
	entries does not make a difference.

	At this point, breaking into the debugger on a serial console
	is not possible, and the machine has to be physically
	reset. In times of Covid, this is even more annoying than
	usual.


>How-To-Repeat:

	Set up a Xen Dom0, but no DomUs, yet.
	Try to 'shutdown -r now'.


>Fix:
	Yes, please.

	The Xen related rc.d scripts are a bit of a hairball, which I
	will not venture into. But a plain, innocent 'xl list'
	shouldn't get stuck in the first place.



>Audit-Trail:
From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-admin@netbsd.org, gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/56293: Xen Dom0 with no active DomUs stalls during shutdown
Date: Fri, 2 Jul 2021 13:27:05 +0200

 On 7/2/21 1:05 PM, Hauke Fath wrote:
 > Responsible:    bin-bug-people

 -- on second thought, I guess this should either be 'kern', or 'pkg'. 
 I'll leave the call to whoever picks it up.

 Also:

 % pkg_info | fgrep xen
 xentools413-4.13.2nb2 Userland Tools for Xen 4.13.x
 xenkernel413-4.13.2nb4 Xen 4.13.x Kernel
 xenkernel411-4.11.4nb5 Xen 4.11.x Kernel
 %

 -- 
       The ASCII Ribbon Campaign                    Hauke Fath
 ()     No HTML/RTF in email	        Institut für Nachrichtentechnik
 /\     No Word docs in email                     TU Darmstadt
       Respect for open standards              Ruf +49-6151-16-21344

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/56293: Xen Dom0 with no active DomUs stalls during shutdown
Date: Fri, 2 Jul 2021 13:37:20 +0200

 On Fri, Jul 02, 2021 at 11:05:01AM +0000, Hauke Fath wrote:
 > 	Yes, please.
 > 
 > 	The Xen related rc.d scripts are a bit of a hairball, which I
 > 	will not venture into. But a plain, innocent 'xl list'
 > 	shouldn't get stuck in the first place.

 xl list is stuck because xenstored isn't running.

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@netbsd.org, gnats-admin@netbsd.org
Cc: 
Subject: Re: bin/56293: Xen Dom0 with no active DomUs stalls during shutdown
Date: Fri, 2 Jul 2021 13:57:04 +0200

 On 7/2/21 1:40 PM, Manuel Bouyer wrote:
 >   > 	The Xen related rc.d scripts are a bit of a hairball, which I
 >   > 	will not venture into. But a plain, innocent 'xl list'
 >   > 	shouldn't get stuck in the first place.
 >   
 >   xl list is stuck because xenstored isn't running.

 If the consequences are so bad, the xen script hairball should maybe 
 check preconditions before issuing said "xl list"?

 Put differently, once the xen* scripts have been dropped into rc.d, is 
 there a central rc.conf OFF switch?

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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