Skip to content

fix: ConcurrentModificationException when accessing DFS referrals - #85

Open
ishmeister wants to merge 1 commit into
codelibs:mainfrom
Ohalo-Ltd:contrib/fix-dfs-referral-concurrency
Open

fix: ConcurrentModificationException when accessing DFS referrals#85
ishmeister wants to merge 1 commit into
codelibs:mainfrom
Ohalo-Ltd:contrib/fix-dfs-referral-concurrency

Conversation

@ishmeister

Copy link
Copy Markdown

SmbTreeImpl caches DFS referrals in a plain HashMap. getTreeReferral reads it by iterating the key set to find the entry whose path prefix matches the request, and setTreeReferral writes to it with put.

Neither is synchronized, and a tree connection is shared by every thread that works on the same share, so one thread can iterate the map while another caches a referral into it. The iteration then fails with ConcurrentModificationException.

Refs:

Fixes java.util.ConcurrentModificationException when accessing
DFS referral data.

Refs:
- codelibs#76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant