Open Bug 1732611 Opened 3 years ago Updated 2 years ago

Leakage of CDP connections

Categories

(Remote Protocol :: Agent, defect, P3)

defect
Points:
2

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

Details

(Keywords: memory-leak)

The following log shows that we leak CDP connections:

https://treeherder.mozilla.org/logviewer?job_id=352634137&repo=autoland&lineNumber=48403-48467

The problem is that the Target class holds the connections, but only the destructor actually closes them all.

If a client closes the connection itself, the reference to the connection will still remain. As such we should inform consumers of the class by emitting a closed event that the given connection is no longer existent.

The same should actually also happen with the WebDriver BiDi connections given that they have been designed identically.

The actual memory leak shouldn't be that dramatic, but it would be good to get fixed anyway. Also it would improve the investigation of test failures, which would have less cluttered log files.

Points: --- → 2
Priority: -- → P3
Whiteboard: [webdriver:triage] → [bidi-m2-mvp]

The severity field is not set for this bug.
:whimboo, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(hskupin)
Severity: -- → S3
Flags: needinfo?(hskupin)
Flags: needinfo?(hskupin)
Whiteboard: [bidi-m2-mvp] → [bidi-m3-mvp]

I think that the WebDriver BiDi specific issue has been fixed by bug 1742359. As such this should only apply to CDP now.

Currently CDPConnection.onclosed calls session.destructor() for each registered session. But Session.destructor which owns the target, doesn't call the Target.destructor.

That said it's not that important and should not block any WebDriver BiDi milestone.

Flags: needinfo?(hskupin)
See Also: → 1742359
Summary: Leakage of CDP (and WebDriver BiDi) connections → Leakage of CDP connections
Whiteboard: [bidi-m3-mvp]

I quickly tested that but it breaks quite a lot of tests. So it might be more complicated to do that correctly.

You need to log in before you can comment on or make changes to this bug.