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

Open file descriptor leak in qdisc? #285

Closed
dreamerlzl opened this issue May 27, 2024 · 3 comments
Closed

Open file descriptor leak in qdisc? #285

dreamerlzl opened this issue May 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dreamerlzl
Copy link
Contributor

dreamerlzl commented May 27, 2024

Environment

kubeskoop version: v0.1.1
configuration:

port: 9102
sinks:
  - name: stderr
enable_controller: false
metrics:
  probes:
  - name: qdisc

What happened?

The number of open file descriptors by kubeskoop's container inspector keeps increasing until reaching the node limit.

1916C563-11AE-4D98-8938-D5981CB4AB46

here in the picture, there are 6 namespaces in the k8s cluster. The number of open fd increases periodically.

What is expected to happen?

The count of open file descriptor by kubeskoop doesn't grow infinitely, or
the maximum of open file descriptors allowed for kubeskoop is configurable or have a reasonable default value during launch.

How to reproduce

Run kubeskoop in any real k8s cluster where the nodes are bare metals.

@dreamerlzl dreamerlzl changed the title Open file descriptor leak? Open file descriptor leak in qdisc? May 28, 2024
@jzwlqx
Copy link
Collaborator

jzwlqx commented May 31, 2024

@dreamerlzl hi, I didn't see this issue in my own environment.

Which process had the pid 3786437 in your screenshot, and this issue only happened in bare metal k8s nodes?

@jzwlqx
Copy link
Collaborator

jzwlqx commented May 31, 2024

I got it. I previously added a todo in the code to remind myself to check whether the file descriptor was closed, but I ended up forgetting about it.

//TODO check whether we should close the opened file

@jzwlqx jzwlqx added the bug Something isn't working label May 31, 2024
@dreamerlzl
Copy link
Contributor Author

@dreamerlzl hi, I didn't see this issue in my own environment.

Which process had the pid 3786437 in your screenshot, and this issue only happened in bare metal k8s nodes?

Thank you for the reply.
The process in the snapshot is inspector, sorry for missing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants