Bug 58381 - Data race inside non-thread-safe LinkedList org.apache.catalina.tribes.transport.nio.NioReceiver.events
Summary: Data race inside non-thread-safe LinkedList org.apache.catalina.tribes.transp...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-12 15:58 UTC by Yilong Li
Modified: 2015-09-15 11:14 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yilong Li 2015-09-12 15:58:05 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field java.util.LinkedList.$state: {{{
    Concurrent write in thread T74 (locks held: {Monitor@3936680d, Monitor@7bae8321})
 ---->  at org.apache.catalina.tribes.transport.nio.NioReceiver.addEvent(NioReceiver.java:152)
        - locked Monitor@7bae8321 at org.apache.catalina.tribes.transport.nio.NioReceiver.addEvent(NioReceiver.java:151)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.registerForRead(NioReplicationTask.java:271)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:195)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:102)
        - locked Monitor@3936680d at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:n/a)
    T74 is created by T24
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T24 (locks held: {})
 ---->  at org.apache.catalina.tribes.transport.nio.NioReceiver.events(NioReceiver.java:160)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:264)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:419)
    T24 is created by T18
        at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:91)
}}}
Comment 1 Mark Thomas 2015-09-15 11:14:48 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.