[JBoss JIRA] (WFLY-12504) Memoryleak in Metrics-Endpoint
by Kabir Khan (Jira)
[ https://issues.jboss.org/browse/WFLY-12504?page=com.atlassian.jira.plugin... ]
Kabir Khan updated WFLY-12504:
------------------------------
Labels: blocker-WF18 fixed_needs_core (was: blocker-WF18)
> Memoryleak in Metrics-Endpoint
> ------------------------------
>
> Key: WFLY-12504
> URL: https://issues.jboss.org/browse/WFLY-12504
> Project: WildFly
> Issue Type: Bug
> Components: MP Metrics
> Affects Versions: 17.0.1.Final
> Environment: Docker Image jboss/keycloak:6.0.1
> Reporter: Mathias Werlitz
> Assignee: Richard Opalka
> Priority: Blocker
> Labels: blocker-WF18, fixed_needs_core
> Fix For: 18.0.0.Final
>
> Attachments: Screen Shot 2019-09-07 at 7.27.24 AM.png, Screen Shot 2019-09-07 at 7.29.02 AM.png
>
>
> I noticed there seems to be a memory leak when calling the /metrics endpoint (with Prometheus). I don't know if this relates to the Keycloak metrics or the general Wildfly base metrics.
> Every request to /metrics seems to consume some more heap memory until a OOME occurs. No other requests are done.
> If the metrics endpoint isn't used at all the server works fine.
> {noformat}
> 15:14:50,951 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([("deployment" => "keycloak-server.war")]): java.lang.OutOfMemoryError: GC overhead limit exceeded
> at java.util.HashMap.resize(HashMap.java:704)
> at java.util.HashMap.putVal(HashMap.java:629)
> at java.util.HashMap.put(HashMap.java:612)
> at java.util.HashSet.add(HashSet.java:220)
> at org.jboss.as.controller.PathAddress.pathAddress(PathAddress.java:95)
> at org.jboss.as.controller.AbstractOperationContext$OperationId.<init>(AbstractOperationContext.java:1571)
> at org.jboss.as.controller.OperationContextImpl.authorize(OperationContextImpl.java:1326)
> at org.jboss.as.controller.OperationContextImpl.authorize(OperationContextImpl.java:1321)
> at org.jboss.as.controller.operations.global.ReadAttributeHandler$AuthorizeAttributeReadHandler.doExecuteInternal(ReadAttributeHandler.java:244)
> at org.jboss.as.controller.operations.global.ReadAttributeHandler$AuthorizeAttributeReadHandler.execute(ReadAttributeHandler.java:229)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.jboss.as.controller.ModelControllerImpl$$Lambda$553/974545249.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity$$Lambda$554/2003274744.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:255)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$LocalClient$$Lambda$552/516471669.apply(Unknown Source)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$LocalClient.executeInModelControllerCl(ModelControllerClientFactoryImpl.java:259)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$LocalClient.executeOperation(ModelControllerClientFactoryImpl.java:157)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$1$$Lambda$546/98454422.apply(Unknown Source)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl.lambda$executeInVm$0(ModelControllerClientFactoryImpl.java:351)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$$Lambda$550/226565561.run(Unknown Source)
> at org.jboss.as.controller.access.InVmAccess.runInVm(InVmAccess.java:85)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl.executeInVm(ModelControllerClientFactoryImpl.java:351)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl.access$000(ModelControllerClientFactoryImpl.java:59)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$1.executeOperation(ModelControllerClientFactoryImpl.java:82)
> at org.jboss.as.controller.LocalModelControllerClient.execute(LocalModelControllerClient.java:54)
> 15:14:50,955 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0012: Scan of /opt/jboss/keycloak/standalone/deployments threw Exception: java.lang.RuntimeException: WFLYDS0036: Deployment model operation failed. undefined
> at org.jboss.as.server.deployment.scanner.DefaultDeploymentOperations.getUnrelatedDeployments(DefaultDeploymentOperations.java:109)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScanContext.<init>(FileSystemDeploymentService.java:1692)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScanContext.<init>(FileSystemDeploymentService.java:1640)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:589)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:493)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$DeploymentScanRunnable.run(FileSystemDeploymentService.java:255)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> 15:14:52,319 ERROR [org.jboss.as.controller.management-operation] (management I/O-1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "pbcast.NAKACK2")
> ]): java.lang.OutOfMemoryError: GC overhead limit exceeded
> at sun.reflect.generics.parser.SignatureParser.parsePackageNameAndSimpleClassTypeSignature(SignatureParser.java:331)
> at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignature(SignatureParser.java:310)
> at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:289)
> at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:283)
> at sun.reflect.generics.parser.SignatureParser.parseTypeSignature(SignatureParser.java:485)
> at sun.reflect.generics.parser.SignatureParser.parseTypeSig(SignatureParser.java:188)
> at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:436)
> at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:241)
> at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
> at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
> at java.lang.reflect.Field.declaredAnnotations(Field.java:1150)
> at java.lang.reflect.Field.declaredAnnotations(Field.java:1148)
> at java.lang.reflect.Field.getAnnotation(Field.java:1120)
> at org.jgroups.stack.Configurator.resolveAndAssignField(Configurator.java:926)
> at org.jgroups.stack.Configurator.resolveAndAssignFields(Configurator.java:921)
> at org.jgroups.stack.Protocol.setProperties(Protocol.java:133)
> at org.jboss.as.clustering.jgroups.subsystem.AbstractProtocolConfigurationServiceConfigurator.lambda$createProtocol$0(AbstractProtocolConfigurationServiceConfigurator.java:119)
> at org.jboss.as.clustering.jgroups.subsystem.AbstractProtocolConfigurationServiceConfigurator$$Lambda$590/1559509553.run(Unknown Source)
> at org.wildfly.security.manager.WildFlySecurityManager.doUnchecked(WildFlySecurityManager.java:849)
> at org.jboss.as.clustering.jgroups.subsystem.AbstractProtocolConfigurationServiceConfigurator.createProtocol(AbstractProtocolConfigurationServiceConfigurator.java:125)
> at org.jboss.as.clustering.jgroups.subsystem.ChannelRuntimeResourceRegistration.findProtocol(ChannelRuntimeResourceRegistration.java:87)
> at org.jboss.as.clustering.jgroups.subsystem.ProtocolMetricsHandler.executeRuntimeStep(ProtocolMetricsHandler.java:244)
> at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:59)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.jboss.as.controller.ModelControllerImpl$$Lambda$553/974545249.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity$$Lambda$554/2003274744.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> 15:14:52,322 ERROR [io.undertow.request] (management I/O-1) UT005071: Undertow request failed HttpServerExchange{ GET /metrics request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Connection=[keep-alive], Accept-Language=[de,en-US;q=0.7,en;q=0.3], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0], Upgrade-Insecure-Requests=[1], Host=[192.168.99.100:9990]} response {Access-Control-Allow-Origin=[*], Access-Control-Allow-Headers=[origin, content-type, accept, authorization], Access-Control-Allow-Credentials=[true], Content-Type=[text/plain], Access-Control-Allow-Methods=[GET, POST, PUT, DELETE, OPTIONS, HEAD], Access-Control-Max-Age=[1209600]}}: java.lang.IllegalStateException: WFLYMETRICS0003: Unable to read attribute xmit_table_num_purges on [
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "pbcast.NAKACK2")
> ]: "WFLYCTL0158: Operation handler failed: java.lang.OutOfMemoryError: GC overhead limit exceeded".
> at org.wildfly.extension.microprofile.metrics.MetricCollector.lambda$collectResourceMetrics0$0(MetricCollector.java:143)
> at org.wildfly.extension.microprofile.metrics.PrometheusCollector.collect(PrometheusCollector.java:51)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:147)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:168)
> at io.prometheus.client.CollectorRegistry.metricFamilySamples(CollectorRegistry.java:130)
> at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.handleRequest(MetricsContextService.java:100)
> at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
> at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
> at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
> at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
> at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
> at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
> at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
> at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
> at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
> at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:662)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
> at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
> at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
> 15:14:58,673 ERROR [org.jboss.as.controller.management-operation] (management I/O-2) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "UDP")
> ]): java.lang.OutOfMemoryError: GC overhead limit exceeded
> 15:14:58,675 ERROR [io.undertow.request] (management I/O-2) UT005071: Undertow request failed HttpServerExchange{ GET /metrics request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Connection=[keep-alive], Accept-Language=[de,en-US;q=0.7,en;q=0.3], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0], Upgrade-Insecure-Requests=[1], Host=[192.168.99.100:9990]} response {Access-Control-Allow-Origin=[*], Access-Control-Allow-Headers=[origin, content-type, accept, authorization], Access-Control-Allow-Credentials=[true], Content-Type=[text/plain], Access-Control-Allow-Methods=[GET, POST, PUT, DELETE, OPTIONS, HEAD], Access-Control-Max-Age=[1209600]}}: java.lang.IllegalStateException: WFLYMETRICS0003: Unable to read attribute max_bundle_size on [
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "UDP")
> ]: "WFLYCTL0158: Operation handler failed: java.lang.OutOfMemoryError: GC overhead limit exceeded".
> at org.wildfly.extension.microprofile.metrics.MetricCollector.lambda$collectResourceMetrics0$0(MetricCollector.java:143)
> at org.wildfly.extension.microprofile.metrics.PrometheusCollector.collect(PrometheusCollector.java:51)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:147)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:168)
> at io.prometheus.client.CollectorRegistry.metricFamilySamples(CollectorRegistry.java:130)
> at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.handleRequest(MetricsContextService.java:100)
> at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
> at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
> at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
> at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
> at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
> at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
> at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
> at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
> at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
> at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:662)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
> at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:162)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:100)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:57)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
> at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:131)
> at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12526) doPrivileged needed for isUserInRole
by Kabir Khan (Jira)
[ https://issues.jboss.org/browse/WFLY-12526?page=com.atlassian.jira.plugin... ]
Kabir Khan commented on WFLY-12526:
-----------------------------------
Thanks!
> doPrivileged needed for isUserInRole
> ------------------------------------
>
> Key: WFLY-12526
> URL: https://issues.jboss.org/browse/WFLY-12526
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Priority: Blocker
> Fix For: 18.0.0.Final
>
>
> Currently experiencing the following error: -
> {noformat}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.plugins.ClassLoaderLocatorFactory.get")" in code source "(vfs:/content/mydeployment.war/ <no signer certificates>)" of "org.apache.jasper.servlet.JasperLoader@24d700ba")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:294) [wildfly-elytron-security-manager-1.10.0.Final.jar:1.10.0.Final]
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:191) [wildfly-elytron-security-manager-1.10.0.Final.jar:1.10.0.Final]
> at org.jboss.security.plugins.ClassLoaderLocatorFactory.get(ClassLoaderLocatorFactory.java:51) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.authorization.JBossAuthorizationContext.initializeModules(JBossAuthorizationContext.java:187) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.authorization.JBossAuthorizationContext.authorize(JBossAuthorizationContext.java:141) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.JBossAuthorizationManager.internalAuthorization(JBossAuthorizationManager.java:438) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.JBossAuthorizationManager.authorize(JBossAuthorizationManager.java:115) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.javaee.WebAuthorizationHelper.hasRole(WebAuthorizationHelper.java:201) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.wildfly.extension.undertow.security.JbossAuthorizationManager.isUserInRole(JbossAuthorizationManager.java:99)
> at io.undertow.servlet.spec.HttpServletRequestImpl.isUserInRole(HttpServletRequestImpl.java:337) [undertow-servlet-2.0.26.Final.jar:2.0.26.Final]
> at org.apache.jsp.secured_jsp._jspService(secured_jsp.java:109)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jastow-2.0.7.Final.jar:2.0.7.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) [jboss-servlet-api_4.0_spec-2.0.0.CR2.jar:2.0.0.CR2]
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433) [jastow-2.0.7.Final.jar:2.0.7.Final]
> ... 51 more
> {noformat}
> The reason I believe this requires a doPrivileged is the permission required is entirely internal to our implementation of isUserInRole - whilst the deployment can trigger this call the deployment can not influence how this is implemented so the deployment's ProtectionDomain should not require the permissions needed for our internal class loading so a doPrivileged call will drop the deployment's ProtectionDomain from the stack.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12526) doPrivileged needed for isUserInRole
by Flavia Rainone (Jira)
[ https://issues.jboss.org/browse/WFLY-12526?page=com.atlassian.jira.plugin... ]
Flavia Rainone commented on WFLY-12526:
---------------------------------------
[~kabirkhan] done
> doPrivileged needed for isUserInRole
> ------------------------------------
>
> Key: WFLY-12526
> URL: https://issues.jboss.org/browse/WFLY-12526
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Priority: Blocker
> Fix For: 18.0.0.Final
>
>
> Currently experiencing the following error: -
> {noformat}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.plugins.ClassLoaderLocatorFactory.get")" in code source "(vfs:/content/mydeployment.war/ <no signer certificates>)" of "org.apache.jasper.servlet.JasperLoader@24d700ba")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:294) [wildfly-elytron-security-manager-1.10.0.Final.jar:1.10.0.Final]
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:191) [wildfly-elytron-security-manager-1.10.0.Final.jar:1.10.0.Final]
> at org.jboss.security.plugins.ClassLoaderLocatorFactory.get(ClassLoaderLocatorFactory.java:51) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.authorization.JBossAuthorizationContext.initializeModules(JBossAuthorizationContext.java:187) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.authorization.JBossAuthorizationContext.authorize(JBossAuthorizationContext.java:141) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.JBossAuthorizationManager.internalAuthorization(JBossAuthorizationManager.java:438) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.JBossAuthorizationManager.authorize(JBossAuthorizationManager.java:115) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.javaee.WebAuthorizationHelper.hasRole(WebAuthorizationHelper.java:201) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.wildfly.extension.undertow.security.JbossAuthorizationManager.isUserInRole(JbossAuthorizationManager.java:99)
> at io.undertow.servlet.spec.HttpServletRequestImpl.isUserInRole(HttpServletRequestImpl.java:337) [undertow-servlet-2.0.26.Final.jar:2.0.26.Final]
> at org.apache.jsp.secured_jsp._jspService(secured_jsp.java:109)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jastow-2.0.7.Final.jar:2.0.7.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) [jboss-servlet-api_4.0_spec-2.0.0.CR2.jar:2.0.0.CR2]
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433) [jastow-2.0.7.Final.jar:2.0.7.Final]
> ... 51 more
> {noformat}
> The reason I believe this requires a doPrivileged is the permission required is entirely internal to our implementation of isUserInRole - whilst the deployment can trigger this call the deployment can not influence how this is implemented so the deployment's ProtectionDomain should not require the permissions needed for our internal class loading so a doPrivileged call will drop the deployment's ProtectionDomain from the stack.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12504) Memoryleak in Metrics-Endpoint
by Richard Opalka (Jira)
[ https://issues.jboss.org/browse/WFLY-12504?page=com.atlassian.jira.plugin... ]
Richard Opalka commented on WFLY-12504:
---------------------------------------
Correct [~kabirkhan]
> Memoryleak in Metrics-Endpoint
> ------------------------------
>
> Key: WFLY-12504
> URL: https://issues.jboss.org/browse/WFLY-12504
> Project: WildFly
> Issue Type: Bug
> Components: MP Metrics
> Affects Versions: 17.0.1.Final
> Environment: Docker Image jboss/keycloak:6.0.1
> Reporter: Mathias Werlitz
> Assignee: Richard Opalka
> Priority: Blocker
> Labels: blocker-WF18
> Fix For: 18.0.0.Final
>
> Attachments: Screen Shot 2019-09-07 at 7.27.24 AM.png, Screen Shot 2019-09-07 at 7.29.02 AM.png
>
>
> I noticed there seems to be a memory leak when calling the /metrics endpoint (with Prometheus). I don't know if this relates to the Keycloak metrics or the general Wildfly base metrics.
> Every request to /metrics seems to consume some more heap memory until a OOME occurs. No other requests are done.
> If the metrics endpoint isn't used at all the server works fine.
> {noformat}
> 15:14:50,951 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([("deployment" => "keycloak-server.war")]): java.lang.OutOfMemoryError: GC overhead limit exceeded
> at java.util.HashMap.resize(HashMap.java:704)
> at java.util.HashMap.putVal(HashMap.java:629)
> at java.util.HashMap.put(HashMap.java:612)
> at java.util.HashSet.add(HashSet.java:220)
> at org.jboss.as.controller.PathAddress.pathAddress(PathAddress.java:95)
> at org.jboss.as.controller.AbstractOperationContext$OperationId.<init>(AbstractOperationContext.java:1571)
> at org.jboss.as.controller.OperationContextImpl.authorize(OperationContextImpl.java:1326)
> at org.jboss.as.controller.OperationContextImpl.authorize(OperationContextImpl.java:1321)
> at org.jboss.as.controller.operations.global.ReadAttributeHandler$AuthorizeAttributeReadHandler.doExecuteInternal(ReadAttributeHandler.java:244)
> at org.jboss.as.controller.operations.global.ReadAttributeHandler$AuthorizeAttributeReadHandler.execute(ReadAttributeHandler.java:229)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.jboss.as.controller.ModelControllerImpl$$Lambda$553/974545249.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity$$Lambda$554/2003274744.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:255)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$LocalClient$$Lambda$552/516471669.apply(Unknown Source)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$LocalClient.executeInModelControllerCl(ModelControllerClientFactoryImpl.java:259)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$LocalClient.executeOperation(ModelControllerClientFactoryImpl.java:157)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$1$$Lambda$546/98454422.apply(Unknown Source)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl.lambda$executeInVm$0(ModelControllerClientFactoryImpl.java:351)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$$Lambda$550/226565561.run(Unknown Source)
> at org.jboss.as.controller.access.InVmAccess.runInVm(InVmAccess.java:85)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl.executeInVm(ModelControllerClientFactoryImpl.java:351)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl.access$000(ModelControllerClientFactoryImpl.java:59)
> at org.jboss.as.controller.ModelControllerClientFactoryImpl$1.executeOperation(ModelControllerClientFactoryImpl.java:82)
> at org.jboss.as.controller.LocalModelControllerClient.execute(LocalModelControllerClient.java:54)
> 15:14:50,955 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0012: Scan of /opt/jboss/keycloak/standalone/deployments threw Exception: java.lang.RuntimeException: WFLYDS0036: Deployment model operation failed. undefined
> at org.jboss.as.server.deployment.scanner.DefaultDeploymentOperations.getUnrelatedDeployments(DefaultDeploymentOperations.java:109)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScanContext.<init>(FileSystemDeploymentService.java:1692)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScanContext.<init>(FileSystemDeploymentService.java:1640)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:589)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:493)
> at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$DeploymentScanRunnable.run(FileSystemDeploymentService.java:255)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> 15:14:52,319 ERROR [org.jboss.as.controller.management-operation] (management I/O-1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "pbcast.NAKACK2")
> ]): java.lang.OutOfMemoryError: GC overhead limit exceeded
> at sun.reflect.generics.parser.SignatureParser.parsePackageNameAndSimpleClassTypeSignature(SignatureParser.java:331)
> at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignature(SignatureParser.java:310)
> at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:289)
> at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:283)
> at sun.reflect.generics.parser.SignatureParser.parseTypeSignature(SignatureParser.java:485)
> at sun.reflect.generics.parser.SignatureParser.parseTypeSig(SignatureParser.java:188)
> at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:436)
> at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:241)
> at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
> at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
> at java.lang.reflect.Field.declaredAnnotations(Field.java:1150)
> at java.lang.reflect.Field.declaredAnnotations(Field.java:1148)
> at java.lang.reflect.Field.getAnnotation(Field.java:1120)
> at org.jgroups.stack.Configurator.resolveAndAssignField(Configurator.java:926)
> at org.jgroups.stack.Configurator.resolveAndAssignFields(Configurator.java:921)
> at org.jgroups.stack.Protocol.setProperties(Protocol.java:133)
> at org.jboss.as.clustering.jgroups.subsystem.AbstractProtocolConfigurationServiceConfigurator.lambda$createProtocol$0(AbstractProtocolConfigurationServiceConfigurator.java:119)
> at org.jboss.as.clustering.jgroups.subsystem.AbstractProtocolConfigurationServiceConfigurator$$Lambda$590/1559509553.run(Unknown Source)
> at org.wildfly.security.manager.WildFlySecurityManager.doUnchecked(WildFlySecurityManager.java:849)
> at org.jboss.as.clustering.jgroups.subsystem.AbstractProtocolConfigurationServiceConfigurator.createProtocol(AbstractProtocolConfigurationServiceConfigurator.java:125)
> at org.jboss.as.clustering.jgroups.subsystem.ChannelRuntimeResourceRegistration.findProtocol(ChannelRuntimeResourceRegistration.java:87)
> at org.jboss.as.clustering.jgroups.subsystem.ProtocolMetricsHandler.executeRuntimeStep(ProtocolMetricsHandler.java:244)
> at org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:59)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1412)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
> at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
> at org.jboss.as.controller.ModelControllerImpl$$Lambda$553/974545249.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity$$Lambda$554/2003274744.run(Unknown Source)
> at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
> 15:14:52,322 ERROR [io.undertow.request] (management I/O-1) UT005071: Undertow request failed HttpServerExchange{ GET /metrics request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Connection=[keep-alive], Accept-Language=[de,en-US;q=0.7,en;q=0.3], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0], Upgrade-Insecure-Requests=[1], Host=[192.168.99.100:9990]} response {Access-Control-Allow-Origin=[*], Access-Control-Allow-Headers=[origin, content-type, accept, authorization], Access-Control-Allow-Credentials=[true], Content-Type=[text/plain], Access-Control-Allow-Methods=[GET, POST, PUT, DELETE, OPTIONS, HEAD], Access-Control-Max-Age=[1209600]}}: java.lang.IllegalStateException: WFLYMETRICS0003: Unable to read attribute xmit_table_num_purges on [
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "pbcast.NAKACK2")
> ]: "WFLYCTL0158: Operation handler failed: java.lang.OutOfMemoryError: GC overhead limit exceeded".
> at org.wildfly.extension.microprofile.metrics.MetricCollector.lambda$collectResourceMetrics0$0(MetricCollector.java:143)
> at org.wildfly.extension.microprofile.metrics.PrometheusCollector.collect(PrometheusCollector.java:51)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:147)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:168)
> at io.prometheus.client.CollectorRegistry.metricFamilySamples(CollectorRegistry.java:130)
> at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.handleRequest(MetricsContextService.java:100)
> at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
> at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
> at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
> at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
> at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
> at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
> at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
> at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
> at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
> at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:662)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
> at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
> at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
> 15:14:58,673 ERROR [org.jboss.as.controller.management-operation] (management I/O-2) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "UDP")
> ]): java.lang.OutOfMemoryError: GC overhead limit exceeded
> 15:14:58,675 ERROR [io.undertow.request] (management I/O-2) UT005071: Undertow request failed HttpServerExchange{ GET /metrics request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], Connection=[keep-alive], Accept-Language=[de,en-US;q=0.7,en;q=0.3], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate], User-Agent=[Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0], Upgrade-Insecure-Requests=[1], Host=[192.168.99.100:9990]} response {Access-Control-Allow-Origin=[*], Access-Control-Allow-Headers=[origin, content-type, accept, authorization], Access-Control-Allow-Credentials=[true], Content-Type=[text/plain], Access-Control-Allow-Methods=[GET, POST, PUT, DELETE, OPTIONS, HEAD], Access-Control-Max-Age=[1209600]}}: java.lang.IllegalStateException: WFLYMETRICS0003: Unable to read attribute max_bundle_size on [
> ("subsystem" => "jgroups"),
> ("channel" => "ee"),
> ("protocol" => "UDP")
> ]: "WFLYCTL0158: Operation handler failed: java.lang.OutOfMemoryError: GC overhead limit exceeded".
> at org.wildfly.extension.microprofile.metrics.MetricCollector.lambda$collectResourceMetrics0$0(MetricCollector.java:143)
> at org.wildfly.extension.microprofile.metrics.PrometheusCollector.collect(PrometheusCollector.java:51)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:147)
> at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:168)
> at io.prometheus.client.CollectorRegistry.metricFamilySamples(CollectorRegistry.java:130)
> at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.handleRequest(MetricsContextService.java:100)
> at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
> at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
> at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
> at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
> at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
> at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
> at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
> at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
> at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
> at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:662)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
> at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:162)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:100)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:57)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
> at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:131)
> at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12311) Replace Prometheus Simpleclient by smallrye-metrics
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-12311?page=com.atlassian.jira.plugin... ]
Brian Stansberry updated WFLY-12311:
------------------------------------
Fix Version/s: 18.0.0.Final
> Replace Prometheus Simpleclient by smallrye-metrics
> ---------------------------------------------------
>
> Key: WFLY-12311
> URL: https://issues.jboss.org/browse/WFLY-12311
> Project: WildFly
> Issue Type: Task
> Components: MP Metrics
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Priority: Blocker
> Fix For: 18.0.0.Final
>
>
> The microprofile-metrics-smallrye extension uses prometheus simple client to collect and expose subsystem metrics because MP Metrics 1.x had blocking limitations (mainly that the metric names must be globally unique and tags/labels were not taken into account to determine uniqueness).
> With MP Metrics 2.x, some of these limitations have been removed and it should be possible to use smallrye-metrics internally to expose WildFly subsystem metrics
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (DROOLS-4525) NullPointerException in MatchesOperator with executable model
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4525?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-4525:
--------------------------------
Sprint: 2019 Week 35-37
> NullPointerException in MatchesOperator with executable model
> -------------------------------------------------------------
>
> Key: DROOLS-4525
> URL: https://issues.jboss.org/browse/DROOLS-4525
> Project: Drools
> Issue Type: Bug
> Components: core engine, executable model
> Affects Versions: 7.26.0.Final
> Reporter: Martin Weiler
> Assignee: Mario Fusco
> Priority: Major
>
> A rule has the following constraint:
> {noformat}
> $p : Person(likes matches "^[0-9]{3}.*$")
> {noformat}
> If a Person object is inserted into the working memory with the {{likes}} field unset, this results in a NullPointerException when using the executable model:
> {noformat}
> java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:77)
> at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:108)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:139)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:501)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:399)
> at org.drools.core.reteoo.ObjectTypeNode.propagateAssert(ObjectTypeNode.java:324)
> at org.drools.core.phreak.PropagationEntry$Insert.propagate(PropagationEntry.java:161)
> at org.drools.core.phreak.PropagationEntry$Insert.execute(PropagationEntry.java:166)
> at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:96)
> at org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:91)
> at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1046)
> at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1009)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1001)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1330)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1321)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1305)
> at org.drools.modelcompiler.CompilerTest.testMatchesOnNullString(CompilerTest.java:2003)
> ...
> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
> at org.drools.model.DSL.eval(DSL.java:715)
> at defaultpkg.RulesD6C04ACCB409930058C1DE751731F5EDRuleMethods0.lambda$rule_R2$8e86359d$1(RulesD6C04ACCB409930058C1DE751731F5EDRuleMethods0.java:39)
> at org.drools.model.functions.Predicate1$Impl.test(Predicate1.java:18)
> at org.drools.model.constraints.SingleConstraint1.lambda$getPredicate$8a56b796$1(SingleConstraint1.java:40)
> at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:73)
> ... 49 more
> Caused by: java.lang.NullPointerException
> at org.drools.model.operators.MatchesOperator.eval(MatchesOperator.java:27)
> at org.drools.model.operators.MatchesOperator.eval(MatchesOperator.java:21)
> at org.drools.model.functions.Operator$SingleValue.test(Operator.java:41)
> at org.drools.model.functions.Operator$SingleValue.test(Operator.java:39)
> at org.drools.model.DSL.eval(DSL.java:713)
> ... 53 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months
[JBoss JIRA] (WFLY-12526) doPrivileged needed for isUserInRole
by Kabir Khan (Jira)
[ https://issues.jboss.org/browse/WFLY-12526?page=com.atlassian.jira.plugin... ]
Kabir Khan commented on WFLY-12526:
-----------------------------------
[~flavia.rainone] There is a small pull request for this one waiting for your review.
> doPrivileged needed for isUserInRole
> ------------------------------------
>
> Key: WFLY-12526
> URL: https://issues.jboss.org/browse/WFLY-12526
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Priority: Blocker
> Fix For: 18.0.0.Final
>
>
> Currently experiencing the following error: -
> {noformat}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "org.jboss.security.plugins.ClassLoaderLocatorFactory.get")" in code source "(vfs:/content/mydeployment.war/ <no signer certificates>)" of "org.apache.jasper.servlet.JasperLoader@24d700ba")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:294) [wildfly-elytron-security-manager-1.10.0.Final.jar:1.10.0.Final]
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:191) [wildfly-elytron-security-manager-1.10.0.Final.jar:1.10.0.Final]
> at org.jboss.security.plugins.ClassLoaderLocatorFactory.get(ClassLoaderLocatorFactory.java:51) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.authorization.JBossAuthorizationContext.initializeModules(JBossAuthorizationContext.java:187) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.authorization.JBossAuthorizationContext.authorize(JBossAuthorizationContext.java:141) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.JBossAuthorizationManager.internalAuthorization(JBossAuthorizationManager.java:438) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.JBossAuthorizationManager.authorize(JBossAuthorizationManager.java:115) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.jboss.security.plugins.javaee.WebAuthorizationHelper.hasRole(WebAuthorizationHelper.java:201) [picketbox-5.0.3.Final.jar:5.0.3.Final]
> at org.wildfly.extension.undertow.security.JbossAuthorizationManager.isUserInRole(JbossAuthorizationManager.java:99)
> at io.undertow.servlet.spec.HttpServletRequestImpl.isUserInRole(HttpServletRequestImpl.java:337) [undertow-servlet-2.0.26.Final.jar:2.0.26.Final]
> at org.apache.jsp.secured_jsp._jspService(secured_jsp.java:109)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jastow-2.0.7.Final.jar:2.0.7.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) [jboss-servlet-api_4.0_spec-2.0.0.CR2.jar:2.0.0.CR2]
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433) [jastow-2.0.7.Final.jar:2.0.7.Final]
> ... 51 more
> {noformat}
> The reason I believe this requires a doPrivileged is the permission required is entirely internal to our implementation of isUserInRole - whilst the deployment can trigger this call the deployment can not influence how this is implemented so the deployment's ProtectionDomain should not require the permissions needed for our internal class loading so a doPrivileged call will drop the deployment's ProtectionDomain from the stack.
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
6 years, 10 months