The default bug view has changed. See this FAQ.

B2G Updates: EventHub input loop stops the b2g process from exiting

RESOLVED FIXED in mozilla17

Status

()

Core
Widget: Gonk
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: marshall_law, Assigned: marshall_law)

Tracking

Trunk
mozilla17
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Currently, process exit will block when ~nsAppShell calls mReaderThread->requestExitAndWait(). This requires the user to do some form of input (touch or button press of some kind) to tick the EventHub loop, and finalize the b2g process teardown.
(Assignee)

Comment 1

5 years ago
Created attachment 645897 [details] [diff] [review]
event hub wake fix - v1
Attachment #645897 - Flags: review?(mwu)

Comment 2

5 years ago
Hm, can we request an exit, wake, and then wait for exit? I'm a bit afraid that we might wake up, and then go straight back to waiting before we call the exit and wait function.
(Assignee)

Comment 3

5 years ago
(In reply to Michael Wu [:mwu] from comment #2)
> Hm, can we request an exit, wake, and then wait for exit? I'm a bit afraid
> that we might wake up, and then go straight back to waiting before we call
> the exit and wait function.

Good catch! It looks like we can actually separate out the calls to requestExit() and join() (for waiting), so I'll add the call to mEventHub->wake() between the two, to avoid the second request.
(Assignee)

Comment 4

5 years ago
Created attachment 646148 [details] [diff] [review]
event hub wake fix - v2

Call requestExit() before waking the EventHub, and then join() (wait)
Attachment #645897 - Attachment is obsolete: true
Attachment #645897 - Flags: review?(mwu)
Attachment #646148 - Flags: review?(mwu)

Updated

5 years ago
Attachment #646148 - Flags: review?(mwu) → review+
(Assignee)

Comment 5

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/d567f2581365
Sorry, I backed this out on inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ac08cd7d0a3

because of B2G build failures:
https://tbpl.mozilla.org/php/getParsedLog.php?id=13879519&tree=Mozilla-Inbound
../../../widget/gonk/nsAppShell.cpp:501: error: 'class android::InputReaderThread' has no member named 'join'
(Assignee)

Comment 7

5 years ago
Ugh, this looks like another Tinderbox GB toolchain issue. See Bug 776045
(Assignee)

Updated

5 years ago
Depends on: 776045
(Assignee)

Comment 8

5 years ago
In integration w/ GB safe APIs:

https://hg.mozilla.org/integration/mozilla-inbound/rev/0f7d2d447ed5
https://hg.mozilla.org/mozilla-central/rev/0f7d2d447ed5
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.