Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2077

OutOfMemoryError: Metaspace after several client calls

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 3.0.0.Beta5
    • 3.0.0.Alpha13
    • Management
    • None

      I saw some java.lang.OutOfMemoryError: Metaspace in our AS-Testsuite runs. Here is a really simple (and clumsy) reproducer for the leak.

      repreduce

      # lower the metaspace size in jboss-eap-7.1/bin/standalone.conf to 
      # -XX:MaxMetaspaceSize=64m
      # start standalone
      ./jboss-eap-7.1/bin/standalone.sh
      # run the following loop (any other mgmt operation should serve the same)
      for i in `seq 1 1000` ; do ./jboss-eap-7.1/bin/jboss-cli.sh -c :read-resource ; done
      # wait for OOM
      
      14:24:29,629 WARN  [org.jboss.modules] (MSC service thread 1-3) Failed to define class io.undertow.security.impl.SimpleNonceManager in Module "io.undertow.core:main" from local module loader @629f0666 (finder: local module finder @1bc6a36e (roots: /home/pkremens/workspace/jboss-eap-7.1/modules,/home/pkremens/workspace/jboss-eap-7.1/modules/system/layers/base)): java.lang.OutOfMemoryError: Metaspace
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      	at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:359)
      	at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:438)
      	at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:275)
      	at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:79)
      	at org.jboss.modules.Module.loadModuleClass(Module.java:612)
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:377)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:365)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:94)
      	at org.jboss.as.domain.http.server.security.LogoutHandler.<init>(LogoutHandler.java:76)
      	at org.jboss.as.domain.http.server.ManagementHttpServer.addLogoutHandler(ManagementHttpServer.java:316)
      	at org.jboss.as.domain.http.server.ManagementHttpServer.setupOpenListener(ManagementHttpServer.java:395)
      	at org.jboss.as.domain.http.server.ManagementHttpServer.create(ManagementHttpServer.java:271)
      	at org.jboss.as.domain.http.server.ManagementHttpServer.access$2400(ManagementHttpServer.java:107)
      	at org.jboss.as.domain.http.server.ManagementHttpServer$Builder.build(ManagementHttpServer.java:589)
      	at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:292)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1963)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1896)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

              tomazcerar Tomaž Cerar (Inactive)
              pkremens@redhat.com Petr Kremensky (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: