Closed
Bug 1032125
Opened 10 years ago
Closed 10 years ago
[Nuwa] Don't send message other than NuwaFork to Nuwa after it frozen
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: kk1fff, Assigned: kk1fff)
References
Details
Attachments
(3 files, 5 obsolete files)
1.30 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
1.22 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
6.75 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
We should control what message should be sent to Nuwa after it frozen.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → kk1fff
Attachment #8447902 -
Attachment is obsolete: true
Attachment #8457847 -
Flags: feedback?(bent.mozilla)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8457847 -
Attachment is obsolete: true
Attachment #8457847 -
Flags: feedback?(bent.mozilla)
Attachment #8458616 -
Flags: review?(bent.mozilla)
Comment on attachment 8458616 [details] [diff] [review] Proposed Patch Review of attachment 8458616 [details] [diff] [review]: ----------------------------------------------------------------- Hrm, I really don't think it's a good idea to have this special logic in MessageLink... But I'm going on vacation so I'll redirect review to khuey in the meantime.
Attachment #8458616 -
Flags: review?(bent.mozilla) → review?(khuey)
So I think that we should perhaps do this in an opt build, but in a debug build assert that we don't ever discard any non-Nuwa messages, and then fix the code that sends non-Nuwa messages. I'm concerned that there is code that will be surprised when the messages are thrown away like this. Does that seem reasonable?
Flags: needinfo?(kk1fff)
Attachment #8458616 -
Flags: review?(khuey)
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #4) > So I think that we should perhaps do this in an opt build, but in a debug > build assert that we don't ever discard any non-Nuwa messages, and then fix > the code that sends non-Nuwa messages. I'm concerned that there is code > that will be surprised when the messages are thrown away like this. The patch doesn't discard non-nuwa message but makes chrome process crash when sending non-nuwa message after nuwa ready. If we assert only in debug builds, the crash could be hidden because Nuwa is disabled by default in debug builds.
Flags: needinfo?(kk1fff)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(khuey)
Aha, yes. I should read more closely.
Flags: needinfo?(khuey)
Comment on attachment 8458616 [details] [diff] [review] Proposed Patch Review of attachment 8458616 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: ipc/glue/MessageLink.cpp @@ +17,5 @@ > > #include "nsDebug.h" > #include "nsISupportsImpl.h" > #include "nsXULAppAPI.h" > +#include "mozilla/dom/ContentParent.h" #ifdef MOZ_NUWA_PROCESS please
Attachment #8458616 -
Flags: review+
Assignee | ||
Comment 8•10 years ago
|
||
Updated version. I will land this after fixed blocking bugs of this.
Attachment #8458616 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Moved ContentParent::NuwaReady() to patch for bug 1040017, which is a blocking bug of this and needs the function.
Attachment #8465357 -
Attachment is obsolete: true
Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8478191 -
Flags: review?(khuey)
Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8478192 -
Flags: review?(khuey)
Comment on attachment 8478191 [details] [diff] [review] Part 2: Don't broadcast DOMStoarge's message to frozen Nuwa. Review of attachment 8478191 [details] [diff] [review]: ----------------------------------------------------------------- Sorry for the delay here. I was taking advantage of you being on PTO to delay reviewing this :P
Attachment #8478191 -
Flags: review?(khuey) → review+
Attachment #8478192 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 15•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #14) > Sorry for the delay here. I was taking advantage of you being on PTO to > delay reviewing this :P It's ok. Getting an r- when not having a computer around makes me nervious. :D
Assignee | ||
Comment 16•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/78b119af926a https://hg.mozilla.org/integration/mozilla-inbound/rev/f945fb33b616 https://hg.mozilla.org/integration/mozilla-inbound/rev/3b4e5b178aa6
Comment 17•10 years ago
|
||
sorry had to backout this changes for bustage in non-unified b2g builds like https://tbpl.mozilla.org/php/getParsedLog.php?id=48376439&tree=Mozilla-Inbound
Assignee | ||
Comment 18•10 years ago
|
||
Fixed. Landing again: https://hg.mozilla.org/integration/mozilla-inbound/rev/0b73bd6d5d9c https://hg.mozilla.org/integration/mozilla-inbound/rev/e193cf8cb616 https://hg.mozilla.org/integration/mozilla-inbound/rev/422fd81a4118
Comment 19•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0b73bd6d5d9c https://hg.mozilla.org/mozilla-central/rev/e193cf8cb616 https://hg.mozilla.org/mozilla-central/rev/422fd81a4118
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Comment 20•10 years ago
|
||
Can we get a backout of this? It's breaking all of our automation tests. Additional info in Bug 1070850.
Status: RESOLVED → REOPENED
Flags: needinfo?(cbook)
Resolution: FIXED → ---
Comment 21•10 years ago
|
||
backedout in https://tbpl.mozilla.org/?onlyunstarred=1&rev=2a7a78a55735
Flags: needinfo?(cbook)
Assignee | ||
Comment 22•10 years ago
|
||
Stacktrace is at bp-cf9d11db-c836-480f-a345-565c22140922. Okay.. It seems that I missed some notifications...
Assignee | ||
Comment 23•10 years ago
|
||
Robert, which automated test are you running when finding this failure?
Flags: needinfo?(robert.chira)
Comment 24•10 years ago
|
||
All of the tests were failing since the error originates in our setUp() method. You can find the tests at the following link: https://github.com/mozilla-b2g/gaia/tree/master/tests/python/gaia-ui-tests/gaiatest/tests/functional A more exact location: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L817
Flags: needinfo?(robert.chira)
Assignee | ||
Comment 25•10 years ago
|
||
I am thinking of making chrome crash only on debug builds and discarding the messages with warning messages left on optimized builds. Althought we can run many test cases to make sure this patch won't break CI, there could be some messages we didn't fix and is sent to Nuwa. Crashing b2g in this case seems impact stability too much. What do you think, Kyle?
Flags: needinfo?(khuey)
Assignee | ||
Comment 26•10 years ago
|
||
Attachment #8496757 -
Flags: review?(khuey)
Assignee | ||
Updated•10 years ago
|
Attachment #8496757 -
Attachment description: Proposed Patch v.4 → Stop sending messages to frozen nuwa (v.4)
(In reply to Patrick Wang (Chih-Kai Wang) (:kk1fff) from comment #25) > I am thinking of making chrome crash only on debug builds and discarding the > messages with warning messages left on optimized builds. Althought we can > run many test cases to make sure this patch won't break CI, there could be > some messages we didn't fix and is sent to Nuwa. Crashing b2g in this case > seems impact stability too much. > > What do you think, Kyle? That sounds fine. I hope it doesn't crash my phone too much :P
Flags: needinfo?(khuey)
Comment on attachment 8496757 [details] [diff] [review] Stop sending messages to frozen nuwa (v.4) Review of attachment 8496757 [details] [diff] [review]: ----------------------------------------------------------------- ::: ipc/glue/MessageLink.cpp @@ +182,5 @@ > + break; > + default: > +#ifdef DEBUG > + MOZ_CRASH(); > +#else Just use MOZ_ASSERT(false). That'll crash debug builds only, and you can skip the ifdef. ::: ipc/glue/MessageLink.h @@ +171,5 @@ > MessageLoop* mIOLoop; // thread where IO happens > Transport::Listener* mExistingListener; // channel's previous listener > +#ifdef MOZ_NUWA_PROCESS > + bool mIsToNuwaProcess; > +#endif This should probably be initialized in a constructor somewhere.
Attachment #8496757 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 29•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #28) > ::: ipc/glue/MessageLink.h > @@ +171,5 @@ > > MessageLoop* mIOLoop; // thread where IO happens > > Transport::Listener* mExistingListener; // channel's previous listener > > +#ifdef MOZ_NUWA_PROCESS > > + bool mIsToNuwaProcess; > > +#endif > > This should probably be initialized in a constructor somewhere. Yup, this is initialized in init list of ProcessLink.
Assignee | ||
Comment 30•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #28) > Comment on attachment 8496757 [details] [diff] [review] > Stop sending messages to frozen nuwa (v.4) > > Review of attachment 8496757 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: ipc/glue/MessageLink.cpp > @@ +182,5 @@ > > + break; > > + default: > > +#ifdef DEBUG > > + MOZ_CRASH(); > > +#else > > Just use MOZ_ASSERT(false). That'll crash debug builds only, and you can > skip the ifdef. If I use MOZ_ASSERT, the log message won't be printed on optimized builds. And I just found that I missed a return so the IPC messages will be sent on opt builds, I am going to add it to the line after printing log.
Flags: needinfo?(khuey)
Ok.
Flags: needinfo?(khuey)
Assignee | ||
Comment 32•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/3716351194b0 https://hg.mozilla.org/integration/mozilla-inbound/rev/061baf99aaa8 https://hg.mozilla.org/integration/mozilla-inbound/rev/183243f732a9
Assignee | ||
Updated•10 years ago
|
Attachment #8475825 -
Attachment is obsolete: true
Comment 33•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3716351194b0 https://hg.mozilla.org/mozilla-central/rev/061baf99aaa8 https://hg.mozilla.org/mozilla-central/rev/183243f732a9
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•