Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72946

Possible thread leak from saml plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • saml-plugin
    • Jenkins 2.401.1-lts (jenkins/jenkins:2.401.1-lts docker image)
      SAML Plugin 4.418.vdfa_7489a_b_a_2d
      Ubuntu 20.04.6 LTS

      My Jenkins installation uses the SAML plugin to delegate authentication to my IDP (Okta).

      i've noticed that 5 months ago, the jvm_threads_current in my system had suddenly ballooned to 1400+ threads from the previous average of ~400 threads.

      I took a threadDump to see what was causing the issue and found nearly 1200 threads of

      Timer for org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver
      

      in TIMED_WAITING state.

       

      also seeing a lot of logs regarding the FilesystemMetadataResolver 

      024-04-01 17:54:32.557+0000 [id=39251126]	INFO	o.o.s.m.r.i.AbstractReloadingMetadataResolver#processNonExpiredMetadata: Metadata Resolver FilesystemMetadataResolver org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver: New metadata successfully loaded for '/var/jenkins_home/saml-sp-metadata.xml'
      2024-04-01 17:54:32.557+0000 [id=39251126]	INFO	o.o.s.m.r.i.AbstractReloadingMetadataResolver#refresh: Metadata Resolver FilesystemMetadataResolver org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver: Next refresh cycle for metadata provider '/var/jenkins_home/saml-sp-metadata.xml' will occur on '2024-04-01T20:54:32.555055Z' ('2024-04-01T20:54:32.555055Z[Etc/UTC]' local time)
      2024-04-01 17:54:32.641+0000 [id=145389598]	INFO	o.o.s.m.r.i.AbstractReloadingMetadataResolver#processNonExpiredMetadata: Metadata Resolver FilesystemMetadataResolver org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver: New metadata successfully loaded for '/var/jenkins_home/saml-sp-metadata.xml'
      2024-04-01 17:54:32.641+0000 [id=145389598]	INFO	o.o.s.m.r.i.AbstractReloadingMetadataResolver#refresh: Metadata Resolver FilesystemMetadataResolver org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver: Next refresh cycle for metadata provider '/var/jenkins_home/saml-sp-metadata.xml' will occur on '2024-04-01T20:54:32.639186Z' ('2024-04-01T20:54:32.639186Z[Etc/UTC]' local time)
      2024-04-01 17:54:39.014+0000 [id=260446046]	INFO	o.o.s.m.r.i.AbstractReloadingMetadataResolver#processNonExpiredMetadata: Metadata Resolver FilesystemMetadataResolver org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver: New metadata successfully loaded for '/var/jenkins_home/saml-sp-metadata.xml'
      2024-04-01 17:54:39.014+0000 [id=260446046]	INFO	o.o.s.m.r.i.AbstractReloadingMetadataResolver#refresh: Metadata Resolver FilesystemMetadataResolver org.opensaml.saml.metadata.resolver.impl.FilesystemMetadataResolver: Next refresh cycle for metadata provider '/var/jenkins_home/saml-sp-metadata.xml' will occur on '2024-04-01T20:54:39.012191Z' ('2024-04-01T20:54:39.012191Z[Etc/UTC]' local time)
      

      is this normal? this is not currently having any visible effects on the system but i am afraid it could lead to a larger problem in the future.

      I'm posting it as a bug in case it's there is actually a thread leak in the SAML plugin.

      Please let me know if I can provide any other information.

      Thanks!

            ifernandezcalvo Ivan Fernandez Calvo
            bread47 bread
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: