-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
None
-
generic
-
generic
The code in BasicDirectoryModel.java acquires synchronization objects in different order (once acquires DoChangeContents.this and then fileCache, another time acquires fileCache and then DoChangeContents.this).
Acquiring synchronization objects in different order can cause circular wait (deadlock).
Here is the first order: (1) first acquire DoChangeContents.this and then fileCache:
enter public method run() at line 473
acquire synchronization on DoChangeContents.this at entry to run() because run() is a synchronized method --- see line 473
acquire synchronization on fileCache at line 477
Here is the second order: (2) first acquire fileCache and then DoChangeContents.this:
enter public method renameFile() at line 155
acquire synchronization on fileCache at line 156
call validateFileCache() at line 158
call cancelRunnables() at line 135
call cancelRunnables(Vector) at line 346
call cancel() at line 341
acquire synchronization on DoChangeContents.this at entry to cancel() because cancel() is a synchronized method --- see line 469
Acquiring synchronization objects in different order can cause circular wait (deadlock).
Here is the first order: (1) first acquire DoChangeContents.this and then fileCache:
enter public method run() at line 473
acquire synchronization on DoChangeContents.this at entry to run() because run() is a synchronized method --- see line 473
acquire synchronization on fileCache at line 477
Here is the second order: (2) first acquire fileCache and then DoChangeContents.this:
enter public method renameFile() at line 155
acquire synchronization on fileCache at line 156
call validateFileCache() at line 158
call cancelRunnables() at line 135
call cancelRunnables(Vector) at line 346
call cancel() at line 341
acquire synchronization on DoChangeContents.this at entry to cancel() because cancel() is a synchronized method --- see line 469
- duplicates
-
JDK-8238169 BasicDirectoryModel getDirectories and DoChangeContents.run can deadlock
-
- Resolved
-