Stream: brlcad

Topic: file descriptor leak


view this post on Zulip starseeker (Aug 19 2020 at 12:08):

I can confirm seeing the file descriptor leak from ged_test_list, and according to valgrind it's the process.c:290 assignment (looks like specifically fd_in)

view this post on Zulip Sean (Aug 19 2020 at 13:43):

for what it's worth, I vaguely recall putting a Tcl_Sleep throttle into the event processing and it having negative effect.
sometimes events stream fast, dozens per second, and a throttle stalls the loop

view this post on Zulip starseeker (Aug 19 2020 at 13:44):

Would a raw sleep call be safer?

view this post on Zulip starseeker (Aug 19 2020 at 13:46):

Or do you mean it just drags down the execution time too much? I did see that if I used larger values.

view this post on Zulip Sean (Aug 19 2020 at 13:48):

no, it just literally stalls the process for however much time, so if there are 100 pending events for example, it's going to take "100 x sleeptime" to get through them all

view this post on Zulip Sean (Aug 19 2020 at 13:48):

I was surprised to find that many could cluster up, but it happens

view this post on Zulip starseeker (Aug 19 2020 at 14:00):

Hmm. Well, I don't know that the sleep call is needed - maybe just skip it until it proves necessary?

view this post on Zulip starseeker (Aug 19 2020 at 15:13):

btw, I noticed if rt doesn't exit cleanly, it also leaks a file descriptor in most cases by not freeing the rtip. Is it worth going through and cleaning up the rtips before bu_exit calls to avoid the leaks?


Last updated: Oct 09 2024 at 00:44 UTC