Derby
  1. Derby
  2. DERBY-3785

Race conditions on Field mon_numWritesToLog in class org/apache/derby/impl/store/raw/log/LogAccessFile

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.3.3.0
    • Fix Version/s: None
    • Component/s: Store
    • Environment:
      Linux/X86
    • Urgency:
      Low

      Description

      Our dynamic race detection tool found one race condition in derby 10.4. Even that code is for debugging/statistics, we still believe that it is a bug, and should be fixed.

      Data Race 8 : 14109 : org/apache/derby/impl/store/raw/log/LogAccessFile : mon_numWritesToLog
      Thread DRDAConnThread_12 id: 20 : WRITE
      Lock Set : [ 966(org/apache/derby/impl/jdbc/EmbedConnection30), ]

      [org.apache.derby.impl.store.raw.log.LogAccessFile : writeToLog : 805]
      [org.apache.derby.impl.store.raw.log.LogAccessFile : flushDirtyBuffers : 534]
      [org.apache.derby.impl.store.raw.log.LogToFile : flush : 4015]
      [org.apache.derby.impl.store.raw.log.LogToFile : flush : 1777]
      [org.apache.derby.impl.store.raw.data.BaseDataFileFactory : flush : 1369]
      [org.apache.derby.impl.store.raw.data.BaseDataFileFactory : addContainer : 862]^M
      [org.apache.derby.impl.store.raw.xact.Xact : addContainer : 1329]
      [org.apache.derby.impl.store.access.heap.Heap : create : 274]
      [org.apache.derby.impl.store.access.heap.HeapConglomerateFactory : createConglomerate : 195]
      [org.apache.derby.impl.store.access.RAMTransaction : createConglomerate : 826]
      [org.apache.derby.impl.sql.execute.CreateTableConstantAction : executeConstantAction : 201]
      [org.apache.derby.impl.sql.execute.MiscResultSet : open : 64]
      [org.apache.derby.impl.sql.GenericPreparedStatement : execute : 372]
      [org.apache.derby.impl.jdbc.EmbedStatement : executeStatement : 1235]
      [org.apache.derby.impl.jdbc.EmbedStatement : execute : 625]
      [org.apache.derby.impl.jdbc.EmbedStatement : executeUpdate : 175]
      [org.apache.derby.impl.drda.DRDAConnThread : parseEXCSQLIMM : 4940]
      [org.apache.derby.impl.drda.DRDAConnThread : processCommands : 739]
      [org.apache.derby.impl.drda.DRDAConnThread : run : 279]

      Thread DRDAConnThread_9 id: 16 : READ
      Lock Set : [ 968(org/apache/derby/impl/jdbc/EmbedConnection30), ]
      Vector Clock : [ 0 2 0 0 0 0 0 0 0 0 0 0 0 0 3 3 6 ]

      [org.apache.derby.impl.store.raw.log.LogAccessFile : writeToLog : 805]
      [org.apache.derby.impl.store.raw.log.LogAccessFile : flushDirtyBuffers : 534]
      [org.apache.derby.impl.store.raw.log.LogToFile : flush : 4015]
      [org.apache.derby.impl.store.raw.log.LogToFile : flush : 1777]
      [org.apache.derby.impl.store.raw.data.BaseDataFileFactory : flush : 1369]
      [org.apache.derby.impl.store.raw.data.BaseDataFileFactory : addContainer : 862]
      [org.apache.derby.impl.store.raw.xact.Xact : addContainer : 1329]
      [org.apache.derby.impl.store.access.heap.Heap : create : 274]
      [org.apache.derby.impl.store.access.heap.HeapConglomerateFactory : createConglomerate : 195]
      [org.apache.derby.impl.store.access.RAMTransaction : createConglomerate : 826]
      [org.apache.derby.impl.sql.execute.CreateTableConstantAction : executeConstantAction : 201]
      [org.apache.derby.impl.sql.execute.MiscResultSet : open : 64]
      [org.apache.derby.impl.sql.GenericPreparedStatement : execute : 372]
      [org.apache.derby.impl.jdbc.EmbedStatement : executeStatement : 1235]
      [org.apache.derby.impl.jdbc.EmbedStatement : execute : 625]
      [org.apache.derby.impl.jdbc.EmbedStatement : executeUpdate : 175]
      [org.apache.derby.impl.drda.DRDAConnThread : parseEXCSQLIMM : 4940]
      [org.apache.derby.impl.drda.DRDAConnThread : processCommands : 739]
      [org.apache.derby.impl.drda.DRDAConnThread : run : 279]

      if (SanityManager.DEBUG)

      { mon_numWritesToLog++; <-- line 805, mon_numBytesToLog += len; }

        Activity

        Gavin made changes -
        Workflow jira [ 12435634 ] Default workflow, editable Closed status [ 12798958 ]
        Mike Matrigali made changes -
        Summary Race conditions on Field mon_numWritesToLog in class org/apache/derby/impl/store/raw/log/LogAccessFile
        Race conditions on Field mon_numWritesToLog in class org/apache/derby/impl/store/raw/log/LogAccessFile
        Labels derby_triage10_5_2 derby_triage10_5_2 derby_triage10_9
        Hide
        Mike Matrigali added a comment -

        Triaged for 10.9, no changes.

        Show
        Mike Matrigali added a comment - Triaged for 10.9, no changes.
        Kathey Marsden made changes -
        Affects Version/s 10.3.3.0 [ 12313142 ]
        Kathey Marsden made changes -
        Field Original Value New Value
        Labels derby_triage10_5_2
        Yao Qi created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Yao Qi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development