Skip to content

Envoy crash (not security relevant) on launch on macOS Monterey (macOS 12) betas (TCMalloc incompatibility) #17535

Closed

Description

@weissi

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

notes
Screen Shot 2021-07-26 at 6 51 15 AM

Please find the full crash report from macOS Monterey beta 3 attached:
envoy_2021-07-26-065109_f12087c8-e3c5-452e-9ad9-33cf36005b6a.crash.txt

Activity

  1. added
    triage
    on Jul 29, 2021
  2. changed the title [-]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)[/+] on Jul 29, 2021
  3. added and removed
    triage
    on Aug 2, 2021
  4. github-actions commented on Sep 1, 2021

    @github-actions

    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.

  5. added
    stale
    on Sep 1, 2021
  6. added
    no stalebot
    and removed
    stale
    on Sep 1, 2021
  7. ggreenway commented on Sep 1, 2021

    @ggreenway
    Member

    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.

  8. hungcrush commented on Oct 25, 2021

    @hungcrush

    Anynews for MacOS 12??? :(

  9. self-assigned this
    on Oct 26, 2021
  10. added a commit that references this issue on Oct 26, 2021
    99e3e5b
  11. added a commit that references this issue on Oct 26, 2021
    b9939c6
  12. JakeCooper commented on Oct 27, 2021

    @JakeCooper

    Any shot a 1.20.1 release could be cut for this?

  13. added a commit that references this issue on Nov 2, 2021
    4cc4e60
  14. added a commit that references this issue on Jan 13, 2022
    10b9a24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/macosbugno stalebot

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions