Search before asking
DeepFlow Component
Agent
What you expected to happen
The deepflow-agent should run without panicking in a serverless environment. The agent panics due to an unwrap() on a None value within the cgroups-rs dependency.
Log:
[2025-07-11 15:08:24.864020 +08:00] ERROR [src/main.rs:111] panicked at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/cgroups-rs-0.2.11/src/memory.rs:135:32:
called `Option::unwrap()` on a `None` value
[2025-07-11 15:08:24.864099 +08:00] ERROR [src/main.rs:112] 0: deepflow_agent::main::{{closure}}
How to reproduce
Run the deepflow-agent in a serverless environment where cgroup files are not available.
DeepFlow version
I will need you to provide the output of kubectl exec -it -n deepflow ds/deepflow-agent -- deepflow-agent -v
11800-5c4ccc85dcd6f96147a7805ca07b36d2409b2485
Name: deepflow-agent community edition
Branch: v6.6
CommitId: 5c4ccc8
RevCount: 11800
Compiler: rustc 1.77.1 (7cf61ebde 2024-03-27)
CompileTime: 2025-07-01 09:43:59
Anything else
The panic occurs in the cgroups-rs dependency, which suggests that the agent is trying to access a cgroup file that is not available in the serverless environment. The current Cargo.toml for the agent specifies cgroups-rs = "0.2.9", but the panic is in version 0.2.11.
Suggested fix:
- Update the
cgroups-rs dependency to the latest version.
- Ensure that the code handles potential
None values gracefully when reading from cgroup files to avoid panics in environments where these files may not be present.
Are you willing to submit a PR?
Code of Conduct
Search before asking
feature requirement.
DeepFlow Component
Agent
What you expected to happen
The
deepflow-agentshould run without panicking in a serverless environment. The agent panics due to anunwrap()on aNonevalue within thecgroups-rsdependency.Log:
How to reproduce
Run the
deepflow-agentin a serverless environment where cgroup files are not available.DeepFlow version
I will need you to provide the output of
kubectl exec -it -n deepflow ds/deepflow-agent -- deepflow-agent -v11800-5c4ccc85dcd6f96147a7805ca07b36d2409b2485
Name: deepflow-agent community edition
Branch: v6.6
CommitId: 5c4ccc8
RevCount: 11800
Compiler: rustc 1.77.1 (7cf61ebde 2024-03-27)
CompileTime: 2025-07-01 09:43:59
Anything else
The panic occurs in the
cgroups-rsdependency, which suggests that the agent is trying to access a cgroup file that is not available in the serverless environment. The currentCargo.tomlfor the agent specifiescgroups-rs = "0.2.9", but the panic is in version0.2.11.Suggested fix:
cgroups-rsdependency to the latest version.Nonevalues gracefully when reading from cgroup files to avoid panics in environments where these files may not be present.Are you willing to submit a PR?
Code of Conduct