[JBoss JIRA] (WFLY-10385) TransactionInflowTestCase does not function correctly under security manager
by David Lloyd (JIRA)
David Lloyd created WFLY-10385:
----------------------------------
Summary: TransactionInflowTestCase does not function correctly under security manager
Key: WFLY-10385
URL: https://issues.jboss.org/browse/WFLY-10385
Project: WildFly
Issue Type: Bug
Components: Test Suite
Reporter: David Lloyd
Assignee: Ondra Chaloupka
Proactively assigning to [~ochaloup] as he is the original test author; feel free to adjust as necessary.
{{org.jboss.as.test.integration.transaction.inflow.TransactionInflowTestCase}} does not function correctly under a security manager. The stack trace is like this:
{noformat}
Breakpoint reached
at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:295)
at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:192)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1048)
at org.wildfly.security.manager.WildFlySecurityManager.checkConnect(WildFlySecurityManager.java:390)
at java.net.InetAddress.getLocalHost(InetAddress.java:1477)
at org.jboss.as.test.integration.transaction.inflow.TransactionInflowXid.getXid(TransactionInflowXid.java:128)
at org.jboss.as.test.integration.transaction.inflow.TransactionInflowXid.getUniqueXid(TransactionInflowXid.java:102)
at org.jboss.as.test.integration.transaction.inflow.TransactionInflowResourceAdapter.endpointActivation(TransactionInflowResourceAdapter.java:65)
at org.jboss.jca.core.rar.EndpointImpl.activate(EndpointImpl.java:194)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:277)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:235)
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Perm = ("java.net.SocketPermission" "behemoth.local" "resolve"), CS = (vfs:/content/inflow-txn-ra.rar/inflow-txn-inside.jar <no signer certificates>), CL = ModuleClassLoader for Module "deployment.inflow-txn-ra.rar" from Service Module Loader, ID = 824b419
{noformat}
The cause is that {{org.jboss.as.test.integration.transaction.inflow.TransactionInflowXid#getXid}} calls {{java.net.InetAddress#getLocalHost}} which requires a security manager permission. If the permission is denied (which it always is when running under a security manager), then it falls back through a {{catch (Exception ex)}} to a bogus IP address of "1.2.3.4".
For correct operation, the test archives which use this method should have the {{"*"}} {{"resolve"}} {{SocketPermission}} granted to them.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-10384) Duplicated groupId and version in component-matrix-builder pom
by Brian Stansberry (JIRA)
Brian Stansberry created WFLY-10384:
---------------------------------------
Summary: Duplicated groupId and version in component-matrix-builder pom
Key: WFLY-10384
URL: https://issues.jboss.org/browse/WFLY-10384
Project: WildFly
Issue Type: Bug
Components: Build System
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Minor
The component-matrix-builder pom declares its own groupId and version which are just duplicates of what's in the parent block.
No big deal except it makes the eap-ization commits to create an EAP CD branch a bit more messy and makes it unclear if the G and V are meant to track with the parent.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-10381) AttributeConverter injection fails with EclipseLink if deploy-on-startup = true
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10381?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10381:
-------------------------------------
I forget the jira but I think we proposed a standard way for JPA persistence providers to safely obtain the BeanManager. Will look for the JPA jira issue.
> AttributeConverter injection fails with EclipseLink if deploy-on-startup = true
> -------------------------------------------------------------------------------
>
> Key: WFLY-10381
> URL: https://issues.jboss.org/browse/WFLY-10381
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 12.0.0.Final
> Reporter: Rich DiCroce
> Assignee: Scott Marlow
>
> As of 2.7, EclipseLink implements JPA 2.2 and therefore supports injection into AttributeConverters. Injection fails silently if the eclipselink.deploy-on-startup PU property is set to true, because the BeanManager is not available yet when EclipseLink tries to instantiate the AttributeConverter.
> Workaround: don't set the deploy-on-startup property.
> It would be nice if this could be made to work, but I'm guessing it will be a chicken/egg problem of dependencies between CDI and JPA. So if it can't be made to work, it would be good to at least detect that the PU property has been set, and warn about it in the log.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-10381) AttributeConverter injection fails with EclipseLink if deploy-on-startup = true
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-10381?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-10381:
-------------------------------------
Never mind, I'll unlink the issues as they aren't really related. :)
> AttributeConverter injection fails with EclipseLink if deploy-on-startup = true
> -------------------------------------------------------------------------------
>
> Key: WFLY-10381
> URL: https://issues.jboss.org/browse/WFLY-10381
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 12.0.0.Final
> Reporter: Rich DiCroce
> Assignee: Scott Marlow
>
> As of 2.7, EclipseLink implements JPA 2.2 and therefore supports injection into AttributeConverters. Injection fails silently if the eclipselink.deploy-on-startup PU property is set to true, because the BeanManager is not available yet when EclipseLink tries to instantiate the AttributeConverter.
> Workaround: don't set the deploy-on-startup property.
> It would be nice if this could be made to work, but I'm guessing it will be a chicken/egg problem of dependencies between CDI and JPA. So if it can't be made to work, it would be good to at least detect that the PU property has been set, and warn about it in the log.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-10380) ThreadPoolExecutor leak under SM due to lack of privileged block
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-10380?page=com.atlassian.jira.plugin... ]
David Lloyd updated WFLY-10380:
-------------------------------
Component/s: JMS
/cc [~jmesnil] this seems to be Artemis-related.
> ThreadPoolExecutor leak under SM due to lack of privileged block
> ----------------------------------------------------------------
>
> Key: WFLY-10380
> URL: https://issues.jboss.org/browse/WFLY-10380
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Reporter: David Lloyd
> Priority: Critical
>
> Still researching the source of these leaks.
> The way the leak happens is, a {{java.util.concurrent.ThreadPoolExecutor}} is constructed from an unprivileged context. The pool starts up and threads are created without a problem, however, the thread pool is never shut down. The finalizer runs but since it tries to shut down the pool with an access control context that was captured during construction, it fails because the context did not have the {{modifyThread}} {{RuntimePermission}}, and the thread pool never shuts down.
> We need to identify the points where TPEs are being constructed without controlled privileges.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months
[JBoss JIRA] (WFLY-9567) Setting 'eclipselink.archive.factory' property should NOT depend on 'eclipselink.target-server' being set
by Scott Marlow (JIRA)
[ https://issues.jboss.org/browse/WFLY-9567?page=com.atlassian.jira.plugin.... ]
Scott Marlow closed WFLY-9567.
------------------------------
> Setting 'eclipselink.archive.factory' property should NOT depend on 'eclipselink.target-server' being set
> ---------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9567
> URL: https://issues.jboss.org/browse/WFLY-9567
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Reporter: Lukas Jungmann
> Assignee: Scott Marlow
> Fix For: 12.0.0.CR1, 12.0.0.Final
>
>
> After applying patch from https://bugs.eclipse.org/bugs/show_bug.cgi?id=414974 on EclipseLink side and removing 'eclipselink.archive.factory' from WildFly's JVM options, 99,9% of tests started to fail on the server.
> Problem is that majority of our PU's do have set 'eclipselink.target-server' property (for various reasons) - in this case container as of[1] won't pass its 'eclipselink.archive.factory' to EclipseLink and deployments fail with:
> {noformat}
> [EL Severe]: 2017-11-23 13:14:31.974--ServerSession(1652754085)--Local Exception Stack:
> Exception [EclipseLink-28014] (Eclipse Persistence Services - 2.7.1.qualifier): org.eclipse.persistence.exceptions.EntityManagerSetupException
> Exception Description: Exception was thrown while processing property [eclipselink.descriptor.customizer.Project] with value [org.eclipse.persistence.testing.models.jpa.advanced.Customizer].
> Internal Exception: java.lang.ClassNotFoundException: Project from [Module "deployment.eclipselink-advanced-model.ear.eclipselink-advanced-model_ejb.jar" from Service Module Loader]
> at org.eclipse.persistence.exceptions.EntityManagerSetupException.failedWhileProcessingProperty(EntityManagerSetupException.java:199)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.processDescriptorCustomizers(EntityManagerSetupImpl.java:2941)
> ...
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.ClassNotFoundException: Project from [Module "deployment.eclipselink-advanced-model.ear.eclipselink-advanced-model_ejb.jar" from Service Module Loader]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:348)
> at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:165)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:1321)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.processDescriptorCustomizers(EntityManagerSetupImpl.java:2938)
> ... 82 more
> {noformat}
> [1]: https://github.com/wildfly/wildfly/blob/a10034a/jpa/eclipselink/src/main/...
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months