On 06/30/2016 11:49 AM, Nicolas Silva wrote:
Hi dev-platform,

We had a session about shutdown problems during the London workweek. I
did a writeup of what was discussed and as it grew into a large-ish
piece, I put it in a wiki page (instead of the email I intended to send
initially) [1].
There's been a lot of work on reducing shutdown crashes/hangs
(especially with e10s) this year, but we still have a lot of work to do
[2].

The page contains some discussions about the kinds of issues we ran into
in the gfx team and of how we went about addressing some of them. If you
are working on shutdown problems, you may (or may not) find useful
information in there. If you have some experience with dealing with
shutdown bugs, I encourage you to do a brain dump on that wiki page.

There's also a two-phase shutdown proposal briefly described in there
[3], that is worth discussing because it would involve some cooperation
between different modules.

"Phase 1: All modules destroy all of their dynamic objects, but stay in a usable state. No more DOM objects or documents or gpu textures floating around at the end of this phase. If the cycle collector is still retaining resources at this point, it's a bug. "

Not sure if this matters here, but cycle collector doesn't really retain objects. Sure, we could explicitly clear so called jsholders, so that C++->JS edges are manually cut. But in general, CC doesn't know about a cycle collectable objects unless the object has been addrefed/released after the previous cycle collection.
(those operations make the object suspected, so the object is put to cycle 
collector's purple buffer).

Note, we do have shutdown leaks occasionally dealing with cycle collectable objects. It may be because of some JS using random services in a bad way or someone forgetting to traverse/unlink some cycle collabtable member variable, or non-cycle collectable object keeping a strong reference to a cycle collectable object etc. Shutdown leaks are always considered bugs, so nothing new there, but they do happen and other code needs to be aware of it and not crash in a bad way if that happens.





Cheers,

Nical

[1] https://wiki.mozilla.org/Gecko:Shutdown_issues
[2]
https://crash-stats.mozilla.com/search/?product=Firefox&shutdown_progress=shutdown&_facets=signature&_columns=date&_columns=signature&_columns=version&_columns=build_id&_columns=platform&_columns=shutdown_progress#facet-signature
[3]
https://wiki.mozilla.org/Gecko:Shutdown_issues#Two-phase_shutdown_proposal


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to