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

WFLYCC0034: Closing leaked controller client

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Hide

      Reproducer:

      1. using ibm java. In my case

      [mchoma@localhost tests-ldap-kerberos-eap7]$ java -version
      java version "1.8.0"
      Java(TM) SE Runtime Environment (build pxa6480sr3fp10-20160720_02(SR3fp10))
      IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 20160719_312156 (JIT enabled, AOT enabled)
      J9VM - R28_Java8_SR3_20160719_1144_B312156
      JIT  - tr.r14.java_20160629_120284.01
      GC   - R28_Java8_SR3_20160719_1144_B312156_CMPRSS
      J9CL - 20160719_312156)
      JCL - 20160719_01 based on Oracle jdk8u101-b13
      

      2. setting <startup-timeout>1</startup-timeout>

                          <plugin>
                              <groupId>org.wildfly.plugins</groupId>
                              <artifactId>wildfly-maven-plugin</artifactId>
                              <version>${version.wildfly-maven-plugin}</version>
                              <executions>
                                  <execution>
                                      <id>add-native-interface-to-jboss</id>
                                      <phase>process-test-sources</phase>
                                      <goals>
                                          <goal>start</goal>
                                          <goal>execute-commands</goal>
                                          <goal>shutdown</goal>
                                      </goals>
                                      <configuration>
                                          <jbossHome>${jboss.home}</jbossHome>
                                          <startup-timeout>1</startup-timeout>
                                          <execute-commands>
                                              <scripts>
                                                  <script>src/test/resources/add-native-interface.cli</script>
                                              </scripts>
                                          </execute-commands>
                                      </configuration>
                                  </execution>
                              </executions>
                          </plugin>
      
      Show
      Reproducer: 1. using ibm java. In my case [mchoma@localhost tests-ldap-kerberos-eap7]$ java -version java version "1.8.0" Java(TM) SE Runtime Environment (build pxa6480sr3fp10-20160720_02(SR3fp10)) IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 20160719_312156 (JIT enabled, AOT enabled) J9VM - R28_Java8_SR3_20160719_1144_B312156 JIT - tr.r14.java_20160629_120284.01 GC - R28_Java8_SR3_20160719_1144_B312156_CMPRSS J9CL - 20160719_312156) JCL - 20160719_01 based on Oracle jdk8u101-b13 2. setting <startup-timeout>1</startup-timeout> <plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-maven-plugin</artifactId> <version>${version.wildfly-maven-plugin}</version> <executions> <execution> <id>add-native-interface-to-jboss</id> <phase>process-test-sources</phase> <goals> <goal>start</goal> <goal>execute-commands</goal> <goal>shutdown</goal> </goals> <configuration> <jbossHome>${jboss.home}</jbossHome> <startup-timeout>1</startup-timeout> <execute-commands> <scripts> <script>src/test/resources/add-native-interface.cli</script> </scripts> </execute-commands> </configuration> </execution> </executions> </plugin>

      We are intermittently getting "WFLYCC0034: Closing leaked controller client" from RemotingModelControllerClient#finalize method.

      I wonder, isn't implementation of RemotingModelControllerClient#finalize() method [1] example of dangerous "safety net" implementation discussed in presentation "JVM finalize pitfalls" [2] ?

      Reproducer:
      1. using ibm java 1.8
      2. setting <startup-timeout>1</startup-timeout>

      [1] https://github.com/wildfly/wildfly-core/blob/master/controller-client/src/main/java/org/jboss/as/controller/client/impl/RemotingModelControllerClient.java#L147
      [2] https://www.youtube.com/watch?v=UrGP6pfb0H8
      [3]

      05:54:10 Aug 16, 2016 5:54:10 AM org.jboss.as.controller.client.impl.RemotingModelControllerClient finalize
      05:54:10 WARN: WFLYCC0034: Closing leaked controller client
      05:54:10 WFLYCC0030: Allocation stack trace:
      05:54:10 	at java.lang.Thread.getStackTrace(Thread.java:1552)
      05:54:10 	at org.jboss.as.controller.client.impl.RemotingModelControllerClient.<init>(RemotingModelControllerClient.java:74)
      05:54:10 	at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:567)
      05:54:10 	at org.wildfly.plugin.common.ManagementClient.<init>(ManagementClient.java:37)
      05:54:10 	at org.wildfly.plugin.common.AbstractServerConnection.createClient(AbstractServerConnection.java:126)
      05:54:10 	at org.wildfly.plugin.server.StartMojo.execute(StartMojo.java:269)
      05:54:10 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      05:54:10 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      05:54:10 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      05:54:10 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      05:54:10 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      05:54:10 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      05:54:10 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      05:54:10 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      05:54:10 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
      05:54:10 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      05:54:10 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      05:54:10 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
      05:54:10 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
      05:54:10 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      05:54:10 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      05:54:10 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      05:54:10 	at java.lang.reflect.Method.invoke(Method.java:498)
      05:54:10 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      05:54:10 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      05:54:10 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      05:54:10 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      

              jperkins-rhn James Perkins
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: