Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sisu-dev] Thread safety of plexus container impl ?

https://github.com/krosenvold/maven branch parallelPluginConstruction

There may/will be other issues, but my favourite problem so far is
this one. Build this maven version and run any old test project with
mvn -e install
(I use plexus-utils because it's small). This will fail most of the time.


Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar
failed: Unable to load the mojo 'jar' (or one of its required
components) from the plugin
'org.apache.maven.plugins:maven-jar-plugin:2.4'
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:120)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:247)
	... 19 more
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to
load the mojo 'jar' (or one of its required components) from the
plugin 'org.apache.maven.plugins:maven-jar-plugin:2.4'
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:492)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)
	... 20 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException:
java.util.NoSuchElementException
      role: org.apache.maven.plugin.Mojo
  roleHint: org.apache.maven.plugins:maven-jar-plugin:2.4:jar
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:264)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:459)
	... 21 more
Caused by: java.util.NoSuchElementException
	at org.eclipse.sisu.plexus.RealmFilter$FilteredItr.next(RealmFilter.java:118)
	at org.eclipse.sisu.plexus.RealmFilter$FilteredItr.next(RealmFilter.java:1)
	at org.eclipse.sisu.plexus.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:76)
	at org.eclipse.sisu.plexus.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:1)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
	... 23 more

Kristian


2013/8/20 Stuart McCulloch <mcculls@xxxxxxxxx>:
> Hi Kristian,
>
> The Sisu-Inject layer is thread-safe wrt concurrent lookup and plugin
> (de)registration and there are a number of tests to exercise this. (In
> general the codebase is written with thread safety in mind.)
>
> The Plexus adapter lookup code is also thread-safe but there are a few
> places in the container API that are not (as a simplification because the
> legacy use of those methods was always single-threaded).
>
> It should be straightforward to make the affected Plexus adapter methods
> thread-safe - could you raise a feature request on bugzilla and add a link
> to the Maven branch you use for testing? It would also be useful to see any
> relevant exceptions / error logs.
>
> Thanks in advance.
>
> On Aug 20, 2013 9:59 PM, "Kristian Rosenvold" <kristian.rosenvold@xxxxxxxxx>
> wrote:
>>
>> I have been experimenting with concurrent loading of plugins for maven
>> core, and I am seeing some nice improvements.
>>
>> Sisu is quite obviously not thread-safe in the construction of the
>> context, calling discoverComponents concurrently with lookup make
>> stuff fail badly. This is not surprising.
>>
>> How deep does this run in the actual design of sisu/guice ?
>>
>> Kristian
>> _______________________________________________
>> sisu-dev mailing list
>> sisu-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/sisu-dev
>
>
> _______________________________________________
> sisu-dev mailing list
> sisu-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/sisu-dev
>


Back to the top