passenger: MacOS High Sierra Apache, Case-insensitive FS causes fork() sanitizer crash.
Help please: https://stackoverflow.com/questions/46628052/phusion-passenger-installation-error-in-macos-10-13-high-sierra
## Issue report
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: buildout/apache2/module_libboost_oxt.a(regex_debug.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: buildout/apache2/module_libboost_oxt.a(tss_null.o) has no symbols
clang -o buildout/apache2/mod_passenger.o -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -fPIC -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -g -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -c src/apache2_module/mod_passenger.c
src/apache2_module/mod_passenger.c:26:10: fatal error: 'httpd.h' file not found
#include <httpd.h>
^~~~~~~~~
1 error generated.
rake aborted!
Command failed with status (1): [clang -o buildout/apache2/mod_passenger.o -Isrc/agent -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -fPIC -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -g -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -c src/apache2_module/mod_passenger.c]
/private/tmp/passenger-20171008-7392-owxt2w/passenger-5.1.8/build/support/cplusplus.rb:53:in `run_compiler'
/private/tmp/passenger-20171008-7392-owxt2w/passenger-5.1.8/build/support/cplusplus.rb:97:in `compile_c'
/private/tmp/passenger-20171008-7392-owxt2w/passenger-5.1.8/build/support/cplusplus.rb:154:in `block in define_c_object_compilation_task'
Tasks: TOP => apache2 => buildout/apache2/mod_passenger.so => buildout/apache2/mod_passenger.o
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 96 (43 by maintainers)
Commits related to this issue
- macOS High Sierra: add another hardcoded Apache include directory location Apparently on some systems the Apache header files may be in a different location than on our test systems. Partially close... — committed to phusion/passenger by FooBarWidget 7 years ago
- macOS High Sierra: add another hardcoded Apache include directory location Apparently on some systems the Apache header files may be in a different location than on our test systems. Partially close... — committed to phusion/passenger by FooBarWidget 7 years ago
So the current workarounds are:
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YESenv var to the apache launchd plist (requires disabling SIP)PassengerHighPerformance onto your virtualhost if your app can work that wayOk that confirms my suspicion. Apple introduced a bug into the system Apache in High Sierra, you can review the change yourself if it interests you here:
The original file: https://opensource.apple.com/source/apache/apache-822/httpd/server/request.c.orig.auto.html Apple’s modified file: https://opensource.apple.com/source/apache/apache-822/httpd/server/request.c.auto.html
Particularly, they call
CFLocaleCopyCurrentinfiles_strcmp, which after a long call tree loads the Obj-C runtime (something Core Foundation is not supposed to do).What’s interesting to me is that when an older Passenger is loaded this does not occur, and presumably this also doesn’t occur when
mod_passengeris not loaded at all (maybe someone could check that case). Meaning that thisfiles_strcmpfunction is triggered becausemod_passengeris loaded.I’ll poke around to see if I can find a way to avoid triggering the bug.
@NDuggan ah, no that’s fine, I thought you were also testing with a static site, but actually using Passenger is an even better test 😃
@CamJN Using apachectl and using smart spawning. Disabling smart spawning didn’t change anything.
@NDuggan See https://www.phusionpassenger.com/library/indepth/ruby/spawn_methods/.