Closed
Bug 1149829
Opened 10 years ago
Closed 10 years ago
nsINetworkInterface is broken on b2g emulator
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(firefox39 affected, firefox40 fixed, b2g-v2.2 unaffected, b2g-master fixed)
RESOLVED
FIXED
2.2 S10 (17apr)
Tracking | Status | |
---|---|---|
firefox39 | --- | affected |
firefox40 | --- | fixed |
b2g-v2.2 | --- | unaffected |
b2g-master | --- | fixed |
People
(Reporter: bwc, Assigned: edgar)
References
Details
Attachments
(1 file, 1 obsolete file)
8.92 KB,
patch
|
hsinyi
:
review+
|
Details | Diff | Splinter Review |
After bypassing bug 1149792, we still permafail because nICEr is unable to get any local interfaces. Maybe only localhost is available now?
Reporter | ||
Comment 1•10 years ago
|
||
Nils, do you have a patch laying around to enable localhost that I can try?
Flags: needinfo?(drno)
Comment 2•10 years ago
|
||
Bug 1128130 has a patch on it which should accomplish that.
Flags: needinfo?(drno)
Reporter | ||
Comment 3•10 years ago
|
||
I've verified in another try push that |isNetworkReady| in network.js still fails once the network-ready event fires:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=60e4840433c5
https://dxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/network.js#13
https://dxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/network.js#63
Additionally, it appears that the GetAddresses call is always returning 0 addresses here, even though we wait for a network-ready event before starting the test (the logging bears this out):
https://dxr.mozilla.org/mozilla-central/source/media/mtransport/gonk_addrs.cpp?from=gonk_addrs.cpp&case=true#73
The try run:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=34498d08886c
Component: WebRTC: Signaling → WebRTC: Networking
Summary: nICEr is unable to get local interfaces on b2g emulator → nsINetworkInterface is broken on b2g emulator
Reporter | ||
Comment 4•10 years ago
|
||
Not sure what the component is here, exactly. The logging shows that there are two network interfaces, but neither has any addresses. I am not sure what type these two interfaces are (maybe one wifi and one radio; I don't see anything that would register a loopback interface, which is unfortunate).
Component: WebRTC: Networking → RIL
Product: Core → Firefox OS
Version: Trunk → unspecified
Reporter | ||
Comment 5•10 years ago
|
||
I doubt this is a problem in isNetworkReady, since even once the network-ready event fires we still don't actually have any addresses, but maybe you know who to ask about this?
Flags: needinfo?(schien)
Comment 6•10 years ago
|
||
Let me explain how this worked before.
The network interface for b2g emulator is in gonk layer and there is no default network interface on b2g. B2G will only get the local address after turning on either 3G data or wifi and that's the entire code of isNetworkReady for.
@hsinyi, do you know if anything changed about setting up 3G data on emulator? The code we used in WebRTC test cases [1] is enabling radio network via mozMobileConnections and waiting for |datachange| event. I'm wondering if that trick still works on current codebase.
[1] https://dxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/NetworkPreparationChromeScript.js
Flags: needinfo?(schien) → needinfo?(htsai)
Comment 7•10 years ago
|
||
I believe Edgar can answer better than I do ;)
Flags: needinfo?(htsai) → needinfo?(echen)
Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #6)
> Let me explain how this worked before.
>
> The network interface for b2g emulator is in gonk layer and there is no
> default network interface on b2g. B2G will only get the local address after
> turning on either 3G data or wifi and that's the entire code of
> isNetworkReady for.
>
> @hsinyi, do you know if anything changed about setting up 3G data on
> emulator? The code we used in WebRTC test cases [1] is enabling radio
> network via mozMobileConnections and waiting for |datachange| event. I'm
> wondering if that trick still works on current codebase.
It should work on current codebase.
>
> [1]
> https://dxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/
> NetworkPreparationChromeScript.js
Flags: needinfo?(echen)
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Byron Campen [:bwc] from comment #4)
> Not sure what the component is here, exactly. The logging shows that there
> are two network interfaces, but neither has any addresses. I am not sure
> what type these two interfaces are (maybe one wifi and one radio; I don't
> see anything that would register a loopback interface, which is unfortunate).
Hi Byron, could you help to push try again with enabling ril log by changing |DEBUG_ALL| to true? Maybe we can get some clues from the log. Thank you.
[1] https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_consts.js#17
Flags: needinfo?(docfaraday)
Reporter | ||
Comment 10•10 years ago
|
||
Try run with DEBUG_ALL=true
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ac2dc88a6722
Flags: needinfo?(docfaraday)
Assignee | ||
Comment 11•10 years ago
|
||
From the log, the cellular data is established and the ip address is "10.0.2.100/24".
11:10:49 INFO - -*- RadioInterface[0]: Received message from worker: {"radioTech":3,"apn":"epc.tmobile.com","chappap":3,"pdptype":"IP","rilMessageClientId":0,"rilMessageToken":7,"rilMessageType":"setupDataCall","rilRequestType":27,"rilRequestError":0,"status":0,"suggestedRetryTime":54864,"cid":"1","active":2,"type":"IP","ifname":"rmnet0","addresses":["10.0.2.100/24"],"dnses":["10.26.75.40","10.26.75.41"],"gateways":["10.0.2.2"],"state":1}
I am going to check dose the ip address of nsINetworkInterface be updated correctly. ni? me for tracking.
Flags: needinfo?(echen)
Assignee | ||
Comment 12•10 years ago
|
||
Hi Byron, I found there is something wrong in RIL's nsINetworkInterface.getAddresses(). Could you try this patch to see if it helps? Thank you.
Flags: needinfo?(echen) → needinfo?(docfaraday)
Reporter | ||
Comment 13•10 years ago
|
||
Let's see what happens!
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1a58fa017990
Flags: needinfo?(docfaraday)
Reporter | ||
Comment 14•10 years ago
|
||
Ok, it looks like we're getting network interfaces now.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → echen
Hardware: x86 → ARM
Comment 15•10 years ago
|
||
Gecko 39 also have this bug, remember to uplift to aurora. :)
status-firefox39:
--- → affected
Assignee | ||
Updated•10 years ago
|
status-b2g-v2.2:
--- → unaffected
status-b2g-master:
--- → affected
Assignee | ||
Comment 16•10 years ago
|
||
When I tried to write a test case for nsINetworkInterfaceListService, I found another issue: addresses/gateways/dnses in RIL's nsINetworkInterface won't be clean after disconnect, I will provide a fix here, too.
Assignee | ||
Comment 17•10 years ago
|
||
Attachment #8589574 -
Attachment is obsolete: true
Assignee | ||
Comment 18•10 years ago
|
||
Comment on attachment 8590128 [details] [diff] [review]
Patch, v2
Review of attachment 8590128 [details] [diff] [review]:
-----------------------------------------------------------------
- Fix the getAddresses issue.
- Clean addresses/gateways/dnses when disconnect.
- Add test case for NetworkInterfaceListService.
Hi Hsinyi, would you mind reviewing this? Thank you.
Attachment #8590128 -
Flags: review?(htsai)
Comment 19•10 years ago
|
||
Comment on attachment 8590128 [details] [diff] [review]
Patch, v2
Review of attachment 8590128 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
Attachment #8590128 -
Flags: review?(htsai) → review+
Assignee | ||
Comment 20•10 years ago
|
||
Assignee | ||
Comment 21•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S10 (17apr)
Assignee | ||
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•