Fixed
Status Update
Comments
st...@gmail.com <st...@gmail.com> #2
[Comment deleted]
en...@google.com <en...@google.com>
na...@google.com <na...@google.com> #3
commit aa2ed9e105504f21641d919b410c692981cfe386
Author: Narayan Kamath <narayan@google.com>
Date: Mon Apr 27 12:25:40 2015 +0100
Update JSR-166 to Revision 1.43
This is CVS HEAD as of Tue Mar 24 22:30:53 2015 UTC with
android specific patches applied. All android patches have
a clear "android-note" header.
- Most changes are documentation related.
- @hide tags have been applied to 1.8 APIs
- Atomic*Updater have been updated to use VMStack.* APIs.
bug: 20628776
bug:https://code.google.com/p/android/issues/detail?id=170073
Change-Id: Iead730222b4376f947e7dc05b0acaf608eccf238
Author: Narayan Kamath <narayan@google.com>
Date: Mon Apr 27 12:25:40 2015 +0100
Update JSR-166 to Revision 1.43
This is CVS HEAD as of Tue Mar 24 22:30:53 2015 UTC with
android specific patches applied. All android patches have
a clear "android-note" header.
- Most changes are documentation related.
- @hide tags have been applied to 1.8 APIs
- Atomic*Updater have been updated to use VMStack.* APIs.
bug: 20628776
bug:
Change-Id: Iead730222b4376f947e7dc05b0acaf608eccf238
Description
Please refer to the OpenJKD bug description
and
Basically, multithreaded put(), putIfAbsent(), putAll(), ... operations can fail to add a key/value pair if there are hash collisions on the added keys and the underlying datastructure needs to be resized at the time of the concurrent puts.
This is no wonder since Android API 21/22 uses the same CHM implementation that was used until OpenJDK 8 ea b120 (where the bug was fixed).
I could reproduce this bug on both API 21 and API 22 on a TrekStor SurfTab xintron i 7.0 (Intel st70408_4_coho). Fortunately it is quite easy to reproduce, using eiher the test that is provided in the JDK-8028564 link or the quite similar ConcurrentAssociateTest that was added as regression test. Both tests use Java 8 APIs, but it should be straightforward to do without on Android.
My version of the test (attached) closely follows the original ConcurrentAssociateTest, but you'd have to use a 3rd party library that emulates the Java 8 API to run it:
Note that I'll be away on leave from tomorrow so I won't be able to respond to furter inquiry for the next 10 days.