Skip to content

[CI] GoogleCloudStorageBlobContainerRetriesTests.testReadLargeBlobWithRetries fails reproducibly #52607

@mark-vieira

Description

@mark-vieira

We've encountered two failures of GoogleCloudStorageBlobContainerRetriesTests.testReadLargeBlobWithRetries. This failure reproduces locally for me.

org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainerRetriesTests > testReadLargeBlobWithRetries FAILED
    com.google.cloud.storage.StorageException: Connection closed prematurely: bytesRead = 2097151, Content-Length = 2097152
        at __randomizedtesting.SeedInfo.seed([8062D6DCDCB1069C:FAFB08A56F33DF3]:0)
        at com.google.cloud.storage.spi.v1.HttpStorageRpc.translate(HttpStorageRpc.java:227)
        at com.google.cloud.storage.spi.v1.HttpStorageRpc.read(HttpStorageRpc.java:690)
        at com.google.cloud.storage.BlobReadChannel$1.call(BlobReadChannel.java:127)
        at com.google.cloud.storage.BlobReadChannel$1.call(BlobReadChannel.java:124)
        at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:105)
        at com.google.cloud.RetryHelper.run(RetryHelper.java:76)
        at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:50)
        at com.google.cloud.storage.BlobReadChannel.read(BlobReadChannel.java:123)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageRetryingInputStream$1.lambda$read$0(GoogleCloudStorageRetryingInputStream.java:83)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.elasticsearch.repositories.gcs.SocketAccess.doPrivilegedIOException(SocketAccess.java:44)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageRetryingInputStream$1.read(GoogleCloudStorageRetryingInputStream.java:83)
        at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:65)
        at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:109)
        at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageRetryingInputStream.read(GoogleCloudStorageRetryingInputStream.java:126)
        at java.base/java.io.InputStream.read(InputStream.java:205)
        at org.elasticsearch.common.io.Streams.doCopy(Streams.java:86)
        at org.elasticsearch.common.io.Streams.copy(Streams.java:79)
        at org.elasticsearch.common.io.Streams.copy(Streams.java:61)
        at org.elasticsearch.common.io.Streams.readFully(Streams.java:252)
        at org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainerRetriesTests.testReadLargeBlobWithRetries(GoogleCloudStorageBlobContainerRetriesTests.java:228)

        Caused by:
        java.io.IOException: Connection closed prematurely: bytesRead = 2097151, Content-Length = 2097152
            at com.google.api.client.http.javanet.NetHttpResponse$SizeValidatingInputStream.throwIfFalseEOF(NetHttpResponse.java:204)
            at com.google.api.client.http.javanet.NetHttpResponse$SizeValidatingInputStream.read(NetHttpResponse.java:166)
            at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107)
            at com.google.api.client.util.ByteStreams.copy(ByteStreams.java:49)
            at com.google.api.client.util.IOUtils.copy(IOUtils.java:87)
            at com.google.api.client.util.IOUtils.copy(IOUtils.java:59)
            at com.google.api.client.http.HttpResponse.download(HttpResponse.java:386)
            at com.google.cloud.storage.spi.v1.HttpStorageRpc.read(HttpStorageRpc.java:684)
            ... 20 more
REPRODUCE WITH: ./gradlew ':plugins:repository-gcs:test' --tests "org.elasticsearch.repositories.gcs.GoogleCloudStorageBlobContainerRetriesTests.testReadLargeBlobWithRetries" -Dtests.seed=8062D6DCDCB1069C -Dtests.security.manager=true -Dtests.locale=zh -Dtests.timezone=MET -Dcompiler.java=13

master - https://gradle-enterprise.elastic.co/s/bcwgezylwlugc/tests/avmwsupzrdux6-q3hb3jtfyd7iq
7.x - https://gradle-enterprise.elastic.co/s/cr2apsim5ep4y/tests/avmwsupzrdux6-q3hb3jtfyd7iq

Looks like we are barfing after reading exactly 2MB of data. Seems a bit suspect.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions