Open Bug 881309 Opened 12 years ago Updated 2 years ago

Eliminate LAST_CONTEXT garbage collections in opt builds?

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

Do we really need this, Bill? It can be triggered deep in shutdown, after the CC has stopped running, so I don't know what all it is for.
As Kyle points out, this means that JS_DestroyContextNoGC can actually GC.
I don't know any reason why this is needed. I don't understand all the details of the work to speed up shutdowns, though. Do we still have to worry about failing to write stuff to disk if finalizers aren't run?
Flags: needinfo?(wmccloskey)
(In reply to Bill McCloskey (:billm) from comment #3) > I don't know any reason why this is needed. I don't understand all the > details of the work to speed up shutdowns, though. Do we still have to worry > about failing to write stuff to disk if finalizers aren't run? I believe that what happens is that writes done after whatever point in shutdown are detected and cause a crash. See for instance bug 820852.
Bug 787905 has some details on what happens during the final GC. It all sounds a little scary, so the way forward here might be to rearrange shutdown a bit so the last context ends up dying during CC shutdown. If that's possible. It may not be worth messing around with this, as it is just a wallpaper over something to be fixed by exit(0).
Nothing mentioned in bug 787905 makes me worried about not running the LAST_CONTEXT GC. That bug just says that we clean up more speedily and dangerously when doing the LAST_CONTEXT GC. That's needed to avoid setting off leak detectors, but we don't care about that in opt builds. I guess that comment 2 is sort of saying that stuff is really broken and we should fundamentally change it all, which goes further than the bug title. If we want to fix comment 2, it probably makes sense to wait until contexts go away, at which point we'll have to find a new trigger to do these final GCs anyway.
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.