Details
-
Bug
-
Resolution: Fixed
-
P3
-
8u301, 11.0.10, 15, 17, 21, 22, 23
-
b19
-
b16
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8331324 | 22.0.2 | Alexey Ivanov | P3 | Resolved | Fixed | b05 |
JDK-8331482 | 21.0.5-oracle | Alexey Ivanov | P3 | Resolved | Fixed | b01 |
JDK-8333415 | 21.0.5 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8333253 | 17.0.13-oracle | Alexey Ivanov | P3 | Resolved | Fixed | b01 |
JDK-8334000 | 17.0.13 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8333285 | 11.0.25-oracle | Alexey Ivanov | P3 | Resolved | Fixed | b01 |
JDK-8334311 | 11.0.25 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8333534 | 8u431 | Alexey Ivanov | P3 | Resolved | Fixed | b01 |
Description
First, the method checks if there's an existing filesLoader and interrupts it.
Then it creates a new filesLoader.
The above is done without any synchronisation, which means if the method is called concurrently by several threads, several fileLoader threads could be started concurrently. If it happens, only the latest one may be interrupted.
A similar problem exists in invalidateFileCache, access to filesLoader field isn't protected by a lock.
BasicDirectoryModel.FilesLoader.cancelRunnables has a data race too. The 'runnable' field is a volatile field, but it's not enough.
It is possible that runnable is not null when the condition is checked but becomes null in the body of the if statement. It could be set a new value too.
Attachments
Issue Links
- backported by
-
JDK-8331324 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8331482 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8333253 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8333285 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8333415 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8333534 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8334000 Race in BasicDirectoryModel.validateFileCache
- Resolved
-
JDK-8334311 Race in BasicDirectoryModel.validateFileCache
- Resolved
- duplicates
-
JDK-8332000 BasicDirectoryModel/ConcurrentModification.java fails with Out of Memory
- Closed
- relates to
-
JDK-8238169 BasicDirectoryModel getDirectories and DoChangeContents.run can deadlock
- Resolved
-
JDK-8331142 Add test for number of loader threads in BasicDirectoryModel
- Resolved
-
JDK-8240690 Race condition between EDT and BasicDirectoryModel.FilesLoader.run0()
- Resolved
-
JDK-8323670 A few client tests intermittently throw ConcurrentModificationException
- Resolved
-
JDK-8307091 A few client tests intermittently throw ConcurrentModificationException
- Closed
- links to
-
Commit openjdk/jdk11u-dev/2e4179b9
-
Commit openjdk/jdk17u-dev/bc5639a8
-
Commit openjdk/jdk21u-dev/4b3df73b
-
Commit openjdk/jdk22u/e6ba0ee4
-
Commit openjdk/jdk/e66788c1
-
Review openjdk/jdk11u-dev/2768
-
Review openjdk/jdk17u-dev/2539
-
Review openjdk/jdk17u-dev/2558
-
Review openjdk/jdk21u-dev/633
-
Review openjdk/jdk22u/164
-
Review openjdk/jdk/18111