Application classloaders leaked by custom JCA provider reference in sun.security.jca.ProviderList

Solution Unverified - Updated -

Issue

  • We're experiencing a metaspace leak across application redeployments. A heap dump shows classloaders persisted by references from the sun.security.jca.ProviderList to a custom JCA provider in the application:
Class Name                                                                       | Ref. Objects | Shallow Heap | Ref. Shallow Heap | Retained Heap
---------------------------------------------------------------------------------------------------------------------------------------------------
class sun.security.jca.Providers @ 0x663b96b98 System Class                      |            1 |           24 |                88 |           248
'- providerList sun.security.jca.ProviderList @ 0x674178708                      |            1 |           24 |                88 |       121,752
   '- configs sun.security.jca.ProviderConfig[39] @ 0x674178720                  |            1 |          176 |                88 |       121,704
      '- [38] sun.security.jca.ProviderConfig @ 0x6741787d0                      |            1 |           32 |                88 |       121,528
         '- provider my.custom.provider.Class @ 0x6741787f0                   |            1 |           96 |                88 |       121,496
            '- <class> class my.custom.provider.Class @ 0x674225980           |            1 |           40 |                88 |         7,984
               '- <classloader> org.jboss.modules.ModuleClassLoader @ 0x673fe5928|            1 |           88 |                88 |     2,055,248

Environment

  • JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content