Closed Bug 1034489 Opened 10 years ago Closed 10 years ago

[FirefoxOS_v1.4][Shark]Close WIFI while obtaining IP from AP and WIFI button can't be tapped for long

Categories

(Firefox OS Graveyard :: Wifi, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S6 (18july)

People

(Reporter: zhenqing.liu, Assigned: vchang)

Details

(Whiteboard: [sprd329816][p=2])

Attachments

(1 file, 1 obsolete file)

STR:
  1. Open WIFI.
  2. Tap to connect to a network.
  3. Close WIFI while obtaining IP address.

Sometimes WIFI button can't be tapped for long.
I tried several times and analyse the logs from our tester. Root cause for this bug is a SIGNAL_POLL cmd is dilivered after the TERMINATE one.
 
07-03 13:58:49.261   166   422 D WifiHW  : CMD   :IFNAME=wlan0 TERMINATE
07-03 13:58:49.261   166   422 D WifiHW  : CMD   :IFNAME=wlan0 SIGNAL_POLL

In the end, the SIGNAL_POLL cmd timed out.

07-03 13:58:59.271   166   422 D WifiHW  : 'IFNAME=wlan0 SIGNAL_POLL' command timed out.

So delay is increased for about 10s.
Whiteboard: [sprd329816]
I think it's very similar with Bug 1009725. The command timeout pends the others command in the same thread.
Assignee: nobody → vchang
Whiteboard: [sprd329816] → [sprd329816][p=2]
Target Milestone: --- → 2.0 S6 (18july)
Attached patch Patch v1.0 (obsolete) — Splinter Review
Stop connection information timer right after we terminate wpa_supplicant.
Attachment #8454234 - Flags: review?(chulee)
Comment on attachment 8454234 [details] [diff] [review]
Patch v1.0

Review of attachment 8454234 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/wifi/WifiWorker.js
@@ +589,5 @@
>    manager.connectionDropped = function(callback) {
> +    // It's likely that we have terminated the connection to wpa_supplicant.
> +    // Stop the polling timer immediately to prevent connection info update
> +    // command blocking in control thread until socket timeout.
> +    notify("stopconnectioninfotimer");

I think it's better to send notification before we terminate wpa_supplicant[1] than here, in case timer is triggered before the callback(which calls connectionDropped) function of executing terminateSupplicant() is called.

[1] http://hg.mozilla.org/mozilla-central/file/e1a037c085d1/dom/wifi/WifiWorker.js#l1064
Attachment #8454234 - Flags: review?(chulee)
Attached patch Patch v1.1Splinter Review
Addressing the review comments.
Attachment #8454234 - Attachment is obsolete: true
Attachment #8456714 - Flags: review?(chulee)
Comment on attachment 8456714 [details] [diff] [review]
Patch v1.1

Review of attachment 8456714 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, Thank you!
Attachment #8456714 - Flags: review?(chulee) → review+
https://hg.mozilla.org/mozilla-central/rev/3fb8e38d7ce5
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Hi Vincent, when will this patch be landed?
Flags: needinfo?(vchang)
Which branches do you want it be landed?
Flags: needinfo?(vchang)
(In reply to Vincent Chang[:vchang] from comment #10)
> Which branches do you want it be landed?

V1.4, on which the bug appears.
07-28 03:47:11.373 D/WifiHW  (  108): CMD   :IFNAME=wlan0 TERMINATE
07-28 03:47:11.373 D/WifiHW  (  108): CMD   :IFNAME=wlan0 DISCONNECT

07-28 03:47:21.383 D/WifiHW  (  108): 'IFNAME=wlan0 DISCONNECT' command timed out.

Hi Vincent, I just find this when I verify your patch. DISCONNECT command after the TERMINATE one will also increase the delay for 10s.
Flags: needinfo?(vchang)
(In reply to Zhenqing Liu from comment #12)
> 07-28 03:47:11.373 D/WifiHW  (  108): CMD   :IFNAME=wlan0 TERMINATE
> 07-28 03:47:11.373 D/WifiHW  (  108): CMD   :IFNAME=wlan0 DISCONNECT
> 
> 07-28 03:47:21.383 D/WifiHW  (  108): 'IFNAME=wlan0 DISCONNECT' command
> timed out.
> 
> Hi Vincent, I just find this when I verify your patch. DISCONNECT command
> after the TERMINATE one will also increase the delay for 10s.

Hi Zhenqing, thanks for your testing. I filed Bug 1045039.
Flags: needinfo?(vchang)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: