Skip to content

[WIP] deps: Bump build images -> e21298a (llvm -> 18)#38093

Closed
dependency-envoy[bot] wants to merge 6 commits intomainfrom
dependency-envoy/build-image/latest
Closed

[WIP] deps: Bump build images -> e21298a (llvm -> 18)#38093
dependency-envoy[bot] wants to merge 6 commits intomainfrom
dependency-envoy/build-image/latest

Conversation

@dependency-envoy
Copy link
Copy Markdown
Contributor

Created by Envoy dependency bot

Signed-off-by: dependency-envoy[bot] <148525496+dependency-envoy[bot]@users.noreply.github.com>

@repokitteh-read-only repokitteh-read-only Bot added workflows:untested deps Approval required for changes to Envoy's external dependencies labels Jan 17, 2025
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @mattklein123

🐱

Caused by: #38093 was synchronize by phlax.

see: more, trace.

@phlax phlax changed the title deps: Bump build images -> e21298a [WIP] deps: Bump build images -> e21298a Jan 17, 2025
@phlax phlax marked this pull request as draft January 17, 2025 18:09
@phlax
Copy link
Copy Markdown
Member

phlax commented Jan 17, 2025

cc @krinkinmu

@phlax phlax changed the title [WIP] deps: Bump build images -> e21298a [WIP] deps: Bump build images -> e21298a (llvm -> 18) Jan 17, 2025
@phlax
Copy link
Copy Markdown
Member

phlax commented Jan 17, 2025

 external/com_github_google_tcmalloc/tcmalloc/page_allocator_interface.h:83:46: error: returning variable 'info_' by reference requires holding mutex 'pageheap_lock' [-Werror,-Wthread-safety-reference-return]
   83 |   const PageAllocInfo& info() const { return info_; }
      |                                              ^
1 error generated.

https://github.com/envoyproxy/envoy/actions/runs/12834491248/job/35791937879#step:17:601

@phlax phlax force-pushed the dependency-envoy/build-image/latest branch from 004545d to 8ff9eaf Compare January 20, 2025 13:12
@phlax
Copy link
Copy Markdown
Member

phlax commented Jan 20, 2025

In file included from source/common/stats/thread_local_store.cc:1:
./source/common/stats/thread_local_store.h:425:14: error: returning variable 'central_cache_' by reference requires holding mutex 'parent_.lock_' [-Werror,-Wthread-safety-reference-return]
  425 |       return central_cache_;
      | 

https://github.com/envoyproxy/envoy/actions/runs/12869653512/job/35878982913#step:17:796

@phlax phlax force-pushed the dependency-envoy/build-image/latest branch 2 times, most recently from 7251f97 to 87d7d85 Compare January 23, 2025 12:40

package(default_visibility = ["//visibility:public"])

CACHE_SILO_KEY = "llvm-18"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this somewhere shared

@phlax phlax force-pushed the dependency-envoy/build-image/latest branch 6 times, most recently from 35c5d66 to cedf21a Compare January 28, 2025 10:09
dependency-envoy Bot and others added 4 commits January 29, 2025 10:06
Signed-off-by: dependency-envoy[bot] <148525496+dependency-envoy[bot]@users.noreply.github.com>

Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
phlax and others added 2 commits January 29, 2025 10:06
Signed-off-by: Ryan Northey <ryan@synca.io>
Those return references to internal protected members, so ideally all
the callers should acquire a lock before calling those.

However, all the tests that use FakeStream or one of its derivatives
cannot really acquire the right lock because it's a protected member
of the class.

We got away with this so far for a few reasons:

1. Clang thread safety annotations didn't detect this problematic
   pattern in the clang-14 that we are currently using (potentially
   because those methods actually acquired locks, even though those
   locks didn't actually protect much).
2. The locks are really only needed to synchronize all the waitForX
   methods, accesors methods like body(), headers() and trailers() are
   called in tests after the appropriate waitForX method was called.

Disabling thread safety annotations for these methods does not actually
make anything worse, because the existing implementation aren't thread
safe anyways, however here are a few alternatives to disabling those
that I considered and rejected at the moment:

1. Return copies of body, headers and trailers instead of references,
   create those copies under a lock - that would be the easiest way to
   let compiler know that the code is fine, but all three methods return
   abstract classes and currently there is no easy way to copy them
   (that's not to say, that copying is impossible in principle);
2. Expose the lock and require all the callers acquire it - this was my
   first idea of how to fix the issue, but FakeStream (and it's
   derivatives) is used quite a lot in tests, so this change will get
   quite invasive.

Because it does not seem like we really need to lock those methods in
practice and given that alternatives to disabling thread safety analysis
on those are quite invasive, I figured I can just silence the compiler
in this case.

Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>

Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax
Copy link
Copy Markdown
Member

phlax commented Feb 17, 2025

closed due to branch rename - will reopen once build image update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deps Approval required for changes to Envoy's external dependencies workflows:untested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants