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

RESOLVED FIXED in 2.0 S6 (18july)

Status

Firefox OS
Wifi
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Zhenqing Liu, Assigned: vchang)

Tracking

unspecified
2.0 S6 (18july)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
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.
(Reporter)

Comment 1

4 years ago
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]
(Assignee)

Comment 2

4 years ago
I think it's very similar with Bug 1009725. The command timeout pends the others command in the same thread.
(Assignee)

Updated

4 years ago
Assignee: nobody → vchang
(Assignee)

Updated

4 years ago
Whiteboard: [sprd329816] → [sprd329816][p=2]
Target Milestone: --- → 2.0 S6 (18july)
(Assignee)

Comment 3

4 years ago
Created attachment 8454234 [details] [diff] [review]
Patch v1.0

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)
(Assignee)

Comment 5

4 years ago
Created attachment 8456714 [details] [diff] [review]
Patch v1.1

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
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Reporter)

Comment 9

4 years ago
Hi Vincent, when will this patch be landed?
Flags: needinfo?(vchang)
(Assignee)

Comment 10

4 years ago
Which branches do you want it be landed?
Flags: needinfo?(vchang)
(Reporter)

Comment 11

4 years ago
(In reply to Vincent Chang[:vchang] from comment #10)
> Which branches do you want it be landed?

V1.4, on which the bug appears.
(Reporter)

Comment 12

4 years ago
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)
(Assignee)

Comment 13

4 years ago
(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.