Closed Bug 1083897 Opened 11 years ago Closed 11 years ago

Require leak logs for tab processes

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(firefox38 disabled)

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- disabled

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

(Whiteboard: [MemShrink:P2])

Attachments

(2 files, 1 obsolete file)

Leak logging is (sort of) working on Linux now. Unfortunately as we've seen random code can break leak logging without turning the tree orange, and then that code or later code can introduce leaks, which is bad. So we should probably enable requiring logs ASAP.
This isn't quite ready to go, but I want to have a reviewed patch in hand when it is.
Attachment #8506251 - Flags: review?(khuey)
Depends on: 1062443
Depends on: 1062472
Depends on: 1087509
Depends on: 1087518
Depends on: 1087537
What is blocking this now is various cases where we send messages late in shutdown on debug builds. with this patch, with exit(0) on late messages: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=3a3d4a617070 with this patch, with no exit(0) on late messages: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=d7b5ee61b1af
Blocks: 1087613
Benjamin - Right now we have a slew of IPDL things that send messages late in shutdown, causing us to exit(0) in the child process (see the bugs blocking this one). This prevents us from getting leak logs consistently in the child process (this bug). There are two possible solutions: 1. Fix all of these blocking bugs, so we never send messages late. This will be a bit tedious and may take a while. 2. Hack it so that we still don't send a message in this case, but we also don't exit(0). This leaves us in the state where we aren't sending messages some places when we might expect it. (Note that we don't report any error for this right now in a way that shows up on TBPL, so we're not really noticing this anyways...) I asked Ben T., and he described himself as "kinda meh" on these options, and that I should ask you. Do you have a strong preference between the two of these? If not, I'm inclined to go with option 2. Thanks.
Flags: needinfo?(benjamin)
I guess that depends on the goal, I think. Option 1 is the expedient way to test *something*, but it will certainly cause more random orange. In particular if we start dropping messages on the floor, we are going to start leaking the objects related to those messages in some cases. Option 2 seems like the thing we should be striving for. And even I think we should have some related invariants: * There are no toplevel IPDL actors when we begin XPCOM shutdown. * There are no active IPC Channel objects when we begin XPCOM shutdown. That means we'll have to do the work to make sure we shut down actors/IPC before we begin shutdown, but it also means that we won't have to worry about the particular bug of having pending messages flying around during shutdown. I'm sorry that's not a straight-up answer to the question. I expect that if you do option 1, you're going to end up being on the hook for option 2 later anyway, simply because of the randomorange.
Flags: needinfo?(benjamin)
Did you reverse option 1 and 2 there compared to what I had in comment 3 or am I just not understanding your point? I don't understand how the hacky solution (just keep going if we send messages late) is something to be striving for. ;)
Flags: needinfo?(benjamin)
Yes, I reversed them.
Flags: needinfo?(benjamin)
No longer depends on: 1062443, 1062472, 1087509, 1087518, 1087537
Depends on: 1091766
Whiteboard: [MemShrink]
This is getting closer to being ready, but on Windows we intentionally exit(0) before we produce a leak log, due to an intermittent XP debug failure. I was thinking this would be okay for now because we don't run e10s tests on Windows yet, but I forgot that we still do run some tests out-of-process in regular Mochitests. Maybe I can dig around in some test harness stuff to disable requiring logs on Windows.
Ok, this should be easy to fix. I filed bug 1091917 for enabling requiring leak logs for content processes on Windows.
Blocks: 1091917
We don't create leak logs in tab processes on Windows, so we shouldn't produce an error when they don't create one. Windows try run looks good: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=4ae4d58dac66
Attachment #8515036 - Flags: review?(jmaher)
Comment on attachment 8515036 [details] [diff] [review] part 2 - Don't require leak logs for tab processes on Windows. Review of attachment 8515036 [details] [diff] [review]: ----------------------------------------------------------------- thanks for the bug info here!
Attachment #8515036 - Flags: review?(jmaher) → review+
Whiteboard: [MemShrink] → [MemShrink:P2]
Ignore missing leak logs for b2g tab processes.
Attachment #8506251 - Attachment is obsolete: true
Attachment #8527044 - Flags: review?(khuey)
Bug 1103036 seems like a better approach to dealing with shutdown weirdness.
Depends on: 1103036
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: