You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing to report two race issues on use of ConcurrentHashMap. The issues are reported by our tool in an automatic way. Although manually confirmed, they would be false positives, given we do not know the specification of the program. We would very appreciate if you could check below for details and confirm with us whether they are real problems. For more information, please refer to our website: http://sav.sutd.edu.sg/?page_id=2845
File:
mrniko/redisson/src/main/java/org/redisson/RedissonCountDownLatch.java
Location: Line (66, 120)
Description:
Line 120 is in the synchronized block on "ENTRIES". If the intention is to guarantee exclusive access for the !containsKey checking on "ENTRIES" and to ensure the atomicity of the checking and unsubscription (line 120,121), then the write operations on "ENTRIES" in line 66, 115, 117, 136 may break this. Relying on the ConcurrentHashMap to ensure exclusive access is dangerous since ConcurrentHashMap has no guarantee of exclusive access.
File:
mrniko/redisson/src/main/java/org/redisson/RedissonLock.java
Location: Line (75, 113)
Description:
Same as above.
The text was updated successfully, but these errors were encountered:
Hi! I have a look at those lines but didn't find nothing extraordinary there. Sync sections are used to avoid parallel execution of subscribe and unsubscribe commands. RedissonLock and RedissonCountDownLatch have concurrent tests also and they always pass it.
As for lock-free implementation of entry's resources counter managed by release/aquire methods it's done a little bit ugly with while statements and so on... Anyway I had refactored this code. Thank you for attracting my attention to this code.
I found your project is very impressive. Because concurrent issues scanning is very important thing for all kind of projects not only open-source.
Hi, Developers of mrniko/redisson,
I am writing to report two race issues on use of ConcurrentHashMap. The issues are reported by our tool in an automatic way. Although manually confirmed, they would be false positives, given we do not know the specification of the program. We would very appreciate if you could check below for details and confirm with us whether they are real problems. For more information, please refer to our website: http://sav.sutd.edu.sg/?page_id=2845
File:
mrniko/redisson/src/main/java/org/redisson/RedissonCountDownLatch.java
Location: Line (66, 120)
Description:
Line 120 is in the synchronized block on "ENTRIES". If the intention is to guarantee exclusive access for the !containsKey checking on "ENTRIES" and to ensure the atomicity of the checking and unsubscription (line 120,121), then the write operations on "ENTRIES" in line 66, 115, 117, 136 may break this. Relying on the ConcurrentHashMap to ensure exclusive access is dangerous since ConcurrentHashMap has no guarantee of exclusive access.
File:
mrniko/redisson/src/main/java/org/redisson/RedissonLock.java
Location: Line (75, 113)
Description:
Same as above.
The text was updated successfully, but these errors were encountered: