Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6500

NRTIndex leaks file handles due to unclosed IndexReader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6.0
    • 1.7.6, 1.6.4, 1.8.0
    • lucene
    • None

    Description

      On some setups under stress it has been seen that NRTIndex leaks file handles over time.

      Checking with lsof indicates that more than 3 nrt folders per index are being used. However per design there can be max 3 and after system is not in use max 1 should be present.

      $ lsof -p 9550 | grep '/nrt' | gawk 'match($0, /.*crx-quickstart\/repository\/index\/(.*?)\/\_.*$/, m) { print m[1]; }' | sort | uniq
      cqPageLucene-1501065263331/nrt1501065335930
      cqPageLucene-1501065263331/nrt1501065374667
      cqPageLucene-1501065263331/nrt1501065392492
      cqPageLucene-1501065263331/nrt1501065440955
      cqPageLucene-1501065263331/nrt1501065473286
      cqPageLucene-1501065263331/nrt1501065507345
      slingeventJob-1501065263330/nrt1501065356975
      slingeventJob-1501065263330/nrt1501065373229
      slingeventJob-1501065263330/nrt1501065394142
      slingeventJob-1501065263330/nrt1501065440953
      slingeventJob-1501065263330/nrt1501065473282
      slingeventJob-1501065263330/nrt1501065507342
      versionStoreIndex-1501065263332/nrt1501065335925
      versionStoreIndex-1501065263332/nrt1501065366781
      versionStoreIndex-1501065263332/nrt1501065392490
      versionStoreIndex-1501065263332/nrt1501065441232
      versionStoreIndex-1501065263332/nrt1501065473285
      

      Further actually checking index folder indicates that those folder are actually deleted. So some where the file handle is still referring them.

      Attachments

        1. OAK-6500-v1.patch
          2 kB
          Chetan Mehrotra
        2. OAK-6500-approach-a-v1.patch
          3 kB
          Chetan Mehrotra
        3. OAK-6500-ref-count-v1.patch
          64 kB
          Chetan Mehrotra

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: