Closed Bug 1137040 Opened 9 years ago Closed 9 years ago

[FFOS2.0][Woodduck][WIFI]Can't forget AP during obtaining IP address process.

Categories

(Firefox OS Graveyard :: Wifi, defect, P2)

defect

Tracking

(blocking-b2g:2.0M+, b2g-v2.0 unaffected, b2g-v2.0M fixed, b2g-v2.1 affected, b2g-v2.1S affected, b2g-v2.2 unaffected, b2g-master unaffected)

RESOLVED FIXED
2.2 S8 (20mar)
blocking-b2g 2.0M+
Tracking Status
b2g-v2.0 --- unaffected
b2g-v2.0M --- fixed
b2g-v2.1 --- affected
b2g-v2.1S --- affected
b2g-v2.2 --- unaffected
b2g-master --- unaffected

People

(Reporter: sync-1, Assigned: amchung)

References

Details

Attachments

(7 files, 1 obsolete file)

Created an attachment (id=1140522)
 image
 
 DEFECT DESCRIPTION:
 
 [WIFI]Can't forget AP during obtaining IP address process.
 
  REPRODUCING PROCEDURES:
 
 ->MS connect with a AP.
 
 ->During obtaining IP address process,click this AP to forget.->KO
 
 >KO:MS still stay at obtaining IP address process.
 
  EXPECTED BEHAVIOUR:
 
 ->AP should forget normally.
 
 
  For FT PR, Please list reference mobile's behavior:
 
 Reporter's number:0752-2639280(ex:63280)
Attached file mtklog
Attached image image
Norry, could you please help test on 2.0/2.0m/2.1/2.2?
Blocks: Woodduck
Flags: needinfo?(fan.luo)
Keywords: qawanted
Attached video woodduck_video.mp4
The issue is verified fail on latest woodduck 2.0m but successful on latest Flame 2.0 2.2 & 3.0 build.

Repro Steps:
1. Update a device to Latest build
2. Device connect with a AP. 
3. During obtaining IP address process,click this AP to forget.

Expected Result:
3. AP should forget normally

Actual Result: 
woodduck 2.0m:3. Device will keep obtaining IP address
Flame 2.0 2.2 & 3.0:3. AP should forget normally
note:
Device will keep obtaining IP address , and then get auto connected and desconnected soon. If user try to  connect  this ap again,  he has to input password.

Fail rate:7/10
See attachment:Woodduck_video.MP4

Woodduck 2.0m version:
Build ID               20150226050313
Gaia Revision          a1b5959728c8bc2a82354e197bb161922d419866
Gaia Date              2015-02-13 09:00:02
Gecko Revision         d9b299dc1087f23c83321b4dccc92e0f52309e8e
Gecko Version          32.0
Device Name            jrdhz72_w_ff
Firmware(Release)      4.4.2
Firmware(Incremental)  1424898358
Firmware Date          Thu Feb 26 05:06:23 CST 2015

Flame 2.0:
Build ID               20150225000239
Gaia Revision          366aaa19ac474dc58b79d62a91cff41756ae9dfe
Gaia Date              2015-02-22 20:25:01
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/611444d72a92
Gecko Version          32.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150225.035740
Firmware Date          Wed Feb 25 03:57:51 EST 2015
Bootloader             L1TC000118D0

Flame 2.1 version:
Build ID               20150225001618
Gaia Revision          86af0ca427adad12c3109124f31bef2fd9614e47
Gaia Date              2015-02-24 02:22:26
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/a275f2c05ca6
Gecko Version          34.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150225.034947
Firmware Date          Wed Feb 25 03:49:58 EST 2015
Bootloader             L1TC000118D0

Flame 2.2 version:
Build ID               20150225002505
Gaia Revision          ca64f2fe145909f31af266b1730874051ba76c78
Gaia Date              2015-02-24 22:06:53
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/16804008c29f
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150225.041814
Firmware Date          Wed Feb 25 04:18:25 EST 2015
Bootloader             L1TC000118D0

Flame 3.0 version:
Build ID               20150225010244
Gaia Revision          f6bfd854fe4746f21bc006eac145365e85f98808
Gaia Date              2015-02-24 21:10:44
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/0a8b3b67715a
Gecko Version          39.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150225.043702
Firmware Date          Wed Feb 25 04:37:14 EST 2015
Bootloader             L1TC00011880
Flags: needinfo?(fan.luo)
QA Whiteboard: [MGSEI-Triage+]
Keywords: qawanted
Hi Vincent,
---》
这个问题我有一个分析的log,见附件。
里面的suzhensen forget removenetwork begin和suzhensen forget removenetwork end:true分别是remove操作开始和成功打印的两条信息,可以发现:
1.	第一次做forget操作是在点击连接60秒(一次连接三十秒+重连一次)后自动执行,且remove执行的时间很短,只需要几百毫秒。
2.	第二次做forget操作是手动执行,在点击连接后的第一次三十秒中做forget操作,但是点击后只看到begin,直到三十秒是才看到end。说明remove是在三十秒(即第一次连接结束)后才执行。
现推断是命令的顺序执行导致,请分析附件中的log。
第一次自动forget:
Line 19627: 03-02 09:05:45.588   158   158 I Gecko   : suzhensen forget removenetwork begin
Line 19628: 03-02 09:05:45.589   158   563 D WifiHW  : enter -->wifi_send_command cmd=IFNAME=wlan0 REMOVE_NETWORK 0
Line 19630: 03-02 09:05:45.593  1052  1052 D wpa_supplicant: wlan0: Control interface command 'REMOVE_NETWORK 0'
Line 19631: 03-02 09:05:45.593  1052  1052 D wpa_supplicant: CTRL_IFACE: REMOVE_NETWORK id=0
Line 19732: 03-02 09:05:45.670   158   158 I Gecko   : suzhensen forget removenetwork end:true
第二次手动forget(十七八秒开始连接,20秒做forget,48秒才成功):
Line 26091: 03-02 09:06:20.062   158   158 I Gecko   : suzhensen forget removenetwork begin
Line 26665: 03-02 09:06:48.060   158   563 D WifiHW  : enter -->wifi_send_command cmd=IFNAME=wlan0 REMOVE_NETWORK 0
Line 26667: 03-02 09:06:48.061  1052  1052 D wpa_supplicant: wlan0: Control interface command 'REMOVE_NETWORK 0'
Line 26668: 03-02 09:06:48.061  1052  1052 D wpa_supplicant: CTRL_IFACE: REMOVE_NETWORK id=0
Line 26740: 03-02 09:06:48.127   158   158 I Gecko   : suzhensen forget removenetwork end:true
PS:为了尽快解决问题,有什么疑问请直接邮件或者电话联系。
--》
Whether wifiCommand do some action lead command later to done?
> 第二次手动forget(十七八秒开始连接,20秒做forget,48秒才成功):
> Line 26091: 03-02 09:06:20.062   158   158 I Gecko   : suzhensen forget
> removenetwork begin
> Line 26665: 03-02 09:06:48.060   158   563 D WifiHW  : enter
> -->wifi_send_command cmd=IFNAME=wlan0 REMOVE_NETWORK 0
> Line 26667: 03-02 09:06:48.061  1052  1052 D wpa_supplicant: wlan0: Control
> interface command 'REMOVE_NETWORK 0'
> Line 26668: 03-02 09:06:48.061  1052  1052 D wpa_supplicant: CTRL_IFACE:
> REMOVE_NETWORK id=0
> Line 26740: 03-02 09:06:48.127   158   158 I Gecko   : suzhensen forget
> removenetwork end:true

Can you add a log in [1] to dump the command list from gecko?

dump("sendCommand: " + JSON.stringify(obj));

The commands are dispatched and executed in-order in control thread.
I would like to know which command is blocked in wpa_supplicant before forget command.

[1] https://dxr.mozilla.org/mozilla-central/source/dom/wifi/WifiWorker.js?from=WifiWorker.js%20&case=true#211
Hi Vincent,

I have not access into [1] now,could you give me the diff?

Thanks!
Attached file main_log
Hi Vincent,

You can see the new log at 6:37.

Thanks!
According to your log, the forget command is blocked due to dhcp_do_request. As you may know that dhcp_do_request command and forget command are running in the same thread sequentially. We have improved this by moving some network related operation to others thread in [1]. You can refer to the patch to fix this problem.

[1] Bug 1038531 - Unify NetworkService/Networker/WifiNetUtil/WifiUtil
Hi Vincent,

I think  Bug 1038531's patch is so big that i can not understand now,it's modify a lot of code,so i think it need you to release with more test for security.how do you think?

Thanks!
Flags: needinfo?(vchang)
You can refer to Bug 994564-[Wifi] Use different thread for executing wifi command and netutil command. We don't have plan to support Bug 1038531 in 2.0 branch at the moment.
Flags: needinfo?(vchang)
Hi Vincent,

994564 is based on 1038531,not only this issue need to add thread to deal command,if this issue fixed,it will fixed other issues automatically,so i think it is necessary to handle it.

Thanks!
Flags: needinfo?(vchang)
(In reply to zhensen.su from comment #13)
> Hi Vincent,
> 
> 994564 is based on 1038531,not only this issue need to add thread to deal
> command,if this issue fixed,it will fixed other issues automatically,so i
> think it is necessary to handle it.
> 
> Thanks!

I assume you use 2.0 branch with some customizations by your own. I would like to suggest to apply the patch in Bug 994564 to Woodduck branch only which is easier than apply the patch in Bug 1038531. How do you think?
Flags: needinfo?(vchang)
Yep.Bug 994564's patch is easier than Bug 1038531's patch,so when will you submit the patch?I think it is Gecko's code,it need you to submit code to avoid code confusion.
Hi Vincent,

Could you tell me the different with netUtil and wifi contains command?Could you give me netUtil command list and wifi command list?
Hi Amy, can you help to prepare a patch for Woodduck based on the patch in Bug 994564?
Flags: needinfo?(amchung)
Hi Vincent,
Ok, I will confirm this issue.
Flags: needinfo?(amchung)
Hi Amy,

When will release the patch?
Flags: needinfo?(amchung)
Hi Amy,

How about the issue?
Dear Zhensen,
I have sync the patch from Bug 994564, and testing result is successful.
I will upload code later.
Flags: needinfo?(amchung)
Assignee: nobody → amchung
Hi Amy,

On your test result,could you find the issue which it will display connected at first,then display connected failed,if doesn't forget current AP.
blocking-b2g: --- → 2.0M?
According to bug 1038531 tracking flags, v2.1 and v2.1s are affected.
Hi Kai-zhen,

What's the affected?Comment#22's issue?
(In reply to zhensen.su from comment #22)
> Hi Amy,
> 
> On your test result,could you find the issue which it will display connected
> at first,then display connected failed,if doesn't forget current AP.

Dear Zhensen,
I tried 10 times, I didn't find the situation as your comment.
Attached patch bug-1137040.patch (obsolete) — Splinter Review
Dear Henry,
Please review this patch, thank you.
Attachment #8574629 - Flags: review?(hchang)
Hi Amy,

Could you give your build?I will double check it in our environment.

Thanks!
Comment on attachment 8574629 [details] [diff] [review]
bug-1137040.patch

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

r+'d with comment addressed. Thanks!

By the way, this patch is only for Woodduck, right?

::: dom/wifi/WifiProxyService.h
@@ +37,5 @@
>    WifiProxyService();
>    ~WifiProxyService();
>  
>    nsTArray<EventThreadListEntry> mEventThreadList;
> +  nsCOMPtr<nsIThread> mWifiControlThread, mNetUtilControlThread;

We usually declare one variable in one line.
Comment on attachment 8574629 [details] [diff] [review]
bug-1137040.patch

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

r+'d with comment addressed. Thanks!

By the way, this patch is only for Woodduck, right?

::: dom/wifi/WifiProxyService.h
@@ +37,5 @@
>    WifiProxyService();
>    ~WifiProxyService();
>  
>    nsTArray<EventThreadListEntry> mEventThreadList;
> +  nsCOMPtr<nsIThread> mWifiControlThread, mNetUtilControlThread;

We usually declare one variable in one line.
Attachment #8574629 - Flags: review?(hchang) → review+
Hi Henry&Amy,

Could you give your build after add patch?i will check it in our environment.

Thanks!
Dear Henry,
I sync this patch from Bug 994564.
blocking-b2g: 2.0M? → 2.0M+
Attachment #8574629 - Attachment is obsolete: true
Attachment #8575197 - Flags: review+
https://hg.mozilla.org/releases/mozilla-b2g32_v2_0m/rev/71cf6a526685
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Please nominate the patch for b2g34 approval when you get a chance.
Flags: needinfo?(amchung)
Target Milestone: --- → 2.2 S8 (20mar)
Hi Josh,

When will release patch to TCL?
Flags: needinfo?(jocheng)
(In reply to zhensen.su from comment #35)
> Hi Josh,
> 
> When will release patch to TCL?

Hi Jason,
Can you help to provide when you can release new version to OEM partner?
Thanks!
Flags: needinfo?(jocheng) → needinfo?(chien-hao.li)
Hi,

From V1.3_P11,I don't see this patch.
(In reply to zhensen.su from comment #24)
> Hi Kai-zhen,
> 
> What's the affected?Comment#22's issue?

The affected on v2.1 and v2.1s means without patch from this bug, there will be the same issue on these branches.
Dear Zhensen,
瞭解到你們測試有發生forget網路之後有機率連不上的問題,這個問題在flame也有發生,與此題所上的patch是沒有相關的。
之後flame找出正解(之前有找出暫時解法,但是發現還是有機率發生其他wifi問題)再將solution release給你們。

Thanks!
Flags: needinfo?(amchung) → needinfo?(zhensen.su.hz)
Hi Amy,
可以参考https://bugzilla.mozilla.org/show_bug.cgi?id=1125582,问题是一样的,但是那个patch针对这个case(加了1137040patch后,连接一个翻墙的AP)是不生效的.
Flags: needinfo?(zhensen.su.hz) → needinfo?(amchung)
Dear Zhensen,
1. 所以是合了Bug 1137040的patch之後,連接AP連接AP失敗會顯示connected一秒嗎?
有確定合之前完全沒有發生嗎?因為我自己試驗是沒有發生過連接AP失敗會顯示connected一秒,因此猜測此情況是偶發的狀況。
2. 合了Bug 1137040 patch之後,Bug 1133159的issue就無法複製了是嗎?
Flags: needinfo?(amchung) → needinfo?(zhensen.su.hz)
Hi Amy,
1.在合之前一直是处于connecting状态,失败后直接forget,合完后连接翻墙的AP(一定是翻墙的AP,其他AP在加了1125582的patch后是正常的)就会出现connected状态(有时候很久,不止一秒)后才变成connectfaild.
2.合了Bug 1137040 patch之後,1133159会好很多,但有时也会出现需要一分钟才能search到AP.
Flags: needinfo?(zhensen.su.hz) → needinfo?(amchung)
Dear Zhensen,
1. 所以是加了1125582的patch,而非1137040是嗎?
2. 可以在Bug 1133159中附上合了Bug 1137040 patch複製出issue的log嗎?

Thanks!
Flags: needinfo?(amchung) → needinfo?(zhensen.su.hz)
Hi amy,

1.对于任何的AP,加了1125582的patch后不会出现connected,但是加了1137040后正常的AP没问题,但是翻墙的AP会出现connected.
2.在之前的邮件沟通中有,我明天找出邮件把你loop进来.
Flags: needinfo?(zhensen.su.hz) → needinfo?(amchung)
Dear Zhensen,
針對第一點,可以麻煩提供兩種log:
1. 合1137040之後,翻牆AP連線失敗的情況
2. 沒有合1137040,翻牆AP連線失敗的情況
麻煩了,謝謝!
Flags: needinfo?(amchung) → needinfo?(zhensen.su.hz)
Hi Amy,

Log已发邮件,请查收!
Flags: needinfo?(zhensen.su.hz)
Attached video Verify_video.MP4
This problem is verified pass on latest build of Woodduck2.0. The wifi can be forgot normally.
See attachment: Verify_video.MP4
Rate: 0/10

Woodduck 2.0 build: (Pass)
Build ID               20150318050314
Gaia Revision          79f923e7205299bb4ea774ce6ce0921820e5a6bd
Gaia Date              2015-03-15 14:46:18
Gecko Revision         dd8b668bf009cf1af1ecdb90272bc828928582e0
Gecko Version          32.0
Device Name            jrdhz72_w_ff
Firmware(Release)      4.4.2
Firmware(Incremental)  1426626374
Firmware Date          Wed Mar 18 05:06:37 CST 2015
Group: woodduck-confidential
Hi Amy&Henry,

Connected的问题是谁在看呢?
Group: woodduck-confidential
Flags: needinfo?(hchang)
Flags: needinfo?(amchung)
(In reply to Shine from comment #47)
> Created attachment 8579196 [details]
> Verify_video.MP4
> 
> This problem is verified pass on latest build of Woodduck2.0. The wifi can
> be forgot normally.
> See attachment: Verify_video.MP4
> Rate: 0/10
> 
> Woodduck 2.0 build: (Pass)
> Build ID               20150318050314
> Gaia Revision          79f923e7205299bb4ea774ce6ce0921820e5a6bd
> Gaia Date              2015-03-15 14:46:18
> Gecko Revision         dd8b668bf009cf1af1ecdb90272bc828928582e0
> Gecko Version          32.0
> Device Name            jrdhz72_w_ff
> Firmware(Release)      4.4.2
> Firmware(Incremental)  1426626374
> Firmware Date          Wed Mar 18 05:06:37 CST 2015
Hi Shine,
Maybe you have not environment in firewall AP(翻墙AP,即大陆可以访问google网站),so you can't reproduce this issue.
(In reply to zhensen.su from comment #49)
> Hi Shine,
> Maybe you have not environment in firewall AP(翻墙AP,即大陆可以访问google网站),so you
> can't reproduce this issue.

Hi Zhensen.su,
I have verified it under firewall AP in comment 47, and can't repro. could you repro it in your side?
Hi Shine,

Yep.I can 100% reproduce,so i think you don't use current AP.
(In reply to zhensen.su from comment #48)
> Hi Amy&Henry,
> 
> Connected的问题是谁在看呢?

Hi, 

Amy is looking into this issue but she will be in the office until next Monday.
Thanks!
Flags: needinfo?(hchang)
Flags: needinfo?(jocheng)
Flags: needinfo?(jocheng)
Flags: needinfo?(amchung)
Flags: needinfo?(chien-hao.li)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: