-
Notifications
You must be signed in to change notification settings - Fork 144
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
Launch leaks loggers liberally #416
Comments
So, on one hand we have internal I agree though that each action could and should shutdown their loggers, if any.
That is true. And we could do better in many places.
That is correct, but the only way to shutdown all |
What are these logging needs? Do they consist of having more than one logger per subprocess stream? If not, there is no need to go through the logging infrastructure, in which case we can just use the
It seems that if that sort of flexibility is needed, it could be done with a QueueHandler. |
In the most general case, different log formats and sinks for each process output descriptor. See
I guess you could bypass much of the logging infrastructure, manually creating log records and such, but I fail to see why would you do that. Note this has nothing to do with explicitly cleaning up resources. That we can do.
Sure, yeah, there're multiple ways to do it. The question is if we should. |
Excellent! I love good documentation and can definitely preserve that behavior.
We would do that because right now we're abusing the logging infrastructure, particularly Also, we're altering the global logging configuration so any loggers that get created after
Agreed. I don't think it's the easiest approach nor the most correct one. Would you like to take a crack at a fix PR or should I? |
If you have the time, go ahead. Many of your concerns are perfectly valid ones, but do bear in mind that the intent was (and is) to not re-implement |
I don't understand what you mean. Explain? |
|
I still don't quite understand how this can fit into a larger application/library.
Am I missing a piece of the puzzle? At any rate, I'm sure I can do this without reinventing |
Any application can use a With this I'm not saying it cannot be made better, but that we should try not making it worse. |
Perhaps related: #793. My workaround involved running |
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
No leaks are reported.
Actual behavior
Many filehandle leaks are reported.
Additional information
These are all launch handlers registered in launch.
There are a few problems with our logging setup:
launch/launch/launch/logging/__init__.py
Lines 454 to 455 in cac43b1
launch
and maybe one logging handler per subprocess, that lives no longer than the subprocess.launch/launch/launch/actions/execute_process.py
Line 617 in cac43b1
launch/launch/launch/logging/__init__.py
Lines 431 to 432 in cac43b1
all_loggers
that gets arbitrarily long.launch/launch/launch/logging/__init__.py
Lines 436 to 447 in cac43b1
The text was updated successfully, but these errors were encountered: