Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-6317

authentication and authorization events can get recorded to system feeds synchronously after EventSubscriberHost thread pool is exhausted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.6.2, 2.7, 2.8
    • Fix Version/s: None
    • Component/s: Security
    • Labels:
      None

      Description

      The attached thread dump apparently shows qtp threads trying to acquire locks on the timeline index writer so they can record auth events. This seems like pointless overhead processing requests.


      From another customer report ( not images and attachments here )

      Example fsync operation from Lucene which can backup all these threads:

      nxevthost-1-thread-2584073 id=2866743 state=RUNNABLE (running in native)
          at java.io.FileDescriptor.sync(Native Method)
          at org.apache.lucene.store.FSDirectory.fsync(FSDirectory.java:504)
          at org.apache.lucene.store.FSDirectory.sync(FSDirectory.java:336)
          at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4557)
          at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3414)
          at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3485)
          at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3467)
          at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3451)
          at org.sonatype.timeline.internal.DefaultTimelineIndexer.addAll(DefaultTimelineIndexer.java:186)
          at org.sonatype.timeline.internal.DefaultTimeline$1.doIt(DefaultTimeline.java:232)
          at org.sonatype.timeline.internal.DefaultTimeline$1.doIt(DefaultTimeline.java:227)
          at org.sonatype.timeline.internal.DefaultTimeline.doShared(DefaultTimeline.java:288)
          at org.sonatype.timeline.internal.DefaultTimeline.addToIndexer(DefaultTimeline.java:226)
          at org.sonatype.timeline.internal.DefaultTimeline.add(DefaultTimeline.java:182)
          at org.sonatype.nexus.timeline.DefaultNexusTimeline.add(DefaultNexusTimeline.java:157)
          at org.sonatype.nexus.feeds.DefaultFeedRecorder.addToTimeline(DefaultFeedRecorder.java:425)
          at org.sonatype.nexus.feeds.DefaultFeedRecorder.addAuthcAuthzEvent(DefaultFeedRecorder.java:339)
          at org.sonatype.nexus.feeds.record.NexusAuthenticationEventInspector.inspect(NexusAuthenticationEventInspector.java:85)
          at org.sonatype.nexus.events.DefaultEventInspectorHost$EventInspectorHandler.run(DefaultEventInspectorHost.java:195)
          at org.sonatype.nexus.threads.MDCAwareRunnable.run(MDCAwareRunnable.java:42)
          at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
          at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:722)
      
          Locked synchronizers: count = 1
            - java.util.concurrent.ThreadPoolExecutor$Worker@1f4bb05d
      
      

      Example Blocked thread:

      nxevthost-1-thread-2584153 id=2866823 state=BLOCKED
          - waiting to lock <0x720ee406> (a java.lang.Object)
           owned by nxevthost-1-thread-2584073 id=2866743
          at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3476)
          at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3467)
          at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3451)
          at org.sonatype.timeline.internal.DefaultTimelineIndexer.addAll(DefaultTimelineIndexer.java:186)
          at org.sonatype.timeline.internal.DefaultTimeline$1.doIt(DefaultTimeline.java:232)
          at org.sonatype.timeline.internal.DefaultTimeline$1.doIt(DefaultTimeline.java:227)
          at org.sonatype.timeline.internal.DefaultTimeline.doShared(DefaultTimeline.java:288)
          at org.sonatype.timeline.internal.DefaultTimeline.addToIndexer(DefaultTimeline.java:226)
          at org.sonatype.timeline.internal.DefaultTimeline.add(DefaultTimeline.java:182)
          at org.sonatype.nexus.timeline.DefaultNexusTimeline.add(DefaultNexusTimeline.java:157)
          at org.sonatype.nexus.feeds.DefaultFeedRecorder.addToTimeline(DefaultFeedRecorder.java:425)
          at org.sonatype.nexus.feeds.DefaultFeedRecorder.addAuthcAuthzEvent(DefaultFeedRecorder.java:339)
          at org.sonatype.nexus.feeds.record.NexusAuthenticationEventInspector.inspect(NexusAuthenticationEventInspector.java:85)
          at org.sonatype.nexus.events.DefaultEventInspectorHost$EventInspectorHandler.run(DefaultEventInspectorHost.java:195)
          at org.sonatype.nexus.threads.MDCAwareRunnable.run(MDCAwareRunnable.java:42)
          at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
          at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:722)
      
          Locked synchronizers: count = 1
            - java.util.concurrent.ThreadPoolExecutor$Worker@153e67b6
      
      

        Attachments

          Activity

            People

            • Assignee:
              plynch Peter Lynch
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Peter Lynch
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: