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
Fix double shutdown of BuildEventArtifactUploader when BES+File output enabled.
When both BES uploading and File BEP output are enabled, a single
BuildEventArtifactUploader object is shared by two different
BuildEventTransports. Both were calling #shutdown() which in turn called
ByteStreamUploader#shutdown(). If shutdown is called while one transport is
still uploading, the ByteStreamUploader will fail an assertion and crash.
This change adds reference counting to the BuildEventArtifactUploader interface
and ensures the reference counts are maintained correctly when sharing a
BuildEventArtifactUploader across multiple independent BuildEventTransport
threads.
Fixesbazelbuild#12575.
RELNOTES: None.
TESTED=Made repro modifications to GrpcCacheClient.java described in
bazelbuild#12575 and confirmed crash without this
change. Implemented this fix, observed crash was no longer reproducible. Added logs
to ByteStreamBuildEventArtifactUploader#deallocate() to verify deallocation happened
after both BuildEventTransports had completed.
PiperOrigin-RevId: 349589743
Copy file name to clipboardExpand all lines: src/test/java/com/google/devtools/build/lib/buildeventstream/BuildEventArtifactUploaderFactoryMapTest.java
Copy file name to clipboardExpand all lines: src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java
0 commit comments