[MacPorts] #68817: PHP FPM crashes constantly
MacPorts
noreply at macports.org
Thu Nov 30 20:19:46 UTC 2023
#68817: PHP FPM crashes constantly
---------------------+------------------------
Reporter: miken32 | Owner: ryandesign
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: php-fpm
---------------------+------------------------
This is a known issue I think since macOS 14 that affects a lot of
software using `fork()` and Objective C libraries (or something like that,
I am not a low-level programmer.)
{{{
objc[70634]: +[__SwiftNativeNSStringBase initialize] may have been in
progress in another thread when fork() was called.
objc[70634]: +[__SwiftNativeNSStringBase 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.
}}}
There is an [https://github.com/php/php-
src/issues/11818#issuecomment-1711540666 open ticket with PHP] but it
doesn't sound like it will get fixed anytime soon.
Workaround is setting an environment variable by changing the launch
daemon to look like this:
{{{
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version='1.0'>
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
<string>YES</string>
</dict>
<key>Label</key><string>org.macports.php81-fpm</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=php81-fpm</string>
<string>--start-cmd</string>
<string>/opt/local/sbin/php-fpm81</string>
<string>;</string>
<string>--pid=exec</string>
</array>
<key>Disabled</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
}}}
This may be considered unsafe by some, so maybe it should be done as a
variant?
--
Ticket URL: <https://trac.macports.org/ticket/68817>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list