Uploaded image for project: 'JBoss Modules'
  1. JBoss Modules
  2. MODULES-441

Lazily initialize System.Logger's in the ModuleLoggerFinder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.12.2.Final, 2.1.2.Final
    • None
    • None
    • None

      In MODULES-439 the ModuleLoggerFinder was introduced to allow a System.LoggerFinder from a module to be used. However, a bug has been found that if a System.Logger is activated early, a java.util.logging.Logger is created resulting in the log manager being activated too early.

      We've got two options I see to implement a fix for this.

      1. Use a queue to store log messages and loggers until the log manager is activated.
      2. Write logs directly to System.err or System.out until the log manager is active.

      Option 1 seems to be the easiest for the fact we won't need to format log messages. The queues will likely not be large and may not even be used at all.

      Example of the failure message: https://ci.wildfly.org/buildConfiguration/WildFlyCore_PullRequest_WildFlyCoreFullIntegrationLinuxJdk11_2/382046?hideProblemsFromDependencies=false&hideTestsFromDependencies=false&expandBuildTestsSection=true

            17:55:48,089 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.1.Final
            17:55:48,287 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
            17:55:48,301 INFO  [org.jboss.as.process.Host Controller.status] (main) WFLYPC0018: Starting process 'Host Controller'
            [Host Controller] 17:55:48,644 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.1.Final
            [Host Controller] 17:55:48,980 INFO  [org.jboss.msc] (main) JBoss MSC version 1.5.1.Final
            [Host Controller] 17:55:48,987 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
            [Host Controller] 17:55:49,024 INFO  [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: WildFly Preview 30.0.0.Beta1-SNAPSHOT (WildFly Core 22.0.0.Beta1-SNAPSHOT) starting
            [Host Controller] 17:55:49,319 INFO  [org.wildfly.security] (Host Controller Service Threads - 4) ELY00001: WildFly Elytron version 2.2.1.Final
            [Host Controller] 17:55:49,570 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0003: Creating http management service using network interface (management) port (9990) securePort (-1)
            [Host Controller] 17:55:49,581 INFO  [org.xnio] (MSC service thread 1-1) XNIO version 3.8.9.Final
            [Host Controller] 17:55:49,586 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.8.9.Final
            [Host Controller] 17:55:49,639 INFO  [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 5.0.27.Final
            [Host Controller] 17:55:50,665 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=default/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
            [Host Controller] 17:55:50,707 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
            [Host Controller] 17:55:50,732 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
            [Host Controller] 17:55:50,747 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full-ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
            [Host Controller] 17:55:50,917 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://127.0.0.1:9990/management and https://127.0.0.1:-1/management
            [Host Controller] 17:55:50,918 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://127.0.0.1:9990 and https://127.0.0.1:-1
            [Host Controller] 17:55:50,956 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Preview 30.0.0.Beta1-SNAPSHOT (WildFly Core 22.0.0.Beta1-SNAPSHOT) (Host Controller) started in 2581ms - Started 70 of 70 services (13 services are lazy, passive or on-demand) - Host Controller configuration files in use: testing-domain4139430007173462787.xml, testing-host17397313194826009152.xml
            17:55:51,786 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.1.Final
            17:55:51,989 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
            17:55:52,004 INFO  [org.jboss.as.process.Host Controller.status] (main) WFLYPC0018: Starting process 'Host Controller'
            [Host Controller] 17:55:52,343 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.1.Final
            [Host Controller] 17:55:52,659 INFO  [org.jboss.msc] (main) JBoss MSC version 1.5.1.Final
            [Host Controller] 17:55:52,666 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
            [Host Controller] 17:55:52,701 INFO  [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: WildFly Preview 30.0.0.Beta1-SNAPSHOT (WildFly Core 22.0.0.Beta1-SNAPSHOT) starting
            [Host Controller] 17:55:52,991 INFO  [org.wildfly.security] (Host Controller Service Threads - 4) ELY00001: WildFly Elytron version 2.2.1.Final
            [Host Controller] 17:55:53,268 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0003: Creating http management service using network interface (management) port (19990) securePort (-1)
            [Host Controller] 17:55:53,279 INFO  [org.xnio] (MSC service thread 1-3) XNIO version 3.8.9.Final
            [Host Controller] 17:55:53,284 INFO  [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.8.9.Final
            [Host Controller] 17:55:53,333 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 5.0.27.Final
            [Host Controller] 17:55:55,056 INFO  [org.jboss.as.controller.management-deprecated] (Host Controller Service Threads - 3) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full-ha/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
            [Host Controller] 17:55:55,081 INFO  [org.jboss.as.controller.management-deprecated] (Host Controller Service Threads - 3) WFLYCTL0028: Attribute 'cluster' in the resource at address '/profile=full/subsystem=ejb3/service=remote' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
            [Host Controller] 17:55:55,141 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0148: Connected to the domain controller at remote+http://127.0.0.1:9990
            [Host Controller] 17:55:55,138 INFO  [org.jboss.as.domain.controller] (Host Controller Service Threads - 29) WFLYHC0019: Registered remote secondary host "secondary", JBoss WildFly Preview 30.0.0.Beta1-SNAPSHOT (WildFly 22.0.0.Beta1-SNAPSHOT)
            [Host Controller] 17:55:55,248 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0023: Starting server server-one
            17:55:55,432 INFO  [org.jboss.as.process.Server:server-one.status] (ProcessController-threads - 3) WFLYPC0018: Starting process 'Server:server-one'
            [Server:server-one] WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
            [Server:server-one] Exception in thread "main" java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
            [Server:server-one]   at org.jboss.logmanager@2.1.19.Final//org.jboss.logmanager.Logger.getLogger(Logger.java:57)
            [Server:server-one]   at org.jboss.as.server@22.0.0.Beta1-SNAPSHOT//org.jboss.as.server.DomainServerMain.main(DomainServerMain.java:105)
            [Server:server-one]   at org.jboss.modules.Module.run(Module.java:352)
            [Server:server-one]   at org.jboss.modules.Module.run(Module.java:320)
            [Server:server-one]   at org.jboss.modules.Main.main(Main.java:607)
            17:55:56,002 INFO  [org.jboss.as.process.Server:server-one.status] (reaper for Server:server-one) WFLYPC0011: Process 'Server:server-one' finished with an exit status of 1
            [Host Controller] 17:55:56,044 INFO  [org.jboss.as.host.controller] (ProcessControllerConnection-thread - 2) WFLYHC0027: Unregistering server server-one
            [Host Controller] 17:55:56,046 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0023: Starting server server-two
            17:55:56,234 INFO  [org.jboss.as.process.Server:server-two.status] (ProcessController-threads - 3) WFLYPC0018: Starting process 'Server:server-two'
            [Server:server-two] WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
            [Server:server-two] Exception in thread "main" java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
            [Server:server-two]   at org.jboss.logmanager@2.1.19.Final//org.jboss.logmanager.Logger.getLogger(Logger.java:57)
            [Server:server-two]   at org.jboss.as.server@22.0.0.Beta1-SNAPSHOT//org.jboss.as.server.DomainServerMain.main(DomainServerMain.java:105)
            [Server:server-two]   at org.jboss.modules.Module.run(Module.java:352)
            [Server:server-two]   at org.jboss.modules.Module.run(Module.java:320)
            [Server:server-two]   at org.jboss.modules.Main.main(Main.java:607)
            17:55:56,816 INFO  [org.jboss.as.process.Server:server-two.status] (reaper for Server:server-two) WFLYPC0011: Process 'Server:server-two' finished with an exit status of 1
            [Host Controller] 17:55:56,858 INFO  [org.jboss.as.host.controller] (ProcessControllerConnection-thread - 2) WFLYHC0027: Unregistering server server-two
            [Host Controller] 17:55:56,869 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://127.0.0.1:19990/management and https://127.0.0.1:-1/management
            [Host Controller] 17:55:56,869 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
            [Host Controller] 17:55:56,869 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Preview 30.0.0.Beta1-SNAPSHOT (WildFly Core 22.0.0.Beta1-SNAPSHOT) (Host Controller) started in 4792ms - Started 68 of 69 services (14 services are lazy, passive or on-demand) - Host Controller configuration file in use: testing-host12392341087479094810.xml
            [Host Controller] 17:57:51,569 INFO  [org.jboss.as.domain.controller] (management task-2) WFLYHC0026: Unregistered remote secondary host "secondary"
      

            jperkins-rhn James Perkins
            jperkins-rhn James Perkins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: