tahoe-lafs / magic-folder

Tahoe-LAFS-based file synchronization
Other
26 stars 7 forks source link

Starting folder servies in test_web leaks objects and file descriptors #334

Open tomprince opened 3 years ago

tomprince commented 3 years ago

magic_folder.test.test_web.treq_folders currently leaks resources when start_folder_services=True. I presume either through an object cycle, or something in the services mutates a global.

meejah commented 3 years ago

I have seen this too (esp. when running lots of examples or so, the test-runner can run out of filedescriptors).

meejah commented 3 years ago

(Since startService() gets called in this case, probably what's required is to arrange for stopService() to be called .. )

tomprince commented 3 years ago

(Since startService() gets called in this case, probably what's required is to arrange for stopService() to be called .. )

That should definitely address it, although I'd still be curious what global state is being kept around that doesn't automatically get cleaned up.

meejah commented 3 years ago

Some of the services are infinite-loops, basically (or LoopingCalls) so that's probably enough to keep most of their memory around...?