Subject: Re: port-alpha/26159: Paused CPUs fail to halt when DDB reboot command executed
To: None <mhitch@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Greg A. Woods <woods@planix.com>
List: netbsd-bugs
Date: 03/22/2005 23:19:02
The following reply was made to PR port-alpha/26159; it has been noted by GNATS.

From: "Greg A. Woods" <woods@planix.com>
To: NetBSD/alpha Discussion List <port-alpha@NetBSD.ORG>
Cc: mhitch@netbsd.org, gnats-admin@netbsd.org,
	NetBSD GNATS submissions and followups <gnats-bugs@netbsd.org>
Subject: Re: port-alpha/26159: Paused CPUs fail to halt when DDB reboot command executed
Date: Tue, 22 Mar 2005 18:18:45 -0500 (EST)

 I don't think this bug is 100% fixed yet.
 
 I've applied the pullup from machdep.c: rev 1.283 to netbsd-1-6 and yet
 both with 1.6.x and with -current (after that change was made) I still
 _always_ see one (random) processor fail to shut down in time when doing
 a halt or reboot from the system:
 
 	[console]<@newpub> # halt -q
 	syncing disks... done
 	cpu0: waiting for secondary CPUs to halt...
 	cpu3: shutting down...
 	cpu2: shutting down...
 	WARNING: Unable to halt secondary CPUs (0x3)
 	halted.
 	
 	cpu1: shutting down...
 	
 	halted CPU 0
 	
 	halt code = 5
 	HALT instruction executed
 	PC = fffffc0000300128
 	resetting all I/O buses
 	P00>>>
 
 
 It looks a little different sometimes when rebooting from DDB, but the
 effect appears to be the same -- one processor sometimes shuts down
 "late" (after the "rebooting..." message).  Note it doesn't always
 happen from DDB though -- often all three say "shutting down" in quick
 succession as expected.
 
 	db{3}> reboot
 	syncing disks... done
 	cpu2: shutting down...
 	cpu1: shutting down...
 	cpu0: waiting for secondary CPUs to halt...
 	rebooting...
 	
 	cpu3: shutting down...
 	
 	halted CPU 0
 	
 	halt code = 5
 	HALT instruction executed
 	PC = fffffc0000300128
 	
 	CPU 0 booting
 	
 	resetting all I/O buses
 	
 	RMC>halt in
 	
 	Returning to COM port
 	
 	Halt Button is IN, BOOT NOT POSSIBLE
 	
 	P00>>>
 
 IIRC it also sometimes happens on my dual processor machines as well.
 
 
 
 I'm wondering if maybe the cpus_paused flags should be cleared _before_
 the call to alpha_broadcast_ipi(ALPHA_IPI_HALT)?
 
 -- 
 						Greg A. Woods
 
 H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <woods@robohack.ca>
 Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>