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

Memory leak caused by using marker names based on non static session id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.23, 1.2.8, 1.3.8, 1.4
    • core
    • None

    Description

      SessionDelegate creates marker based on session id. As session id is variable such markers can get accumulated over time resulting in memory leak [1]

       private static <T> void logOperationDetails(ContentSession session, SessionOperation<T> ops) {
              if (readOperationLogger.isTraceEnabled()
                      || writeOperationLogger.isTraceEnabled()
                      || auditLogger.isDebugEnabled()) {
                  Marker sessionMarker = MarkerFactory.getMarker(session.toString());
                  Logger log = ops.isUpdate() ? writeOperationLogger : readOperationLogger;
                  log.trace(sessionMarker, "[{}] {}", session, ops);
      

      Workaround

      Untill we fix it in code user should just set log level to info for following loggers

      • org.apache.jackrabbit.oak.audit
      • org.apache.jackrabbit.oak.jcr.operations.reads

      [1] http://stackoverflow.com/q/31524084/1035417

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: