sync sync, was Re: Problem with crash post-install
Hi,
tomas@tuxteam.de wrote:
> > While I've read about issuing sync *twice* with the explanation
> > that sysadmins are a supersticious bunch
Polyna-Maude Racicot-Summerside wrote:
> I'm really asking why do it 3 time.
> In case it came back to the prompt *before* finishing to do it's job ?
I dimly remember that it was part of the shutdown procedure of one of
the earliest Unix machines which i met. IBM RT, Apollo DN3000, microVAX ... ?
The shutdown spell was something like
sync ; sync ; halt
Googling "sync halt" leads me to an interesting theory at
https://bsdimp.blogspot.com/2020/07/when-unix-learned-to-reboot2.html
According to section "That sync; sync; sync Thing..." two bugs of early
systems' sync existed (one explored by the blog's author, one as rumor):
1: The sync system call returned without waiting.
Workaround:
Keep the human operator busy while the machine is still not done with
flushing buffers. E.g. prescribe to type three lines of "sync" before
typing "halt".
2: Only the first sync call returned early, whereas the second sync
properly blocked until flushing was done.
That seems to be the origin of my memory.
Have a nice day :)
Thomas
Reply to: