Re: reboot hesitation on Pi3 running -current

From: bob prohaska <fbsd_at_www.zefox.net>
Date: Tue, 28 Nov 2023 20:00:08 UTC
On Tue, Nov 28, 2023 at 09:05:59AM -0800, Steve Rikli wrote:
> On Tue, Nov 28, 2023 at 08:15:30AM -0800, bob prohaska wrote:
> > On Tue, Nov 28, 2023 at 07:20:03AM -0800, Mark Millard wrote:
> > > On Nov 28, 2023, at 07:10, bob prohaska <fbsd@www.zefox.net> wrote:
> > > 
> > > > A Pi3 running -current has taken to pausing during a shutdown -r in a strange way:
> > > > It gets to: 
> > > > 
> > > > Hit [Enter] to boot immediately, or any other key for command prompt.
> > > > Booting [/boot/kernel/kernel] in 5 second more detailed help.
> > > > 
> > > > It then stops at the OK prompt:
> > > > 
> > > > OK boot <---typing boot fails:
> > > > 
> > > > unknown command <---this looks strange, the kernel should already be loaded
> > > 
> > > A possibility here is garbage control characters, say before
> > > the "boot". YOu might want to type just <return> to the first OK
> > > prompt and see if you ever still get "unknown command" once you
> > > do type just "boot" (and <return>).
> > 
> > IIRC I've done that in the past with the same result, but memory is hazy
> > and an attempt at a second shutdown -r came back up without hesitation.
> > 
> > Another build/install cycle is running now, I'll be more careful next time.
> > 
> > > The fact that the countdown stopped at 5 (or other early value)
> > > suggests such extra text at that point.
> > 
> > Rubbish on the serial console is a common  occurence, but it usually
> > shows up when the USB end is taken down and brought back up. In this
> > case the USB end remained up throughout the reboot cycle, no stray 
> > characters were visible.
> > 
> > Thanks for writing!
> 
> This topic has come up before here, I believe.
> 
> I can confirm the same or very similar behavior on rpi4, and there's no
> USB-serial to disconnect on the remote end, rather an actual serial
> console server which is always-on.
>
 
That's a significant (I think) observation. I couldn't tell where the stray
characters were originating and suspected the USB-serial adapter. Your experience
suggests very strongly the trouble is local to the serial UART on the Pi or maybe
wiring problems. 

Is it possible that the serial port of the monitoring devices occasionally
echos output from the Pi's console back to the Pi? Seems to me it shouldn't,
but sometimes I see fragments of a login prompt among the rubbish. 

> Unfortunately it's not consistent behavior, i.e. sometimes the reboot
> proceeds uninterrupted. Sometimes typing 'boot' proceeds normally,
> sometimes typing 'boot' errors and then typing it again proceeds as
> normal.

Does it sometimes reboot hands-off? Mine does, at least occasionally.

> 
> I too have been thinking it's spurious chars on the serial console at
> various points, but I've yet to find a common behavior or consistent
> method to reproduce. This doesn't happen on my other serial consoles,
> FreeBSD or Linux. I also don't think it happened early on when this
> rpi4 was running raspbian for a brief time, but I didn't play with
> that setup very long.
> 
> So far I believe it's avoidable by not watching the serial console
> during reboot, not necessary (I think) to disconnect the cable. But
> obviously that defeats the purpose of the serial console vs. a blind
> reboot.

Hopefully "not watching" means disconnecting Rx and Tx from the GPIO
pins. If it means not looking at the display it's a whole 'nother story!

8-)

bob prohaska


> 
> I plan to upgrade my rpi4 to 14.0 just to see if anything changes. Iirc
> from the relnotes, one of the changes in new release is 115200 is the
> new default for serial communications, and I have some hope that maybe
> some hard-to-find hard-coded 9600 may have been thwarting those of us
> running with different speed infrastructure and console.
> 
> Since bob is running -current on his rpi3 though, my hope is probably
> a longshot.
> 
> Cheers,
> sr.
>