Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7284

JVM crash for rocksdb for read/write after close

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.0
    • None

    Description

      During integration test of Ozon, its randomly observed that JVM crashes with rocks db stack.
      Its observed if some of thread in Recon which is processing FCR/ICR report, jvm crashed with rocks db stack.

      Solution Proposed:
      1. every DB access in RocksDatabase,

      • isClosed() check, if closed, then throw IOException
      • counter increment on entry and decrement on exit of method
        2. While RocksDB close,
      • set isClosed to true
      • keep check for counter if it reaches to "0", with retry every milli second
      • Another strategy of force close after 5 second.

      This will provide performance as no lock.

      Alternate solution (will have performance issue due to frequent lock/unlock):
      1. every DB access,

      • take a read lock and
      • check for isClosed(), if closed, throw IOException
        2. while RocksDB close,
      • take a write lock
      • set isClosed and close the DB
        This solution can have performance bottleneck as frequent Read lock / unlock

      Attachments

        Issue Links

          Activity

            People

              sumitagrawl Sumit Agrawal
              sumitagrawl Sumit Agrawal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: