vlsi / vlsi-release-plugins

A set of plugins to simplify Gradle release tasks
Apache License 2.0
41 stars 13 forks source link

Circular timeout exceptions #24

Open vlsi opened 5 years ago

vlsi commented 5 years ago
java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key e2b3d84202b812d9 for org.assertj:assertj-core:3.9.0@jar.asc>> after 40 iterations and 417ms
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
        Suppressed: java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms
                ... 6 more
        Caused by: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms
                at com.github.vlsi.gradle.checksum.pgp.Retry.invoke(Retry.kt:225)
                at com.github.vlsi.gradle.checksum.pgp.KeyDownloader.findKey(KeyDownloader.kt:72)
                at com.github.vlsi.gradle.checksum.pgp.KeyStore$loadKey$keyStream$keyBytes$1.invoke(KeyStore.kt:78)
                at com.github.vlsi.gradle.checksum.pgp.KeyStore$loadKey$keyStream$keyBytes$1.invoke(KeyStore.kt:34)
                at com.github.vlsi.gradle.checksum.Stopwatch.invoke(Stopwatch.kt:36)
                at com.github.vlsi.gradle.checksum.Stopwatch.invoke$default(Stopwatch.kt:31)
                at com.github.vlsi.gradle.checksum.pgp.KeyStore.loadKey(KeyStore.kt:78)
                at com.github.vlsi.gradle.checksum.pgp.KeyStore.access$loadKey(KeyStore.kt:34)
                at com.github.vlsi.gradle.checksum.pgp.KeyStore$getKeyAsync$$inlined$read$lambda$1$1.get(KeyStore.kt:59)
                at com.github.vlsi.gradle.checksum.pgp.KeyStore$getKeyAsync$$inlined$read$lambda$1$1.get(KeyStore.kt:34)
                at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
                ... 3 more
        [CIRCULAR REFERENCE:java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms]
        [CIRCULAR REFERENCE:java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms]
        [CIRCULAR REFERENCE:java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms]
        [CIRCULAR REFERENCE:java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms]
        [CIRCULAR REFERENCE:java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 466caed6e0747d50 for org.codehaus.plexus:plexus-component-annotations:1.6@jar.asc>> after 40 iterations and 410ms]
Caused by: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key e2b3d84202b812d9 for org.assertj:assertj-core:3.9.0@jar.asc>> after 40 iterations and 417ms
        at com.github.vlsi.gradle.checksum.pgp.Retry.invoke(Retry.kt:225)
        at com.github.vlsi.gradle.checksum.pgp.KeyDownloader.findKey(KeyDownloader.kt:72)
        at com.github.vlsi.gradle.checksum.pgp.KeyStore$loadKey$keyStream$keyBytes$1.invoke(KeyStore.kt:78)
        at com.github.vlsi.gradle.checksum.pgp.KeyStore$loadKey$keyStream$keyBytes$1.invoke(KeyStore.kt:34)
        at com.github.vlsi.gradle.checksum.Stopwatch.invoke(Stopwatch.kt:36)
        at com.github.vlsi.gradle.checksum.Stopwatch.invoke$default(Stopwatch.kt:31)
        at com.github.vlsi.gradle.checksum.pgp.KeyStore.loadKey(KeyStore.kt:78)
        at com.github.vlsi.gradle.checksum.pgp.KeyStore.access$loadKey(KeyStore.kt:34)
        at com.github.vlsi.gradle.checksum.pgp.KeyStore$getKeyAsync$$inlined$read$lambda$1$1.get(KeyStore.kt:59)
        at com.github.vlsi.gradle.checksum.pgp.KeyStore$getKeyAsync$$inlined$read$lambda$1$1.get(KeyStore.kt:34)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
        ... 3 more
tedyyu commented 3 years ago

Hi @vlsi ,

Is this timeout issue fixed? I met a similar problem when building jmeter rel/4.5 and rel/4.5.1 on Ubuntu 20.04/Java8. https://stackoverflow.com/questions/69100485/fail-to-build-jmeter-using-gradlew-exception-self-suppression-not-permitted

scan log: https://scans.gradle.com/s/6dln6uvdiykec

Any clue? Thanks in advance.

Regards, Tedy

tedyyu commented 3 years ago

I rethink it a little, probably the failure is due to org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72 cannot be found? How can we specify newer plugin version for it? I'm pretty new to gradle and kotlin.

vlsi commented 3 years ago

The failure is Downloading key 6a0975f8b1127b83 for .. which means it failed to download the public key, so the fix would be to commit the keys into jmeter sources: https://github.com/vlsi/vlsi-release-plugins/issues/42#issuecomment-806468474

tedyyu commented 3 years ago

Thanks for the info. Besides using -PchecksumIgnore to skip the validation, how or where should I put the key files of this plugin?

I assume following key files, right? kotlin-gradle-plugin-1.3.72.jar.asc 2020-04-14 10:33 650
kotlin-gradle-plugin-1.3.72.jar.asc.md5 2020-04-14 10:33 32
kotlin-gradle-plugin-1.3.72.jar.asc.sha1 2020-04-14 10:33 40

Another question, do you know where can I change this 1.3.72 version to some other, e.g. 1.4.32?

vlsi commented 3 years ago

I assume following key files, right? kotlin-gradle-plugin-1.3.72.jar.asc 2020-04-14 10:33 650

The files were just fine. The one that fails is https://keyserver.ubuntu.com/pks/lookup?search=0x6a0975f8b1127b83&fingerprint=on&op=index

Could you re-run the build with --info to see which URLs are attempted to retrieve 0x6a0975f8b1127b83?

tedyyu commented 3 years ago

Sure, here it is:

    Line 180: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 1 of 40, 37.218.245.50, hkp://keys.openpgp.org)
    Line 192: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 2 of 40, 162.213.33.9, https://keyserver.ubuntu.com)
    Line 204: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 3 of 40, 37.218.245.50, hkp://keys.openpgp.org)
    Line 216: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 4 of 40, 162.213.33.9, https://keyserver.ubuntu.com)
    Line 229: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 5 of 40, 2a00:c6c0:0:154:1:0:0:1, hkp://keys.openpgp.org)
    Line 231: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 6 of 40, 162.213.33.8, https://keyserver.ubuntu.com)
    Line 244: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 7 of 40, 2a00:c6c0:0:154:1:0:0:1, hkp://keys.openpgp.org)
    Line 256: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 8 of 40, 162.213.33.9, https://keyserver.ubuntu.com)
    Line 280: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 9 of 40, 2a00:c6c0:0:154:1:0:0:1, hkp://keys.openpgp.org)
vlsi commented 3 years ago

What comes after Downloading key...? The key is present at https://keys.openpgp.org/search?q=0x6a0975f8b1127b83, so the download should succeed.

tedyyu commented 3 years ago

Here is the log starting from line 280 - it looks to me a timeout problem: Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc (attempt 9 of 40, 2a00:c6c0:0:154:1:0:0:1, hkp://keys.openpgp.org) Downloading key 7eb97d110dfadd60 for com.googlecode.concurrent-trees:concurrent-trees:2.6.1@jar.asc (attempt 8 of 40, 162.213.33.9, https://keyserver.ubuntu.com) Downloading key 7a01b0f236e5430f for com.google.code.gson:gson:2.8.5@jar.asc (attempt 8 of 40, 162.213.33.8, https://keyserver.ubuntu.com) Next attempt requires to a delay of 8 seconds. The action is InetAddressTask(inetAddress=keys.openpgp.org/37.218.245.50,uri=hkp://keys.openpgp.org) checksum-dependency elapsed time: 200084ms, configurations processed: 4 SHA-512 computation time: 3ms (goes in parallel, it might exceed wall-clock time), files processed: 1, processed: 0MiB, skipped: 63MiB PGP signature resolution time: 23ms (wall-clock), resolution requests: 3, signatures resolved: 42 PGP key resolution time: 200006ms (wall-clock), resolution requests: 3, download time: 2400003ms (goes in parallel, it might exceed wall-clock time), keys downloaded: 12 PGP signature verification time: 0ms (goes in parallel, it might exceed wall-clock time), files processed: 0, processed: 0MiB, skipped: 0MiB Saving updated checksum.xml as /some/path/to/jmeter-rel-v5.4.1/buildSrc/build/checksum/checksum.xml checksum-dependency elapsed time: 0ms, configurations processed: 0 (add -PchecksumTimingsPrint to print detailed timings) Saving updated checksum.xml as /some/path/to/jmeter-rel-v5.4.1/build/checksum/checksum.xml

FAILURE: Build failed with an exception.

BUILD FAILED in 3m 22s

alps-sun commented 2 years ago

Here is a similar problem when building apache-jmeter-5.4.3:

Caused by: java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc>> after 7 iterations and 30008ms
Caused by: java.util.concurrent.TimeoutException: Stopping retry attempts for <<Downloading key 6a0975f8b1127b83 for org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72@jar.asc>> after 7 iterations and 30008ms
    at com.github.vlsi.gradle.checksum.pgp.Retry.invoke(Retry.kt:226)
    at com.github.vlsi.gradle.checksum.pgp.KeyDownloader.findKey(KeyDownloader.kt:72)
    at com.github.vlsi.gradle.checksum.pgp.KeyStore$loadKey$keyStream$keyBytes$1.invoke(KeyStore.kt:78)
    at com.github.vlsi.gradle.checksum.pgp.KeyStore$loadKey$keyStream$keyBytes$1.invoke(KeyStore.kt:34)
    at com.github.vlsi.gradle.checksum.Stopwatch.invoke(Stopwatch.kt:36)
    at com.github.vlsi.gradle.checksum.Stopwatch.invoke$default(Stopwatch.kt:31)
    at com.github.vlsi.gradle.checksum.pgp.KeyStore.loadKey(KeyStore.kt:78)
    at com.github.vlsi.gradle.checksum.pgp.KeyStore.access$loadKey(KeyStore.kt:34)
    at com.github.vlsi.gradle.checksum.pgp.KeyStore$getKeyAsync$$inlined$read$lambda$1$1.get(KeyStore.kt:59)
    at com.github.vlsi.gradle.checksum.pgp.KeyStore$getKeyAsync$$inlined$read$lambda$1$1.get(KeyStore.kt:34)
alps-sun commented 2 years ago

Caused by: java.lang.IllegalArgumentException: Self-suppression not permitted

baijingchuan commented 1 year ago

Here is a similar problem when building apache-jmeter-5.4.1: `A problem occurred configuring project ':buildSrc'.

Self-suppression not permitted