summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorIris Chang <iris.chang@mediatek.com>2019-01-25 13:36:34 +0800
committerIris Chang <iris.chang@mediatek.com>2019-02-21 09:19:29 +0000
commit6dea37dc6e1f8723a774cd203cb99c48079603e7 (patch)
treece8f76390cf25f2cbffc678043ec3eb343ab6159 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent5cf41e47fe12ccbe110eb01ac788b627bdc89965 (diff)
Fix RouterAdvertisementDaemon thread leakage problem
[Prerequisites] Default value of mRaLength is 0, so getNextMulticastTransmitDelaySec() returns DAY_IN_SECONDS (1 day) in this scenario. [Issue Details] Examine MulticastTransmitter.run() for detail: 676 public void run() { 677 while (isSocketValid()) { 678 try { 679 Thread.sleep(getNextMulticastTransmitDelayMs()); Invoke RouterAdvertisementDaemon.stop() here. Since MulticastTransmitter is in a sleep, this thread will pend 1 day until the next check of isSocketValid() triggers the quit action, which causes thread leakage during Wi-Fi Hotspot on/off stress test. 680 } catch (InterruptedException ignored) { [Solution] Invoke maybeNotifyMulticastTransmitter() after closing socket in RouterAdvertisementDaemon.stop() to interrupt MulticastTransmitter from waiting. Bug: 123491872 Test: FrameworksNetTests adb shell am instrument -w com.android.frameworks.tests.net Test: CTS - CtsNetTestCases ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m CtsNetTestCases Test: CTS - CtsNetTestCasesLegacyApi22 ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m CtsNetTestCasesLegacyApi22 Test: CTS - CtsNetTestCasesLegacyPermission22 ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m CtsNetTestCasesLegacyPermission22 Change-Id: I0c0d63b43a88e1026aaecfc1853309ad63f62268
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions