Application driver Pod is not terminated when Spark is OOMKilled

Open
#780 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@razvan is already working on this.

Since Oct 2, 2026.

Assessment

This issue has not been assessed yet.

Description

type/bug
Affected Stackable version

all

Affected Apache Spark-on-Kubernetes version

No response

Current and expected behavior

When a Spark driver is OOMKilled, the Pod doesn't terminate.

The vector container keeps running even after the Spark process is gone because no Vector shutdown file is generated. This container then prevents the Pod from being terminated.

A shutdown file for vector cannot be generated in this case because SIGKILL cannot be trapped.

A workaround for this problem is to use a livenessProbe on the vector container that connects to the driver's communication port (7078 by default).

Possible solution

A more robust and elegant solution is to turn the vector container into a native sidecar container.

Then Vector would be terminated whenever the main container is terminated. To still give it time collect any remainnig log files, a preStop hook can be used instead of the existing STACKABLE_POST_HOOK.

This solution is a breaking change for anyone using podOverrides to change the vector container. This needs to be documented in the changelog and the release notes.

This change requires Kubernetes >1.33 (which SDP doesn't officially support anymore) but there might still be users running it.

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

yes

Dominant language
Rust
Stars
74
Forks
6
Avg merge
1d 1h
Merged PRs (30d)
15

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stackabletech/spark-k8s-operator

All issues in stackabletech/spark-k8s-operator

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.