android_packages_modules_Co.../Vcn
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yan Yan ce63e16ca8 Update VcnNetworkProvider to use thread safe Sets
This patch is to fix a race condition when two threads
access VcnNetworkProvider.mRequests at the same time. The
issue happened when the VCN thread is removing elements and the
binder thread is iterating the Set. It causes the binder thread
to end up with a Null element and throw NPE

This patch fixes this threading issue by changing the Set to
be a thread-safe Set

Bug: 382106220
Test: atest CtsVcnTestCases && atest FrameworksVcnTests
Test: Set up test environment to make the race condition 90%
      reproducible; verified the fix by running the test for
      100 times on forrest
Flag: EXEMPT; low risk and small scope bug fix
Change-Id: Id7598a861368454efcd0aa49721c54e11aaebdf1
2025-01-10 10:52:36 -08:00
..
flags Conditionally remove VCN jars from non-updatable platform 2024-12-10 19:27:09 +00:00
framework-b Conditionally remove VCN jars from non-updatable platform 2024-12-10 19:27:09 +00:00
service-b Update VcnNetworkProvider to use thread safe Sets 2025-01-10 10:52:36 -08:00
tests/unit Migrate VCN to separate non-updatable libraries 2024-12-02 16:40:54 -08:00
OWNERS Create VCN folder 2024-10-16 00:52:22 +00:00
TEST_MAPPING Migrate VCN to separate non-updatable libraries 2024-12-02 16:40:54 -08:00