Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Flink Job manager metaspace classloader leak caused by not releasing PipelineOptionFactory DESERIALIZATION_CONTEXT #29890

Closed
1 of 16 tasks
jinyangzhen opened this issue Jan 2, 2024 · 1 comment

Comments

@jinyangzhen
Copy link

jinyangzhen commented Jan 2, 2024

What happened?

After a beam job (using Flink runner) submitted, the Flink ChildFirstClassLoader is not released after job completion. Observing from its GCRoot, this classloader is not released due to a thread local static variable DESERIALIZATION_CONTEXT being hold by a parking Flink thread. For example:
image

Here is a small example to reproduce this issue.
word-count-beam.tar.gz
Notice: please copy the source file kinglear.txt to /tmp before running this example

I tested this example against below 2 envs locally:
Flink 1.13 + beam-flink-runner-1.13, both JM and TM can observe the same leak.
Flink 1.16 + beam-flink-runner-1.16, only JM can observe this leak.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@jinyangzhen
Copy link
Author

the same issue as #25510

and this bug was introduced from this PR #16680

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

No branches or pull requests

2 participants