[MacPorts] #60509: Upgrading ports sometimes breaks internet connection

MacPorts noreply at macports.org
Tue May 19 03:09:41 UTC 2020


#60509: Upgrading ports sometimes breaks internet connection
---------------------+--------------------
  Reporter:  iEFdev  |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  base    |    Version:  2.6.2
Resolution:          |   Keywords:
      Port:          |
---------------------+--------------------

Comment (by iEFdev):

 Replying to [comment:4 ryandesign]:
 > Looking back at the kernel panic logs I've saved from our 10.6 i386
 builder, all of them are either in `ping` or `grep` or `cut`.
 >
 > When MacPorts determines a server's ping time, it does so by running
 `ping -noq -c3 -t3 $host | grep round-trip | cut -d / -f 5`.

 One ''could'' do the same line with `awk` instead – just to see if there's
 a difference? …if `grep|cut` is the problem.

 {{{#!bash
 ping -noq -c3 -t3 127.0.0.1 | awk -F '/' 'match($0, "round-trip") {print
 $5}'
 }}}

 [[br]]

 > MacPorts spawns `ping` and `grep` and `cut` processes for each host
 whose pingtime it needs to check. It doesn't need to check those that it
 checked within the past 24 hours, but if you haven't used MacPorts in over
 a day, then it needs to recheck them all.

 Where is this recheck/update done? During the port syncing or when
 actually installing upgrading a port?

 For me it broke was when upgrading the port it self, and not when checking
 for outdated ports.

 [[br]]

 > An idea about why perl modules specifically might trigger the problem is
 that our list of perl cpan mirror sites is very large. There are currently
 191 hosts in the list. Add to that the 16 MacPorts mirrors and that's 207
 hosts to check all at once, for which MacPorts spawns 621 simultaneous
 processes. Each process surely needs at least one file descriptor.

 ''That'' is lot of mirrors.

 When working with mirrors… Isn't location more imporant than `ping` times?
 Thinking… If location is automated from where I am - perhaps `ping` times
 could be centralized, and updated (just like Portindex) on a weekly basis?
 Or what's the reason behind the 24h, except being daily updated?

 Unless there are daily updates of perl ports, it will check that every
 time.

 [[br]]

 > It could be that this is exceeding the number of available file
 descriptors, especially if your computer has many other open files already
 and/or has been online for awhile and you've been running programs that
 have leaked file descriptors (opened them but forgot to close them).

 I usually upgrade my ports when I start the computer. When done and
 cleaned up, I move on to emails and the browser. The mail client is opened
 all the time, checking emails on a 15min interval. Since Firefox is kind
 of a memory-hog - I usually have to restart it once or twice every day.
 Other than that, I usually quit  programs when done.


 [[br]]

 > And if you are running out of file descriptors, then it is not at all
 surprising that Internet access, the ability to open programs and read and
 write files, and pretty much everything else about the computer would
 cease to function.

 That describes pretty much what happens.


 [[br]]

 > 3. MacPorts base could limit the number of hosts that it checks
 simultaneously.

 Just a thougth… but could it be time related? I dont know how the `x-man-
 page://ping` looks like on newer versions of OS X/macOS, but can it be
 tweaked with other options to be more generous, timely. Like `-m`, `-T`,
 `-t` or  `-W`.

 Ie. what happens if I'm an a slow connection …which I am, if my connection
 can't keep up the speed with the script?

-- 
Ticket URL: <https://trac.macports.org/ticket/60509#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list