Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnsure Task-queue doesn't leak tasks of closed pipelines #24096
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The theory of the Performance takes being kept in the task queue seems plausible. Are there other instances of tasks being kept alive even though their document has been discarded?
Originally posted by @asajeffrey in #24072 (comment)
When looking for various potential sources of leaking the document/window, I also looked at the task-queue, since the tasks it contains could keep a
Trusted<Window>and similar constructs.While from debugging it appeared that this wasn't the source of leaks while running this script, from reading the code I did notice a potential problem, in the form of the following scenario:
get_fully_active_document_idsto check whether a task should be "run" or not, and that means that anything that isn't "fully active" potentially remains in the "unactive" queue.The fix is to ensure we drain the inactive and throttled queues of tasks related to a pipeline we are closing, as part of
handle_exit_pipeline_msg