NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-macppc/59014: Shutdown -r now often freezes on macppc b&w G3



>Number:         59014
>Category:       port-macppc
>Synopsis:       Shutdown -r now often freezes on macppc b&w G3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 20 19:00:00 +0000 2025
>Originator:     Chris Tucker
>Release:        10.1
>Organization:
Self
>Environment:
NetBSD 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/macppc/compile/GENERIC macppc
>Description:
I am running 10.1 on a blue-and-white G3 Mac. I've been testing with a couple of repeated installs.

When I issue a "shutdown -r now" command, the system will state:

About to run shutdown hooks ...
Stopping cron.
Stopping inetd.

And then it hangs, requring me to press-and-hold the power button, or to press the Mac's reset button.

Sometimes the Mac shutds down properly:

About to run shutdown hooks ...
Stopping cron.
Stopping inetd.
Saved entropy to /var/db/entropy-file
Removing block-type swap devices
swapctl: removing /dev/wd0b as swap device
Thu Jan 16 14:55:35 UTC 2025

I was perusing the rc files and noted how shutdown apparently runs the scripts in /etc/rc.d in reverse order of rc on boot.

To narrow down the problem, I added an "echo" line in /etc/rc.shutdown:
for _rc_elem in $(reverse_list $files); do
        echo $_rc_elem      <--- I added this line
        run_rc_script $_rc_elem stop

Thus, when the shutdown completes successfully, I see the following output:

binky# shutdown -rv now
Shutdown NOW!
shutdown: [pid 2471]
binky#                                                                                
*** FINAL System shutdown message from chris@binky ***                       
System going down IMMEDIATELY                                                  
System shutdown time has arrived
About to run shutdown hooks...
/etc/rc.d/automount
/etc/rc.d/cron
Stopping cron.
/etc/rc.d/ftpd
/etc/rc.d/httpd
/etc/rc.d/identd
/etc/rc.d/inetd
Stopping inetd.
/etc/rc.d/mixerctl
/etc/rc.d/wsmoused
/etc/rc.d/local
/etc/rc.d/racoon
/etc/rc.d/ipfs
/etc/rc.d/downinterfaces
/etc/rc.d/altqd
/etc/rc.d/accounting
/etc/rc.d/random_seed
Saved entropy to /var/db/entropy-file.
/etc/rc.d/swap1
Removing block-type swap devices
swapctl: removing /dev/wd0b as swap device
/etc/rc.d/ccd
Sun Jan 19 14:23:13 UTC 2025
Done running shutdown hooks.
Connection to 10.0.0.251 closed by remote host.
Connection to 10.0.0.251 closed.

But when the shutdown freezes I get:

binky# shutdown -rv now
Shutdown NOW!
shutdown: [pid 584]
binky#                                                                                
*** FINAL System shutdown message from chris@binky ***                       
System going down IMMEDIATELY                                                  
System shutdown time has arrived
About to run shutdown hooks...
/etc/rc.d/automount
/etc/rc.d/cron
Stopping cron.
/etc/rc.d/ftpd
/etc/rc.d/httpd
/etc/rc.d/identd
/etc/rc.d/inetd
Stopping inetd.
/etc/rc.d/mixerctl
/etc/rc.d/wsmoused
/etc/rc.d/local
/etc/rc.d/racoon
/etc/rc.d/ipfs
/etc/rc.d/downinterfaces
/etc/rc.d/altqd
/etc/rc.d/accounting
/etc/rc.d/random_seed

It freezes at the "random_seed" section, as you can see.

I edited /etc/rc.d random_seed to echo the name of every function/subroutine called in the script. Within random_seed, the function "random_save" is the last one to print prior to freezing.

That section among other things calls rndctl, which I had noticed earlier caused my Mac to freeze when I issued a rndctl command via the command line.

Thus, I suspect the problem may be associated with rndctl.

I did a search on the PRs and found the following two reports that might be similar to mine:
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=55783
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58322

(BTW, I configured entropy during the install process using the load binary option, off a local ftp server hosting the requested file generated by the dd command stated on the entropy installer page, and that seemed to work correctly.)
>How-To-Repeat:
Issue shutdown -r now command a few times. Somtimes it works, sometimes it freezes.
>Fix:



Home | Main Index | Thread Index | Old Index