[JBoss JIRA] (LOGMGR-260) System loggers run with level ALL
by James Perkins (Jira)
[ https://issues.jboss.org/browse/LOGMGR-260?page=com.atlassian.jira.plugin... ]
James Perkins updated LOGMGR-260:
---------------------------------
Git Pull Request: https://github.com/jboss-logging/jboss-logmanager/pull/277, https://github.com/jboss-logging/jboss-logmanager/pull/280, https://github.com/jboss-logging/jboss-logmanager/pull/281 (was: https://github.com/jboss-logging/jboss-logmanager/pull/277)
> System loggers run with level ALL
> ---------------------------------
>
> Key: LOGMGR-260
> URL: https://issues.jboss.org/browse/LOGMGR-260
> Project: JBoss Log Manager
> Issue Type: Bug
> Components: core
> Environment: Java 9+
> Reporter: Philippe Marschall
> Priority: Major
>
> After migrating to Java 11 we were suddenly seeing a lot of caught exceptions {{sun.rmi.runtime.Log#getSource()}}. This was surprising to use because we WildFly which sets the "sun.rmi" logger to level WARN. Upon closer inspection the issue is that the logger used by {{sun.rmi.runtime.Log}} has level ALL ({{Integer#MIN_VALUE}}).
> The issue for this seems to be the following:
> # since Java 9 java.util.logging differentiates between system loggers (used by modules in the platform classloader) and user loggers (everything else), see {{java.util.logging#Logger.demandLogger(String, String, Class<?>)}}
> # when a system logger is created a second user logger is created and their configurations are merged, however they are merged based on internal state maintained by {{#setLevel(Level)}}, see {{java.util.logging.LogManager#demandSystemLogger(String, String, Module)}} and {{java.util.logging.Logger#mergeWithSystemLogger(Logger)}}
> # {{org.jboss.logmanager.Logger}} only ends up calling {{#setLevel(Level)}} with {{Level.ALL}} therefore the resulting system logger always has the level ALL
> The issue is quite hard to test because:
> # the effect only happens when the caller of {{#getLoggger(String)}} is a system module
> # the log output is not different, only {{#isLoggable(Level)}} checks that shouldn't succeed suddenly succeed so you only see the overhead
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (LOGMGR-260) System loggers run with level ALL
by James Perkins (Jira)
[ https://issues.jboss.org/browse/LOGMGR-260?page=com.atlassian.jira.plugin... ]
James Perkins commented on LOGMGR-260:
--------------------------------------
Yes sorry. That's part of [JEP 264|https://openjdk.java.net/jeps/264] which defines a platform logger. The default implementation of the {{System.Logger}} uses a {{java.util.logging.Logger}}. In LOGMGR-213 we introduced our own {{System.LoggerFinder}}. This would also get around the issue because the backing logger used in the {{System.Logger}} would be a {{org.jboss.logmanager.Logger}} so the issue wouldn't be seen.
That said the service loader can't find the {{System.LoggerFinder}} in the log manager because the log manager isn't on the system class path. Really not the issue reported here, but something I noticed and wanted to make note of is all :) I'll likely have to file a MODULES issue for this though.
> System loggers run with level ALL
> ---------------------------------
>
> Key: LOGMGR-260
> URL: https://issues.jboss.org/browse/LOGMGR-260
> Project: JBoss Log Manager
> Issue Type: Bug
> Components: core
> Environment: Java 9+
> Reporter: Philippe Marschall
> Priority: Major
>
> After migrating to Java 11 we were suddenly seeing a lot of caught exceptions {{sun.rmi.runtime.Log#getSource()}}. This was surprising to use because we WildFly which sets the "sun.rmi" logger to level WARN. Upon closer inspection the issue is that the logger used by {{sun.rmi.runtime.Log}} has level ALL ({{Integer#MIN_VALUE}}).
> The issue for this seems to be the following:
> # since Java 9 java.util.logging differentiates between system loggers (used by modules in the platform classloader) and user loggers (everything else), see {{java.util.logging#Logger.demandLogger(String, String, Class<?>)}}
> # when a system logger is created a second user logger is created and their configurations are merged, however they are merged based on internal state maintained by {{#setLevel(Level)}}, see {{java.util.logging.LogManager#demandSystemLogger(String, String, Module)}} and {{java.util.logging.Logger#mergeWithSystemLogger(Logger)}}
> # {{org.jboss.logmanager.Logger}} only ends up calling {{#setLevel(Level)}} with {{Level.ALL}} therefore the resulting system logger always has the level ALL
> The issue is quite hard to test because:
> # the effect only happens when the caller of {{#getLoggger(String)}} is a system module
> # the log output is not different, only {{#isLoggable(Level)}} checks that shouldn't succeed suddenly succeed so you only see the overhead
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (LOGMGR-260) System loggers run with level ALL
by Philippe Marschall (Jira)
[ https://issues.jboss.org/browse/LOGMGR-260?page=com.atlassian.jira.plugin... ]
Philippe Marschall commented on LOGMGR-260:
-------------------------------------------
I'm not sure I follow. For one thing the terminology is very confusing, there are two different things called system logger, {{java.lang.System.Logger}} on one hand and {{java.util.logging.Logger}} used by JDK/system modules on the other hand. This issue is about the latter. I believe part of the issue it that not all JDK modules have been converted to {{java.lang.System.Logger}} and that RMI uses {{ava.util.logging.Logger}} directly, see also https://bugs.openjdk.java.net/browse/JDK-7054233. But maybe I'm missing something.
> System loggers run with level ALL
> ---------------------------------
>
> Key: LOGMGR-260
> URL: https://issues.jboss.org/browse/LOGMGR-260
> Project: JBoss Log Manager
> Issue Type: Bug
> Components: core
> Environment: Java 9+
> Reporter: Philippe Marschall
> Priority: Major
>
> After migrating to Java 11 we were suddenly seeing a lot of caught exceptions {{sun.rmi.runtime.Log#getSource()}}. This was surprising to use because we WildFly which sets the "sun.rmi" logger to level WARN. Upon closer inspection the issue is that the logger used by {{sun.rmi.runtime.Log}} has level ALL ({{Integer#MIN_VALUE}}).
> The issue for this seems to be the following:
> # since Java 9 java.util.logging differentiates between system loggers (used by modules in the platform classloader) and user loggers (everything else), see {{java.util.logging#Logger.demandLogger(String, String, Class<?>)}}
> # when a system logger is created a second user logger is created and their configurations are merged, however they are merged based on internal state maintained by {{#setLevel(Level)}}, see {{java.util.logging.LogManager#demandSystemLogger(String, String, Module)}} and {{java.util.logging.Logger#mergeWithSystemLogger(Logger)}}
> # {{org.jboss.logmanager.Logger}} only ends up calling {{#setLevel(Level)}} with {{Level.ALL}} therefore the resulting system logger always has the level ALL
> The issue is quite hard to test because:
> # the effect only happens when the caller of {{#getLoggger(String)}} is a system module
> # the log output is not different, only {{#isLoggable(Level)}} checks that shouldn't succeed suddenly succeed so you only see the overhead
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12596) Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged for super classes
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-12596?page=com.atlassian.jira.plugin... ]
Scott Marlow updated WFLY-12596:
--------------------------------
Summary: Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged for super classes (was: Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged)
> Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged for super classes
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-12596
> URL: https://issues.jboss.org/browse/WFLY-12596
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Reporter: Scott Marlow
> Assignee: Scott Marlow
> Priority: Major
> Fix For: 19.0.0.Beta1
>
>
> Some users have reported seeing warnings like:
> {quote}
> WARN [org.jboss.modules.define] (MSC service thread 1-4) Failed to define class BGP in Module "deployment.mine.ear" from Service Module Loader: java.lang.ClassFormatError: Failed to link SuperClassInDifferentEarClassLoader (Module "deployment.mine.ear" from Service Module Loader): Type EntityBean not present
> {quote}
> Where class SuperClassInDifferentEarClassLoader, is a super class that is contained in a different EAR classloader than the subclass.
> The workaround should be passing the classloader to use in to the ASM ClassWriter class, by extending the ClassWriter class and providing an implementation of getClassLoader() method.
> {code}
> 12:56:09,573 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:937)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1200)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.Frame.merge(Frame.java:1299)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.Frame.merge(Frame.java:1197)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1607)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1543)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:762)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2431)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1283)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.accept(ClassReader.java:688)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.hibernate.Hibernate51CompatibilityTransformer.transform(Hibernate51CompatibilityTransformer.java:102)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.server.deployment.module.DelegatingClassFileTransformer.transform(DelegatingClassFileTransformer.java:60)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.JLIClassTransformer.transform(JLIClassTransformer.java:55)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:539)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName0(Native Method)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName(Class.java:348)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at java.lang.Thread.run(Thread.java:748)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) Caused by: java.lang.ClassNotFoundException: SuperClassInDifferentEarClassLoader from [Module "asm.asm" version 7.1 from local module loader @636be97c (finder: local module finder @50a638b5 (roots: /home/smarlow/work/wildfly/dist/target/wildfly-18.0.0.Final-SNAPSHOT/modules,/home/smarlow/work/wildfly/dist/target/wildfly-18.0.0.Final-SNAPSHOT/modules/system/layers/base))]
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName0(Native Method)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName(Class.java:348)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:935)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) ... 72 more
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: EJB DistributableCache (local, passivating).png
EJB SimpleCache.png
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: EJB DistributableCache (local, passivating).png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: EJB SimpleCache.png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (local, passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years
[JBoss JIRA] (WFLY-12596) Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-12596?page=com.atlassian.jira.plugin... ]
Scott Marlow updated WFLY-12596:
--------------------------------
Summary: Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged (was: Add way for Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged)
> Hibernate bytecode transformer needs to pass classloader into ASM ClassWriter to avoid ClassNotFoundException that caused warnings to be logged
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-12596
> URL: https://issues.jboss.org/browse/WFLY-12596
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Reporter: Scott Marlow
> Assignee: Scott Marlow
> Priority: Major
> Fix For: 19.0.0.Beta1
>
>
> Some users have reported seeing warnings like:
> {quote}
> WARN [org.jboss.modules.define] (MSC service thread 1-4) Failed to define class BGP in Module "deployment.mine.ear" from Service Module Loader: java.lang.ClassFormatError: Failed to link SuperClassInDifferentEarClassLoader (Module "deployment.mine.ear" from Service Module Loader): Type EntityBean not present
> {quote}
> Where class SuperClassInDifferentEarClassLoader, is a super class that is contained in a different EAR classloader than the subclass.
> The workaround should be passing the classloader to use in to the ASM ClassWriter class, by extending the ClassWriter class and providing an implementation of getClassLoader() method.
> {code}
> 12:56:09,573 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:937)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1200)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.Frame.merge(Frame.java:1299)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.Frame.merge(Frame.java:1197)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1607)
> 12:56:09,574 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1543)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:762)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2431)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1283)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.accept(ClassReader.java:688)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.hibernate.Hibernate51CompatibilityTransformer.transform(Hibernate51CompatibilityTransformer.java:102)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.server.deployment.module.DelegatingClassFileTransformer.transform(DelegatingClassFileTransformer.java:60)
> 12:56:09,575 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.JLIClassTransformer.transform(JLIClassTransformer.java:55)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:539)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,576 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,577 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 12:56:09,578 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,579 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass1(Native Method)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
> 12:56:09,580 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.Module.loadModuleClass(Module.java:731)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,581 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName0(Native Method)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName(Class.java:348)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
> 12:56:09,582 ERROR [stderr] (MSC service thread 1-4) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> 12:56:09,583 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at java.lang.Thread.run(Thread.java:748)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) Caused by: java.lang.ClassNotFoundException: SuperClassInDifferentEarClassLoader from [Module "asm.asm" version 7.1 from local module loader @636be97c (finder: local module finder @50a638b5 (roots: /home/smarlow/work/wildfly/dist/target/wildfly-18.0.0.Final-SNAPSHOT/modules,/home/smarlow/work/wildfly/dist/target/wildfly-18.0.0.Final-SNAPSHOT/modules/system/layers/base))]
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
> 12:56:09,584 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName0(Native Method)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at java.lang.Class.forName(Class.java:348)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) at org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:935)
> 12:56:09,585 ERROR [stderr] (MSC service thread 1-4) ... 72 more
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years