gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

Investigate why dependency resolution blocks while resolving metadata from project dependencies #897

Closed big-guy closed 5 years ago

adammurdoch commented 5 years ago

To reproduce this, run ./gradlew userguide javadocAll on the gradle/gradle build. You can see on the console a bunch of classpathManifest tasks blocked waiting to resolve dependencies of the runtimeClasspath configuration while docs:userguideSinglePage is running (and which is really slow for some reason).

adammurdoch commented 5 years ago

Looking at the thread dump, it seems the worker threads for these tasks are down in ProjectDependencyResolver.resolveArtifacts() waiting to acquire a mutation lock on a project. So It seems that the metadata construction is actually ok, at least in this scenario, but the problem lies with resolving the artifacts for the target project + configuration.

lacasseio commented 5 years ago

I don't know if this is related to this issue but I'm getting a deadlock using latest master and a source dependency. The build lock when compiling the buildSrc of the source project. To reproduce you can checkout the lacasseio/exemplar branch and just try to build the project. I got the following thread dump.

big-guy commented 5 years ago

@lacasseio can you open this as an issue on gradle/gradle and assign it to 5.0RC1?

ghale commented 5 years ago

I've created https://github.com/gradle/gradle-native/issues/899 to capture the issue above.

adammurdoch commented 5 years ago

Split out #902, #903 and #904 based on the investigation. Closing this issue.