Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

data race on field com.martiansoftware.nailgun.NGSession.done #65

Closed
yilongli opened this issue Aug 7, 2015 · 1 comment
Closed

data race on field com.martiansoftware.nailgun.NGSession.done #65

yilongli opened this issue Aug 7, 2015 · 1 comment

Comments

@yilongli
Copy link

yilongli commented Aug 7, 2015

Race report:

Data race on field com.martiansoftware.nailgun.NGSession.done: {{{
    Concurrent read in thread T62 (locks held: {Monitor@669c82b})
 ---->  at com.martiansoftware.nailgun.NGSession.nextSocket(NGSession.java:165)
        - locked Monitor@669c82b at com.martiansoftware.nailgun.NGSession.nextSocket(NGSession.java:163) 
        at com.martiansoftware.nailgun.NGSession.run(NGSession.java:186)
    T62 is created by T13
        at com.martiansoftware.nailgun.NGSessionPool.take(NGSessionPool.java:85)

    Concurrent write in thread T13 (locks held: {})
 ---->  at com.martiansoftware.nailgun.NGSession.shutdown(NGSession.java:133)
        at com.martiansoftware.nailgun.NGServer.run(NGServer.java:431)
    T13 is created by T1
        at org.kframework.kserver.KServerFrontEnd.run(KServerFrontEnd.java:72)
}}}

It seems that the assignment done = true at line 131 should be moved into the synchronization block below.

@sbalabanov-zz
Copy link
Contributor

Closing all issues older than 6 months; please reopen if it is still relevant

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants