Complete
Details
Details
Assignee
Caleb
CalebReporter
Caleb
CalebLabels
Components
Fix versions
Affects versions
Priority
More fields
More fields
Katalon Platform
Katalon Platform
Created May 20, 2021 at 2:29 AM
Updated July 6, 2022 at 9:00 PM
Resolved May 20, 2021 at 2:14 PM
For reasons that aren't very clear, multipath.query() is allocating memory that is never freed in the io_thread pool. We're using lxml in that module and, eventually, we end up in _ParserDictionaryContext in lxml. That particular function does some fancy stuff for having a shared global dictionary per thread and "deduplicates" name entries when processing xml data. The idea is that the names of the attributes being processed in the xml document aren't going to change very often. Once everything is "cached" it "doesn't grow". This was added to lxml for the obvious speed improvements, however, it's causing problems in our thread pool. I suspect it's because we're using daemon=True for all our threads which means the resources for said thread isn't cleaned up properly (safely).
Instead of using lxml in the multipath module, use the built-in xml library since we're not using anything in lxml that isn't already present in the shipped xml library with base python.