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
{{ message }}
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
Hi, I am a developer of the K framework. While we are trying to catch the data races inside the K framework with a dynamic race detector, the race detector also prints out some race reports inside Nailgun, which K uses heavily.
Here is one:
Data race on field java.util.HashMap.$state: {{{
Concurrent write in thread T15 (locks held: {Monitor@444ecc49})
----> at com.martiansoftware.nailgun.NGServer.getOrCreateStatsFor(NGServer.java:245)
- locked Monitor@444ecc49 at com.martiansoftware.nailgun.NGServer.getOrCreateStatsFor(NGServer.java:241)
at com.martiansoftware.nailgun.NGServer.nailStarted(NGServer.java:258)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:314)
T15 is created by T13
at com.martiansoftware.nailgun.NGSessionPool.take(NGSessionPool.java:85)
Concurrent read in thread T14 (locks held: {})
----> at com.martiansoftware.nailgun.NGServer.nailFinished(NGServer.java:269)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:332)
T14 is created by T13
at com.martiansoftware.nailgun.NGSessionPool.take(NGSessionPool.java:85)
}}}
It's basically saying that there are concurrent and conflicting accesses to NGServer.allNailStats, which is a HashMap, and that the allNailStats.get() operation is not properly synchronized. It seems the allNailStats.get() should also be wrapped inside a synchronization block.
Can you please confirm whether it is a false positive of the race detector? Thanks!
The text was updated successfully, but these errors were encountered:
denji
pushed a commit
to closure-gun/nailgun
that referenced
this issue
Aug 10, 2015
Hi, I am a developer of the K framework. While we are trying to catch the data races inside the K framework with a dynamic race detector, the race detector also prints out some race reports inside Nailgun, which K uses heavily.
Here is one:
It's basically saying that there are concurrent and conflicting accesses to
NGServer.allNailStats
, which is aHashMap
, and that theallNailStats.get()
operation is not properly synchronized. It seems theallNailStats.get()
should also be wrapped inside a synchronization block.Can you please confirm whether it is a false positive of the race detector? Thanks!
The text was updated successfully, but these errors were encountered: