Skip to content

[Bug]: NullPointerException from ResourceReaper in GenericContainer.stop #11492

Description

@findepi

Module

Core

Testcontainers version

2.0.3

Using the latest Testcontainers version?

Yes

Host OS

Linux

Host Arch

x86

Docker version

GitHub hosted runners

What happened?

java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
	at java.base/java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1125)
	at java.base/java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1116)
	at org.testcontainers.utility.ResourceReaper.stopAndRemoveContainer(ResourceReaper.java:175)
	at org.testcontainers.containers.GenericContainer.stop(GenericContainer.java:652)
	at io.trino.tests.product.launcher.env.DockerContainer.reset(DockerContainer.java:411)
	at io.trino.tests.product.launcher.env.Environment.tryStart(Environment.java:157)

Exact repro steps are unclear.
Based on exceptions logged earlier in the CI run (https://github.com/trinodb/trino/actions/runs/22016571723/job/63619535768?pr=28120) this may be after a failed startup attempt.

Relevant log output

Additional Information

https://github.com/trinodb/trino/actions/runs/22016571723/job/63619535768?pr=28120

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions