Closed
Bug 1005775
Opened 10 years ago
Closed 10 years ago
[Wifi] [Follow up of Bug 999388]Refactor wifi when send terminate command to wpa_supplicant
Categories
(Firefox OS Graveyard :: Wifi, defect)
Tracking
(blocking-b2g:1.4+, firefox30 wontfix, firefox31 wontfix, firefox32 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)
People
(Reporter: vchang, Assigned: vchang)
References
Details
(Keywords: crash, verifyme, Whiteboard: [b2g-crash][caf-crash 206][caf priority: p1][CR 662122][p=2])
Attachments
(1 file, 1 obsolete file)
4.71 KB,
patch
|
chucklee
:
review+
|
Details | Diff | Splinter Review |
This is found in Tarako platfrom that CTRL-EVENT-TERMINATING event may not send from wpa_supplicant if stop supplicant command is sent right after sending terminate wpa_supplicant command. The terminate command response from the supplicant doesn't mean that supplicant is terminated successfully. Instead of that, we should wait CTRL-EVENT-TERMINATING from event thread, and stop and close supplicant there.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → vchang
Assignee | ||
Updated•10 years ago
|
Whiteboard: [p=2]
Target Milestone: --- → 2.0 S1 (9may)
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8417816 -
Flags: review?(chulee)
Comment on attachment 8417816 [details] [diff] [review] Patch v1.0 Review of attachment 8417816 [details] [diff] [review]: ----------------------------------------------------------------- The concept looks good to me, I think there might be a timing issue to resolve. ::: dom/wifi/WifiWorker.js @@ +849,5 @@ > + waitForTerminateEventTimer.cancel(); > + waitForTerminateEventTimer = null; > + } > + }; > + function createWaitForTerminateEventTimer(onTimeout) { If we only accept one timer at a time, we need to check if |waitForTerminateEventTimer| is already created before. If |waitForTerminateEventTimer| is not null, we need to cancel previous timer or ignore this call. @@ +959,5 @@ > // until it does. > manager.state = "DISABLING"; > wifiCommand.terminateSupplicant(function (ok) { > manager.connectionDropped(function () { > + manager.stopSupplicantCallback = (function () { |manager.connectionDropped()| have function calls to netutil which might takes long time, and if "CTRL-EVEN-TERMINATING" is received before |manager.stopSupplicantCallback()| and |createWaitForTerminateEventTimer()| are set, we have to wait 2 seconds for timer to trigger it. This won't happen now, but might happen if we land bug 994564. I think it's better set |manager.stopSupplicantCallback()| before calling |terminateSupplicant()|. @@ +972,5 @@ > + }).bind(this); > + let terminateEventCallback = (function() { > + handleEvent("CTRL-EVENT-TERMINATING"); > + }).bind(this); > + createWaitForTerminateEventTimer(terminateEventCallback); As mentioned above, timer might be created in the middle of |manager.stopSupplicantCallback()|, and we will get two "CTRL-EVENT-TERMINATING" events. Although it seems second event won't do any harm to us, it would be better if we can prevent create an unnecessary timer here. Maybe only create timer if |manager.stopSupplicantCallback| is not null, and we can set |manager.stopSupplicantCallback| to null earlier in |handleEvent{}| by if (manager.stopSupplicantCallback) { cancelWaitForTerminateEventTimer(); let stopSupplicantCallback = manager.stopSupplicantCallback.bind(manager); manager.stopSupplicantCallback = null; stopSupplicantCallback(); stopSupplicantCallback = null; } Not sure if worth it though.
Attachment #8417816 -
Flags: review?(chulee) → feedback+
Updated•10 years ago
|
blocking-b2g: --- → backlog
Assignee | ||
Comment 3•10 years ago
|
||
Address the review comments.
Attachment #8417816 -
Attachment is obsolete: true
Attachment #8420021 -
Flags: review?(chulee)
Comment on attachment 8420021 [details] [diff] [review] Patch v1.1 for mc Review of attachment 8420021 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, but I think it's better to wait for more feedback from bug 1007766 before landing this.
Attachment #8420021 -
Flags: review?(chulee) → review+
Comment 5•10 years ago
|
||
Greg, Appreciate your effort testing this patch. Please check if bug 1007766 and bug 1001897 are fixed with the patch.
Flags: needinfo?(ggrisco)
Keywords: verifyme
Comment 6•10 years ago
|
||
I'm still waiting for test results, will report back here once I have the info.
Assignee | ||
Comment 9•10 years ago
|
||
Nominate for 1.4+, see comment 32 in bug 1007766.
Assignee | ||
Updated•10 years ago
|
blocking-b2g: backlog → 1.4?
Comment 10•10 years ago
|
||
We haven't seen the crash with this signature reproduce since applying the patch: [@ wpa_ctrl_recv | wifi_ctrl_recv | wifi_wait_on_socket | ICSWpaSupplicantImpl::do_wifi_wait_for_event(char const*, char*, unsigned int) ]
Flags: needinfo?(ggrisco)
Whiteboard: [p=2] → [CR 662122][p=2]
Assignee | ||
Comment 12•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/f638c7fb76d1
Comment 13•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f638c7fb76d1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 14•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/498d2bc8e5b5
status-b2g-v1.4:
--- → fixed
status-b2g-v2.0:
--- → fixed
status-firefox30:
--- → wontfix
status-firefox31:
--- → wontfix
status-firefox32:
--- → fixed
Target Milestone: 2.0 S1 (9may) → 2.0 S2 (23may)
Comment 15•10 years ago
|
||
Crash observed on: Device: msm8226 Gonk Version: AU_LINUX_GECKO_B2G_KK_3.5.01.04.00.113.091 Moz BuildID: 20140505000201 B2G Version: 1.4 Gecko Version: 30.0 Gaia: http://git.mozilla.org/?p=releases/gaia.git;a=commit;h=fccb15d6940db51615545574877a62d69406b1c2 Gecko: http://git.mozilla.org/?p=releases/gecko.git;a=commit;h=3ed3bbf1941e608bc9630942c7063a8b818f36bc
Comment 16•10 years ago
|
||
Crash observed on: Device: msm8226 Gonk Version: AU_LINUX_GECKO_B2G_KK_3.5.01.04.00.113.091 Moz BuildID: 20140505000201 B2G Version: 1.4 Gecko Version: 30.0 Gaia: http://git.mozilla.org/?p=releases/gaia.git;a=commit;h=fccb15d6940db51615545574877a62d69406b1c2 Gecko: http://git.mozilla.org/?p=releases/gecko.git;a=commit;h=3ed3bbf1941e608bc9630942c7063a8b818f36bc
Comment 17•10 years ago
|
||
please ignore comments 15 and 16.
Comment 18•10 years ago
|
||
Crash observed on: Device: msm8226 Gonk Version: AU_LINUX_GECKO_B2G_KK_3.5.01.04.00.113.091 Moz BuildID: 20140505000201 B2G Version: 1.4 Gecko Version: 30.0 Gaia: http://git.mozilla.org/?p=releases/gaia.git;a=commit;h=fccb15d6940db51615545574877a62d69406b1c2 Gecko: http://git.mozilla.org/?p=releases/gecko.git;a=commit;h=3ed3bbf1941e608bc9630942c7063a8b818f36bc
(In reply to Greg Grisco from comment #17) > please ignore comments 15 and 16. Comment 18 too, then, I assume?
Updated•10 years ago
|
Whiteboard: [CR 662122][p=2] → [caf priority: p1][CR 662122][p=2]
Updated•10 years ago
|
Whiteboard: [caf priority: p1][CR 662122][p=2] → [b2g-crash][caf-crash 206][caf priority: p1][CR 662122][p=2]
You need to log in
before you can comment on or make changes to this bug.
Description
•