fake-gcs-server icon indicating copy to clipboard operation
fake-gcs-server copied to clipboard

Panic runtime error on 1.47.8

Open nordnet-robkui opened this issue 1 year ago • 2 comments

We're using the fake-gcs-server container for tests in our application. We're getting the error message below when using the latest version 1.47.8. Running these tests locally using Mac M1 works fine with 1.47.8, but not on Linux (debian:12.5-slim). Downgrading to 1.47.7 makes it work fine everywhere.

Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (<IP> ports: [<PORT>] should be listening)
	at org.testcontainers.containers.wait.strategy.HostPortWaitStrategy.waitUntilReady(HostPortWaitStrategy.java:112)
	at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
	at org.testcontainers.containers.GenericContainer.waitUntilContainerStarted(GenericContainer.java:912)
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:503)
	... 130 common frames omitted
ERROR Log output from the failed container:
panic: runtime error: slice bounds out of range [125:64]

goroutine 1 [running]:
os.(*File).ReadAt(0xa8980e8, {0xa8a2e03, 0x40, 0x40}, 0x0)
	/usr/local/go/src/os/file.go:142 +0x1f3
google.golang.org/protobuf/internal/detrand.binaryHash()
	/go/pkg/mod/google.golang.org/[email protected]/internal/detrand/rand.go:63 +0x2c2
google.golang.org/protobuf/internal/detrand.init()
	/go/pkg/mod/google.golang.org/[email protected]/internal/detrand/rand.go:38 +0x1a

nordnet-robkui avatar Mar 12 '24 08:03 nordnet-robkui

Hmm that's interesting, I don't see anything in 1.47.8 that could've caused this (unless it's caused by a dependency upgrade).

Do you have more logs? The stacktrace is cut-off there. Alternatively, can you provide instructions for reproducing the issue? Thanks!

fsouza avatar Mar 13 '24 20:03 fsouza

Thanks for responding. I don't have anymore logs right now, but I'm aiming to create a reproducible stripped example. I just need to find some time at work. I'll get back to you when I got more data/logs.

The interesting part is that it worked fine last week on our Linux build server 😅 So, in essence it worked for some time using the new version, but then all of a sudden it didn't.

nordnet-robkui avatar Mar 14 '24 10:03 nordnet-robkui

We also see this problem, 1.47.8 works fine on CI but we get test timeouts locally on both Linux and MacOS. 1.47.7 has no such issues.

glebbash avatar Mar 20 '24 15:03 glebbash

Given that between 1.47.7 and 1.47.8 the only difference was that we bumped some dependencies, can you give that another shot now that 1.48.0 is out?

fsouza avatar Mar 23 '24 18:03 fsouza

I just tried 1.48.0 and it seems to work fine on my small example 👍 I'll try it out on all our tests.

nordnet-robkui avatar Mar 25 '24 08:03 nordnet-robkui

Same here, 1.48 fixed the issue 🎇

glebbash avatar Mar 25 '24 10:03 glebbash

Our tests pass using 1.48.0. I'm closing the issue.

nordnet-robkui avatar Mar 25 '24 14:03 nordnet-robkui