port upgrade outdated hangs network

Ryan Schmidt ryandesign at macports.org
Mon Jan 17 02:29:07 UTC 2022


On Jan 16, 2022, at 13:28, phlebas at cantab.net wrote:

> Thanks for your brilliantly helpful response.
> Yes.. the pings are indirectly to blame!!
> No, I am not running a third party firewall.
> But I read the notes and noticed the comments about
> changing the max_hosts_to_ping: I had noticed
> after the hang that there were upwards of a dozen
> hung pings.
> 
> In order I had done the following
> 
> 1. After 24 hours I tried the exact same port upgrade command again... same result.
> 
> 2. So, ok, after 15 minutes or so, I donned my debugging hat and executed:
>    port -v -v -v upgrade outdated
> ... now it did not choke on gd2! ... several other packages are installed .... then it hangs on ghostscript!!
> 
> 
>   Clearly, something extremely odd was going on here. I think it has nothing to
>  do with turning on debug (-v -v -v) -- I think that is a red herring.
>  It seems that some other condition on the network cleared,
>  possibly a condition on the macports mirror, which now allowed gd2
>  to download. Yes consistent with the ping stuff... variations in response
>  to pings could easily give different result

MacPorts does not have multiple levels of verbosity. "-v -v -v" is identical to "-v" and turns on verbose mode. "-d" turns on debug mode which is more verbose than verbose mode.

MacPorts caches ping results for 24 hours. Maybe MacPorts recorded some servers' ping times and then when you tried again 15 minutes later it had fewer servers remaining to ping and was able to do so successfully. If you wait more than 24 hours and then try again, MacPorts will have to ping all the servers again and possibly encounter the problem again.

I don't know of any "condition" on any of the more than a dozen independently-administered MacPorts mirror servers or how such a condition could cause your OS networking stack to fail without that failure being classified as an OS bug.


> So I change the max_hosts_to_ping to 10.
> Eureka. It works. No hang.
> It is very clear, I believe, that there is some serious bug
> in MacOS networking stack which is present not only in BigSur
> but also in Catalina.

Please file a bug report with Apple, though I suppose it's doubtful that Apple will release anything more than security updates for macOS versions prior to 12 at this point.



More information about the macports-users mailing list