Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel/cc_configure.bzl breaks builds for C libraries #839

Closed
lizan opened this issue Apr 25, 2017 · 6 comments
Closed

bazel/cc_configure.bzl breaks builds for C libraries #839

lizan opened this issue Apr 25, 2017 · 6 comments
Labels

Comments

@lizan
Copy link
Member

lizan commented Apr 25, 2017

It forces use of g++ to even compile .c files, causes failure.

@htuch

@lizan
Copy link
Member Author

lizan commented Apr 25, 2017

cc istio/proxy#260

@htuch
Copy link
Member

htuch commented Apr 25, 2017

Which C libraries are these? I was assuming that we are only building C++ with this toolchain under Bazel, due to the fact that Envoy is pure C++.

@lizan
Copy link
Member Author

lizan commented Apr 25, 2017

gRPC (c-core)

@htuch
Copy link
Member

htuch commented Apr 25, 2017

Basically, Bazel is completely broken today and tries to build C++ files with gcc instead of g++ (see bazelbuild/bazel#2840). We needed to override this for C++. I think it wouldn't be much work to convert bazel/cc_configure.bzl to sanely handle both C and C++ with gcc and g++ respectively. I can do this, but not for a few days as I'm committed right now to the cmake-Bazel handoff, so if you need it before then, we welcome PRs.

@lizan
Copy link
Member Author

lizan commented Apr 25, 2017

Yes I understand. For now we can live without using cc_configure so it is not urgent, will do a PR if I have cycle.

@jmillikin-stripe
Copy link
Contributor

This is fixed now, using the wrapper script in #2631.

jpsim pushed a commit that referenced this issue Nov 28, 2022
Description: brings in an envoy update. Relevant commits:
    - #11127 which uses the construct on first use idiom for certain static variables in the histogram code which were causing #688.
Risk Level: low
Testing: fixed local repro of the crash.

Fixes #688

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this issue Nov 29, 2022
Description: brings in an envoy update. Relevant commits:
    - #11127 which uses the construct on first use idiom for certain static variables in the histogram code which were causing #688.
Risk Level: low
Testing: fixed local repro of the crash.

Fixes #688

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
nezdolik pushed a commit to nezdolik/envoy that referenced this issue May 4, 2024
We used to decommit (with MADV_FREE or MADV_DONTNEED) whole combined
span when freeing span in aggressive decommit mode. The issue with
that is preceding or following span with which we combined span we're
freeing could be freed already and fairly large. By passing all of
that memory to decommit, we force kernel to scan all of those pages.

When mass-freeing many objects old behavior led to O(N^2) behavior
since freeing single span could lead to MADV_{FREE,DONTNEED}-ing of
most of the heap.

New implementation just does decommit of individual bits as needed.

While there, I'm also adding locking to calls of
PageHeap::{Get,Set}AggressiveDecommit.

This partially (or mostly) fixes issue envoyproxy#839.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants