MacPorts 2.8.0-beta1 now available for testing

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Oct 21 10:47:48 UTC 2022


Hi Josh,

I've made some progress in understanding the cause of the hang ups I 
have been having. Its related to the use of a new feature in recent git 
versions

https://github.blog/2022-06-27-highlights-from-git-2-37/#a-builtin-filesystem-monitor-for-windows-and-macos

I enabled this feature a while back

 > git config core.fsmonitor true

and forgot about it.

With macports 2.7.x I had no problems, but with 2.8.x I get the hangup 
immediately after the `git pull` step run by e.g. 'port -d sync'

If, during this hangup, I check the processes running I see this one

67138 s010  S+     0:00.01 /opt/local/libexec/git-core/git 
fsmonitor--daemon run --detach --ipc-threads=8

and indeed if I manually kill that process the port sync command continues.

So... A simple reproducer for the issue is the following

1. Configure your macports installation to use a git clone of the ports 
tree in your personal user area, instead of the default tarball 
approach. In my case this is under /Users/chris/Projects/MacPorts/ports.

2. Install macports git

   > sudo port install git

3. Enable the fs monitor for the ports tree checkout you made in 1.

   > cd /Users/chris/Projects/MacPorts/ports
   > git config core.fsmonitor true

3. run 'port -d sync'

Hopefully then you should see the command hang up

Oberon ~/Projects/MacPorts/ports > sudo port -d sync
DEBUG: Copying /Users/chris/Library/Preferences/com.apple.dt.Xcode.plist 
to /opt/local/var/macports/home/Library/Preferences
--->  Updating the ports tree
Synchronizing local ports tree from 
file:///Users/chris/Projects/MacPorts/ports
DEBUG: euid/egid changed to: 501/20, env: HOME=/Users/chris
DEBUG: /opt/local/bin/git pull --rebase --autostash
DEBUG: system -W /Users/chris/Projects/MacPorts/ports: 
/opt/local/bin/git pull --rebase --autostash
Already up to date.
<hangup>

Of course, the simple work around is to just disable this git feature

 > git config core.fsmonitor false

But I think we should figure out why its interacting badly with macports 
2.8.x ?

cheers Chris

On 20/10/2022 10:49 am, Christopher Jones wrote:
> Hi,
> 
> I’m afraid I have no idea how to go about setting up a reproducer for this. It seems it randomly comes and goes, so perhaps is related to something else going on in the system (I am on macOS12 intel b.t.w.).
> 
> The best I can do is monitor it and see if I can spot any pattern as to when it happens or not. I am now on the official 2.8.0 release and still see it happen, so lets also see if any others start to see the same or not.
> 
> Chris
> 
>> On 19 Oct 2022, at 2:07 am, Joshua Root <jmr at macports.org> wrote:
>>
>> I can't repro this. The VCS sync logic hasn't changed since the privilege dropping fix in April. The only thing I can think of that might have made a difference is the update to Tcl 8.6 and the associated update of all the try/catch blocks.
>>
>> All that should be happening between running git and running portindex is the environment restore in VCSCleanup. You might have to do some more digging to figure out a repro recipe I'm afraid.
>>
>> - Josh
>>
>> On 2022-10-18 20:09 , Christopher Jones wrote:
>>> Hi,
>>> I’m not running the beta but the current master branch of base, but I guess its similar.
>>> I’m noticing with the latest version  `sudo port sync` just hangs up after updating my local git clone. e.g.
>>> Oberon ~/Projects/MacPorts/ports > sudo port -d sync
>>> DEBUG: Copying /Users/chris/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
>>> --->  Updating the ports tree
>>> Synchronizing local ports tree from file:///Users/chris/Projects/MacPorts/ports
>>> DEBUG: euid/egid changed to: 501/20, env: HOME=/Users/chris SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.vx1uKV7YtR/Listeners
>>> DEBUG: /opt/local/bin/git pull --rebase --autostash
>>> DEBUG: system -W /Users/chris/Projects/MacPorts/ports: /opt/local/bin/git pull --rebase --autostash
>>> Already up to date.
>>> and thats it, it never gets any further and just hangs up there.
>>> If I contrl-c the process I can get it to continue.
>>> ^CDEBUG: euid/egid restored to: 0/0, env restored
>>> DEBUG: system: /opt/local/bin/portindex /Users/chris/Projects/MacPorts/ports
>>> Creating port index in /Users/chris/Projects/MacPorts/ports
>>> Total number of ports parsed:	0
>>> Ports successfully parsed:	0
>>> Ports failed:			0
>>> Up-to-date ports skipped:	29934
>>> any ideas what step its hanging up on ?
>>> Chris
>>>> On 14 Oct 2022, at 12:57 am, Joshua Root <jmr at macports.org> wrote:
>>>>
>>>> Well, only one issue has been reported against the beta so far (the NULL cxx_stdlib error that Ken saw.) I guess I'll tag an RC soon.
>>>>
>>>> - Josh
>>
> 


More information about the macports-dev mailing list