Skip to content

Conversation

@Haoning-Sun
Copy link

I have been using Parca and made some modifications to allow it to stop and restart the tracer. After each restart, the number of open file descriptors increases. This commit aims to fix the resource leak issue that occurs when closing.

@Haoning-Sun Haoning-Sun requested review from a team as code owners October 27, 2025 08:54
@christos68k
Copy link
Member

christos68k commented Oct 27, 2025

I'm a bit apprehensive to accept this as we did not design any major subsystem of the profiler to be restartable. The profiler is currently designed to start the subsystems and run until stopped (but not restarted), which means that there could be implicit dependencies between subsystems and/or other hidden assumptions that would cause issues on restart.

Given some of the very hard to debug synchronization-across-subsystem issues that we ran into in the past, I think we should be very careful when moving in this direction, and change the code based on a holistic understanding of how subsystems interact with each other. This means that, at a minimum, a design document needs to be written and reviewed.

If you want this for updating the sampling frequency, does my suggestion in this comment not work for you?

@Haoning-Sun
Copy link
Author

I'm a bit apprehensive to accept this as we did not design any major subsystem of the profiler to be restartable. The profiler is currently designed to start the subsystems and run until stopped (but not restarted), which means that there could be implicit dependencies between subsystems and/or other hidden assumptions that would cause issues on restart.

Given some of the very hard to debug synchronization-across-subsystem issues that we ran into in the past, I think we should be very careful when moving in this direction, and change the code based on a holistic understanding of how subsystems interact with each other. This means that, at a minimum, a design document needs to be written and reviewed.

If you want this for updating the sampling frequency, does my suggestion in this comment not work for you?

Both restarting the tracer and updating the sampling frequency are necessary. I’m not sure I fully grasp the relationship between the subsystems yet, so I'll run it internally for a while to check for any issues.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants