Bug 58386 - Data race on fields org.apache.catalina.tribes.io.ObjectReader.accessed & lastAccess
Data race on fields org.apache.catalina.tribes.io.ObjectReader.accessed & las...
Status: RESOLVED FIXED
Product: Tomcat 8
Classification: Unclassified
Component: Catalina
8.0.x-trunk
PC Linux
: P2 normal (vote)
: ----
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2015-09-12 16:21 UTC by Yilong Li
Modified: 2015-09-16 13:41 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 16:21:13 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field org.apache.catalina.tribes.io.ObjectReader.accessed: {{{
    Concurrent write in thread T93 (locks held: {Monitor@8a841fe, Monitor@8a9a01a})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.finish(ObjectReader.java:82)
        - locked Monitor@8a9a01a at org.apache.catalina.tribes.io.ObjectReader.finish(ObjectReader.java:n/a)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.registerForRead(NioReplicationTask.java:246)
        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@8a841fe at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:n/a)
    T93 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.io.ObjectReader.isAccessed(ObjectReader.java:87)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.socketTimeouts(NioReceiver.java:215)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:265)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:419)
    T24 is created by T19
        at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:91)
}}} 

Data race on field org.apache.catalina.tribes.io.ObjectReader.lastAccess: {{{
    Concurrent read in thread T23 (locks held: {})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.getLastAccess(ObjectReader.java:155)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.socketTimeouts(NioReceiver.java:214)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:265)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:419)
    T23 is created by T19
        at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:91)

    Concurrent write in thread T91 (locks held: {Monitor@6514fc67})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.setLastAccess(ObjectReader.java:163)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:153)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:102)
        - locked Monitor@6514fc67 at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:n/a)
    T91 is created by T23
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Data race on field org.apache.catalina.tribes.io.ObjectReader.lastAccess: {{{
    Concurrent write in thread T91 (locks held: {Monitor@6514fc67, Monitor@69f56f6c})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.access(ObjectReader.java:78)
        - locked Monitor@69f56f6c at org.apache.catalina.tribes.io.ObjectReader.access(ObjectReader.java:n/a)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:154)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:102)
        - locked Monitor@6514fc67 at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:n/a)
    T91 is created by T23
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T23 (locks held: {})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.getLastAccess(ObjectReader.java:155)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.socketTimeouts(NioReceiver.java:214)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:265)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:419)
    T23 is created by T19
        at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:91)
}}} 

Data race on field org.apache.catalina.tribes.io.ObjectReader.lastAccess: {{{
    Concurrent write in thread T211 (locks held: {Monitor@216a833f, Monitor@17a455ea})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.finish(ObjectReader.java:83)
        - locked Monitor@17a455ea at org.apache.catalina.tribes.io.ObjectReader.finish(ObjectReader.java:n/a)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.cancelKey(NioReplicationTask.java:281)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.remoteEof(NioReplicationTask.java:240)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:189)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:102)
        - locked Monitor@216a833f at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:n/a)
    T211 is created by T166
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T166 (locks held: {})
 ---->  at org.apache.catalina.tribes.io.ObjectReader.getLastAccess(ObjectReader.java:155)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.socketTimeouts(NioReceiver.java:214)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:265)
        at org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:419)
    T166 is created by T157
        at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:91)
}}}
Comment 1 Mark Thomas 2015-09-16 13:41:24 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.