Opened 10 months ago

Last modified 3 months ago

#67797 new defect

virt-manager @4.1.0_1+quartz: fails on start with +[NSPlaceholderMutableString initialize] may have been in progress in another thread when fork() was called.

Reported by: fabianwenk (Fabian Wenk) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mohd-akram (Mohamed Akram), neverpanic (Clemens Lang)
Port: virt-manager

Description

Running on macOS 13.4.1 (Ventura) on Intel CPU. Updated virt-manager from @4.1.0_0+quartz to @4.1.0_1+quartz and now it fails on start with this error (including the macOS crash reporter popping up):

objc[18842]: +[NSPlaceholderMutableString initialize] may have been in progress in another thread when fork() was called.
objc[18842]: +[NSPlaceholderMutableString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

Going back to virt-manager @4.1.0_0+quartz did not help and gave the same error. So I also tried to revert a few of the possible related ports from below list, but this also did not help.

All the ports which have been updated as well:

wenk@greenlantern:~/ % port outdated
The following installed ports are outdated:
clang-16                       16.0.6_0 < 16.0.6_1       
curl                           8.1.2_0 < 8.2.0_0         
curl-ca-bundle                 8.1.2_0 < 8.2.0_0         
flac                           1.4.2_0 < 1.4.3_0         
ghostscript                    9.56.1_1 < 10.01.2_0      
glib2                          2.76.3_0 < 2.76.4_0       
graphviz                       8.0.5_0 < 8.1.0_0         
gtk-vnc                        1.3.1_0 < 1.3.1_1         
icu                            73.1_1 < 73.2_0           
ImageMagick                    6.9.11-60_9 < 6.9.11-60_10   
jansson                        2.13.1_0 < 2.14_0         
kerberos5                      1.21_0 < 1.21.1_1         
libnetpbm                      11.01.03_0 < 11.02.00_0   
libpng                         1.6.39_0 < 1.6.40_0       
librsvg                        2.54.5_0 < 2.56.1_0       
libsdl2                        2.28.0_0 < 2.28.1_0       
libvirt                        9.4.0_0 < 9.5.0_0         
libvpx                         1.13.0_0 < 1.13.0_1       
lmdb                           0.9.29_0 < 0.9.31_0       
nettle                         3.8.1_0 < 3.9.1_0         
nghttp2                        1.54.0_0 < 1.55.1_0       
openexr                        3.1.8_0 < 3.1.9_0         
openldap                       2.6.4_1 < 2.6.5_0         
openssh                        9.3p1_2 < 9.3p2_0         
osinfo-db                      20190304_0 < 20230518_0   
p5.34-compress-raw-bzip2       2.204.0_0 < 2.205.0_0     
p5.34-compress-raw-zlib        2.204.0_0 < 2.205.0_0     
p5.34-file-listing             6.150.0_0 < 6.160.0_0     
p5.34-http-date                6.50.0_0 < 6.60.0_0       
p5.34-io-compress              2.204.0_0 < 2.205.0_0     
p5.34-libwww-perl              6.710.0_0 < 6.720.0_0     
p11-kit                        0.24.1_0 < 0.25.0_0       
py-ansible                     7.4.0_0 < 8.1.0_0         
py-awscli                      1.27.159_0 < 1.29.3_0     
py-boto3                       1.26.159_0 < 1.28.3_0     
py-botocore                    1.29.159_0 < 1.31.3_0     
py310-charset-normalizer       3.1.0_0 < 3.2.0_0         
py310-libvirt                  9.4.0_0 < 9.5.0_0         
py310-roman                    4.0_0 < 4.1_0             
py311-ansible                  7.4.0_0 < 8.1.0_0         
py311-ansible-core             2.14.4_0 < 2.15.1_0       
py311-anytree                  2.8.0_1 < 2.9.0_0         
py311-awscli                   1.27.159_0 < 1.29.3_0     
py311-boto3                    1.26.159_0 < 1.28.3_0     
py311-botocore                 1.29.159_0 < 1.31.3_0     
py311-roman                    4.0_0 < 4.1_0             
spice-gtk                      0.41_0 < 0.42_0           
ssh-copy-id                    9.3p1_0 < 9.3p2_0         
vala                           0.56.8_1 < 0.56.9_0       
virt-manager                   4.1.0_0 < 4.1.0_1         
webp                           1.3.0_1 < 1.3.1_0         
xar                            1.8.0.494.81.1_0 < 1.8.0.496_0   
yt-dlp                         2023.03.04_0 < 2023.07.06_0   
zimg                           3.0.4_0 < 3.0.5_0         
wenk@greenlantern:~/ %

Any idea what else to try for resolving this?

Change History (5)

comment:1 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: mohd-akram added

Fabian, what version of macOS are you using and does your Mac use an Intel or Apple Silicon processor?

Mohamed, do you have any ideas? It was your commit that updated virt-manager from 4.1.0_0 to 4.1.0_1.

Googling this error message, it looks like Apple added this new protection in macOS High Sierra and you can disable it by setting OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES. I'm not sure what the consequence of disabling the protection is nor why this update would have caused the protection to suddenly kick in.

comment:2 Changed 10 months ago by fabianwenk (Fabian Wenk)

@Ryan: as mention at the top of my report: macOS 13.4.1 (Ventura) on Intel

I did also find this report and tried to run it with this:

OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES virt-manager

But that did also not help, same behavior.

comment:3 Changed 10 months ago by mohd-akram (Mohamed Akram)

I see this behavior too. It seems this issue does not occur when you launch "Virtual Machine Manager" from Launchpad. Looking at /Applications/MacPorts/Virtual Machine Manager.app/Contents/MacOS/Virtual Machine Manager, it runs virt-manager --no-fork and I can confirm this bypasses the issue. I'll look into this more to try to find what the root issue is.

comment:4 in reply to:  3 Changed 9 months ago by fabianwenk (Fabian Wenk)

Replying to mohd-akram:

I see this behavior too. It seems this issue does not occur when you launch "Virtual Machine Manager" from Launchpad. Looking at /Applications/MacPorts/Virtual Machine Manager.app/Contents/MacOS/Virtual Machine Manager, it runs virt-manager --no-fork and I can confirm this bypasses the issue. I'll look into this more to try to find what the root issue is.

I can confirm, that it works when I launch "Virtual Machine Manager" from /Applications/MacPorts/ and also with virt-manager --no-fork in Terminal.

comment:5 Changed 3 months ago by neverpanic (Clemens Lang)

Cc: neverpanic added
Note: See TracTickets for help on using tickets.