Project

General

Profile

Actions

Bug #3881

closed

ofono: Sometimes provides wrong net interface in DBus API

Added by pespin about 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
04/01/2019
Due date:
% Done:

100%

Spec Reference:

Description

I saw some osmo-gsm-tester tests that failed:

04:15:11.807003 run              osmo-hlr_10.42.42.2: Add subscriber {algo=1, algo_str='comp128v1', imsi='901700000010978', msisdn='1820', subscriber_id=1}
04:15:12.839312 bus                         /gobi_10: Setting Online False
04:15:13.857703 bus                         /gobi_10: Setting Powered False
04:15:20.353010 bus                         /gobi_10: Setting Powered True
04:15:21.545365 bus                         /gobi_10: Setting Online True
04:15:23.631041 tst                         /gobi_10: Connect to ('901', '70')
04:15:23.665366 tst                         /gobi_10: Manufacturer: 'Quectel', Model: 'EC20', Revision: 'EC20EQAR02A13E2G  1  [Jul  5 2017 10:49:17]', Serial: '20120822'
04:15:23.666671 tst             ping_idle_ping.py:47: waiting for modems to attach...
04:15:30.904372 tst                         /gobi_10: Registering with operator /gobi_10/operator/90170 ('901', '70')
04:15:36.831376 tst             ping_idle_ping.py:51: waiting for modems to attach to data services...
04:15:44.260744 tst                         /gobi_10: context activated {apn='inet46', path='/gobi_10/context2', properties={AccessPointName='inet46', Active=True, AuthenticationMethod='chap', IPv6.Settings={}, Name='Internet', Password='', Protocol='ip', Settings={Address='176.16.46.1', DomainNameServers=['192.168.100.1', '8.8.8.8'], Gateway='176.16.46.2', Interface='wwan0', Method='static', Netmask='255.255.255.252'}, Type='internet', Username='ogt'}, user='ogt'}
04:15:44.262922 tst             ping_idle_ping.py:56: Setting up data plane for "'/gobi_10/context2'" 
04:15:44.415972 run                   ifup(pid=7019): Launched
04:15:45.421749 run                   ifup(pid=7019): ERR: Terminated: ERROR {rc=1}  [trial-1810↪gprs:oc2g+mod-bts0-dynts-osmo↪/gobi_10↪ifup(pid=7019)]
04:15:45.423708 run                   ifup(pid=7019): stderr:
 | (launched: 2019-04-01_04:15:44.404070)
| Cannot find device "wwan0" 
04:15:45.427225 tst             ping_idle_ping.py:57: ERR: Error: Exited in error 1  [trial-1810↪gprs:oc2g+mod-bts0-dynts-osmo↪ping_idle_ping.py:57]
04:15:45.433608 tst             ping_idle_ping.py:57: Test FAILED (70.0 sec)

So I went and checked configuration of the net namespaces (no interesting netiface in main netns):

root@osmo-gsm-tester-prod:~# for ns in `ip netns`; do echo "== $ns =="; ip netns exec $ns ip l; done
== 1-5.3.2 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
18: wwan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.3.3 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
19: wwan2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.3.5 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
20: wwan3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.3.6 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
21: wwan4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.4.1.2 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
22: wwan6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
23: wwan7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.4.1.3 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
24: wwan8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
25: wwan9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.4.1.5 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
16: wwan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff
== 1-5.4.1.6 ==
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2343: dev2343: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:3e:ed:a5:84:9a brd ff:ff:ff:ff:ff:ff

According to ./show_usb_device.py, 1-5.4.1.5 containing wwan0 is the only Gobi2000 modem in the setup, but ofono states in the test that it is using an EC20 modem (as expected, since it's the only in resources.conf to be used on gprs tests).

The first EC20 modem in resources.conf.prod (the one which should be used and thus is used) is the one in 1-5.4.1.6, which interestingly has a "dev2343" net iface instead of usual "wwanX" one. That may be related regarding how ofono decided to provide "wwan0" for it instead of "dev2343".

Running "modem-netns-setup.py stop" to return all net ifaces to main netns, then running ./show_usb_device.py shows how net ifaces relate to each modem:

root@osmo-gsm-tester-prod:~# ./show_usb_device.py
{<DEVICE ID 05c6:9215 on Bus 001 Address 041>: {'cdc': ['cdc-wdm5'],
                                                'name': 'Quectel Quectel LTE '
                                                        'Module',
                                                'net': ['dev2343'],
                                                'path': '/sys/bus/usb/devices/1-5.4.1.6/',
                                                'serial': ['ttyUSB26',
                                                           'ttyUSB24',
                                                           'ttyUSB27',
                                                           'ttyUSB25']},
 <DEVICE ID 05c6:9205 on Bus 001 Address 031>: {'cdc': ['cdc-wdm0'],
                                                'name': 'Qualcomm Incorporated '
                                                        'Qualcomm Gobi 2000',
                                                'net': ['wwan0'],
                                                'path': '/sys/bus/usb/devices/1-5.4.1.5/',
                                                'serial': ['ttyUSB7',
                                                           'ttyUSB5',
                                                           'ttyUSB6']},
 <DEVICE ID 1199:68c0 on Bus 001 Address 038>: {'cdc': ['cdc-wdm9', 'cdc-wdm8'],
                                                'name': 'Sierra Wireless, '
                                                        'Incorporated MC7304',
                                                'net': ['wwan9', 'wwan8'],
                                                'path': '/sys/bus/usb/devices/1-5.4.1.3/',
                                                'serial': ['ttyUSB32',
                                                           'ttyUSB31',
                                                           'ttyUSB33']},
 <DEVICE ID 1199:68c0 on Bus 001 Address 037>: {'cdc': ['cdc-wdm7', 'cdc-wdm6'],
                                                'name': 'Sierra Wireless, '
                                                        'Incorporated MC7304',
                                                'net': ['wwan7', 'wwan6'],
                                                'path': '/sys/bus/usb/devices/1-5.4.1.2/',
                                                'serial': ['ttyUSB29',
                                                           'ttyUSB28',
                                                           'ttyUSB30']},
 <DEVICE ID 05c6:9215 on Bus 001 Address 036>: {'cdc': ['cdc-wdm4'],
                                                'name': 'Quectel Quectel LTE '
                                                        'Module',
                                                'net': ['wwan4'],
                                                'path': '/sys/bus/usb/devices/1-5.3.6/',
                                                'serial': ['ttyUSB23',
                                                           'ttyUSB21',
                                                           'ttyUSB22',
                                                           'ttyUSB20']},
 <DEVICE ID 05c6:9215 on Bus 001 Address 035>: {'cdc': ['cdc-wdm3'],
                                                'name': 'Quectel Quectel LTE '
                                                        'Module',
                                                'net': ['wwan3'],
                                                'path': '/sys/bus/usb/devices/1-5.3.5/',
                                                'serial': ['ttyUSB18',
                                                           'ttyUSB16',
                                                           'ttyUSB19',
                                                           'ttyUSB17']},
 <DEVICE ID 05c6:9215 on Bus 001 Address 034>: {'cdc': ['cdc-wdm2'],
                                                'name': 'Quectel Quectel LTE '
                                                        'Module',
                                                'net': ['wwan2'],
                                                'path': '/sys/bus/usb/devices/1-5.3.3/',
                                                'serial': ['ttyUSB15',
                                                           'ttyUSB13',
                                                           'ttyUSB14',
                                                           'ttyUSB12']},
 <DEVICE ID 05c6:9215 on Bus 001 Address 033>: {'cdc': ['cdc-wdm1'],
                                                'name': 'Quectel Quectel LTE '
                                                        'Module',
                                                'net': ['wwan1'],
                                                'path': '/sys/bus/usb/devices/1-5.3.2/',
                                                'serial': ['ttyUSB11',
                                                           'ttyUSB9',
                                                           'ttyUSB10',
                                                           'ttyUSB8']},
 <DEVICE ID 10c4:ea60 on Bus 001 Address 008>: {'cdc': [],
                                                'name': 'Silicon Labs CP2104 '
                                                        'USB to UART Bridge '
                                                        'Controller',
                                                'net': [],
                                                'path': '/sys/bus/usb/devices/1-5.2/',
                                                'serial': ['ttyUSB4']},
 <DEVICE ID 0403:6001 on Bus 001 Address 006>: {'cdc': [],
                                                'name': 'FTDI FT232R USB UART',
                                                'net': [],
                                                'path': '/sys/bus/usb/devices/1-5.1/',
                                                'serial': ['ttyUSB1']},
 <DEVICE ID 0403:6001 on Bus 001 Address 007>: {'cdc': [],
                                                'name': 'FTDI FT232R USB UART',
                                                'net': [],
                                                'path': '/sys/bus/usb/devices/1-1.4/',
                                                'serial': ['ttyUSB2']},
 <DEVICE ID 0403:6001 on Bus 001 Address 005>: {'cdc': [],
                                                'name': 'FTDI FT232R USB UART',
                                                'net': [],
                                                'path': '/sys/bus/usb/devices/1-1.3/',
                                                'serial': ['ttyUSB0']},
 <DEVICE ID 10c4:ea60 on Bus 001 Address 004>: {'cdc': [],
                                                'name': 'Silicon Labs CP2102 '
                                                        'USB to UART Bridge '
                                                        'Controller',
                                                'net': [],
                                                'path': '/sys/bus/usb/devices/1-1.1/',
                                                'serial': ['ttyUSB3']}}

So definetly ofono is announcing wwan0 for 1-5.4.1.6 instead of dev2343. Could it be related to our patch to avoid dropping information about the modem netns in ofono (to allow moving net ifaces to other netns): https://git.sysmocom.de/ofono/commit/?h=osmo-gsm-tester&id=e77b82a1bd1986aab42a119e0556c5941795992e


Related issues

Related to OsmoGSMTester - Support #3931: Contact quectel to get info about modem updates (hopefully less crashes)New04/15/2019

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)