[JBoss JIRA] (ISPN-12062) Fail fast if a collection is modified during marshalling
by Nistor Adrian (Jira)
[ https://issues.redhat.com/browse/ISPN-12062?page=com.atlassian.jira.plugi... ]
Nistor Adrian commented on ISPN-12062:
--------------------------------------
But we could be in luck if looking elsewhere. Some marshalling formats, like protobuf, do not write the size for collections, just the elements, so they would never visibly experience the issue in a catastrophic manner. But the problem still remains, in user code: an object should never be modified after it was handed over to the marshalling layer, or after being put in the cache.
> Fail fast if a collection is modified during marshalling
> --------------------------------------------------------
>
> Key: ISPN-12062
> URL: https://issues.redhat.com/browse/ISPN-12062
> Project: Infinispan
> Issue Type: Enhancement
> Components: Marshalling
> Affects Versions: 11.0.0.Final, 10.1.8.Final
> Reporter: Dan Berindei
> Priority: Major
> Fix For: 12.0.0.Final
>
>
> If a collection is modified by a different thread during marshalling, the serialization usually fails with a {{ConcurrentModificationException}}. But in rare cases, {{MarshallUti.marshallCollection()}} may succeed to write a size of {{X}} and then {{Y}} elements.
> {{MarshallUti.marshallCollection()}} could keep track of how many elements it writes and throw an exception at the end if the number of elements it wrote is different from the size it wrote.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months
[JBoss JIRA] (ISPN-12060) WildFly modules integration tests do not work on WildFly 19
by Ryan Emerson (Jira)
[ https://issues.redhat.com/browse/ISPN-12060?page=com.atlassian.jira.plugi... ]
Ryan Emerson resolved ISPN-12060.
---------------------------------
Resolution: Done
> WildFly modules integration tests do not work on WildFly 19
> -----------------------------------------------------------
>
> Key: ISPN-12060
> URL: https://issues.redhat.com/browse/ISPN-12060
> Project: Infinispan
> Issue Type: Bug
> Components: WildFly modules
> Affects Versions: 11.0.0.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.1.Final
>
>
> The modules build with the version of microprofile-config components from WildFly 19.0.0: microprofile-config-api 1.4 and smallrye-config 1.6.2. But the wildfly-modules integration tests run on WildFly 18.0.0, which has microprofile-config-api 1.3 and [smallrye-config 1.3.4|https://github.com/wildfly/wildfly/blob/18.0.x/pom.xml#L278].
> This happens if I change {{appserver.version}} to 19.0.0:
> {noformat}
> 09:23:15.051 [ERROR] org.infinispan.test.integration.as.cdi.GreetingCacheManagerIT Time elapsed: 0.009 s <<< ERROR!
> org.jboss.arquillian.container.spi.client.container.DeploymentException:
> Cannot deploy cdi-cm.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"cdi-cm.war\".WeldStartService" => "Failed to start service
> Caused by: org.jboss.weld.exceptions.DeploymentException: No ConfigProviderResolver implementation found!
> Caused by: java.lang.IllegalStateException: No ConfigProviderResolver implementation found!"}}}}
> {noformat}
> The full exception is
> {noformat}
> 2020-06-29 09:42:15,083 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."cdi-cm.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.u
> nit."cdi-cm.war".WeldStartService: Failed to start service
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
> at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: org.jboss.weld.exceptions.DeploymentException: No ConfigProviderResolver implementation found!
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:38)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:28)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:505)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:93)
> at org.jboss.as.weld@19.1.0.Final//org.jboss.as.weld.WeldStartService.start(WeldStartService.java:98)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
> ... 6 more
> Caused by: java.lang.IllegalStateException: No ConfigProviderResolver implementation found!
> at org.eclipse.microprofile.config.api//org.eclipse.microprofile.config.spi.ConfigProviderResolver.loadSpi(ConfigProviderResolver.java:125)
> at org.eclipse.microprofile.config.api//org.eclipse.microprofile.config.spi.ConfigProviderResolver.instance(ConfigProviderResolver.java:110)
> at org.eclipse.microprofile.config.api//org.eclipse.microprofile.config.ConfigProvider.getConfig(ConfigProvider.java:91)
> at io.smallrye.config//io.smallrye.config.inject.ConfigExtension.validate(ConfigExtension.java:93)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
> at javax.enterprise.api//javax.enterprise.inject.spi.ObserverMethod.notify(ObserverMethod.java:124)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.util.Observers.notify(Observers.java:166)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:285)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:273)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:177)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:171)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:53)
> at org.jboss.weld.core@3.1.3.Final//org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:35)
> ... 12 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months
[JBoss JIRA] (ISPN-12058) wildfly/feature-pack module doesn't build with profile java8-test
by Ryan Emerson (Jira)
[ https://issues.redhat.com/browse/ISPN-12058?page=com.atlassian.jira.plugi... ]
Ryan Emerson resolved ISPN-12058.
---------------------------------
Fix Version/s: (was: 12.0.0.Final)
Resolution: Done
> wildfly/feature-pack module doesn't build with profile java8-test
> -----------------------------------------------------------------
>
> Key: ISPN-12058
> URL: https://issues.redhat.com/browse/ISPN-12058
> Project: Infinispan
> Issue Type: Bug
> Components: Build
> Affects Versions: 11.0.0.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 11.0.1.Final
>
>
> {{wildfly/feature-pack/pom.xml}} uses both {{maven-resource-plugin}} and {{maven-antrun-plugin}} to process the {{module.xml}} files. There are 3 {{maven-resource-plugin}} executions copying the files into the build output directory, then a {{maven-antrun-plugin}} execution (using an external {{build.xml}}) renames the slot directories and replaces the token versions in {{module.xml}} with the actual versions.
> The problem is that all these 4 executions run in the {{generate-resources}} build phase, and Maven does not guarantee any particular order for plugin executions in the same phase. Normally they run in the source order, and everything works, but activating profiles {{java8-test}} and {{rhdg8-snapshots-repository}} changes the order, and the {{maven-antrun-plugin}} execution runs first.
> The result depends on whether a previous build already created the correct {{module.xml}} file in the correct location:
> * If the correct files exist, the {{java8-test}} build will create additional modules without replacing the version tokens. The build will then fail with an error like this:
> {noformat}
> [ERROR] Failed to execute goal org.wildfly.build:wildfly-feature-pack-build-maven-plugin:1.2.13.Final:build (feature-pack-build) on project infinispan-feature-pack: Execution feature-pack-build of goal org.wildfly.build:wildfly-feature-pack-build-maven-plugin:1.2.13.Final:build failed: java.lang.RuntimeException: Some errors were encountered creating the feature pack
> [ERROR] Missing module ModuleIdentifier{name='org.hibernate.search.engine', slot='@hibernate.search.module.slot@'}. Module was required by [ModuleIdentifier{name='org.infinispan', slot='rhdg-8.1'}]
> [ERROR] Missing module ModuleIdentifier{name='org.apache.lucene', slot='@lucene.module.slot@'}. Module was required by [ModuleIdentifier{name='org.infinispan', slot='rhdg-8.1'}]{noformat}
> * If the target directory is empty, the {{maven-antrun-plugin}} will fail because there are no resource files to move+filter:
> {noformat}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.0.0:run (branded-modules) on project infinispan-feature-pack: An Ant BuildException has occured: The following error occurred while executing this line:
> [ERROR] /home/dan/Work/build-jdg/wildfly/feature-pack/build.xml:3: /home/dan/Work/build-jdg/wildfly/feature-pack/target/feature-pack/modules does not exist.
> [ERROR] around Ant part ...<ant antfile="build.xml" inheritRefs="true">... @ 4:49 in /home/dan/Work/build-jdg/wildfly/feature-pack/target/antrun/build-main.xml{noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months
[JBoss JIRA] (ISPN-12062) Fail fast if a collection is modified during marshalling
by Dan Berindei (Jira)
Dan Berindei created ISPN-12062:
-----------------------------------
Summary: Fail fast if a collection is modified during marshalling
Key: ISPN-12062
URL: https://issues.redhat.com/browse/ISPN-12062
Project: Infinispan
Issue Type: Enhancement
Components: Marshalling
Affects Versions: 10.1.8.Final, 11.0.0.Final
Reporter: Dan Berindei
Fix For: 12.0.0.Final
If a collection is modified by a different thread during marshalling, the serialization usually fails with a {{ConcurrentModificationException}}. But in rare cases, {{MarshallUti.marshallCollection()}} may succeed to write a size of {{X}} and then {{Y}} elements.
{{MarshallUti.marshallCollection()}} could keep track of how many elements it writes and throw an exception at the end if the number of elements it wrote is different from the size it wrote.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 6 months