You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Envoy crash (not security relevant) on launch on macOS Monterey (macOS 12) betas (TCMalloc incompatibility) #17535
Please note: I am reporting a crasher issue here that is not security relevant because it's an immediate crash on launch, I cleared this with @ggreenway too.
Title: Envoy crash (not security relevant) on launch on macOS Monterey betas due to TCMalloc incompatibility
Description:
The envoy 1.19.0 (and any other binary version I could find) binary from Homebrew -- which is the recommended installation method on macOS -- crashes immediately when started on all macOS Monterey (macOS 12) betas. The problem seems to be that the TCMalloc that Envoy uses is incompatible with macOS Montere. Concretely, the system's malloc implementation seems to invoke free_definite_size which is is set to NULL in TCMalloc.
Workaround:
As a workaround, it should be enough to publish macOS binaries that do not use TCMalloc until that is compatible again.
Repro steps:
# Install a macOS Monterey beta from https://developer.apple.com/download
brew install envoy
envoy --version # will crash
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
It appears that the version of tcmalloc in gperftools has diverged from the main tcmalloc repo, and the offending code is only present in gperftools. But gperftools-tcmalloc is used by default on MacOS. Testing to see if switching MacOS to use the non-gperftools tcmalloc fixes the issue.
Activity
[-]Envoy crash (not security relevant) on launch on macOS Monterey betas (TCMalloc incompatibility)[/-][+]Envoy crash (not security relevant) on launch on macOS Monterey (macOS 12) betas (TCMalloc incompatibility)[/+]github-actions commentedon Sep 1, 2021
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
ggreenway commentedon Sep 1, 2021
It appears that the version of tcmalloc in gperftools has diverged from the main tcmalloc repo, and the offending code is only present in gperftools. But gperftools-tcmalloc is used by default on MacOS. Testing to see if switching MacOS to use the non-gperftools tcmalloc fixes the issue.
hungcrush commentedon Oct 25, 2021
Anynews for MacOS 12??? :(
Fix crash-on-startup on macOS 12
Fix crash-on-startup on macOS 12 (#18779)
JakeCooper commentedon Oct 27, 2021
Any shot a 1.20.1 release could be cut for this?
Fix crash-on-startup on macOS 12 (#18779) (#18864)
Fix crash-on-startup on macOS 12 (envoyproxy#18779) (envoyproxy#18864)