ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

WIO_EMW3166 Wi-Fi driver crash on Mbed OS 6 #13101

Closed toyowata closed 3 years ago

toyowata commented 4 years ago

Description of defect

mbed-os-example-wifi and TESTS/network/wifi test crashed on Mbed OS 6.

[mbed-os-example-wifi]

WiFi example
Mbed OS version 6.0.0

Scan:

++ MbedOS Error Info ++
Error Status: 0x80FF0144 Code: 324 Module: 255
Error Message: Assertion failed: bool(*this)
Location: 0x800DCE5
File: ./mbed-os/platform/Callback.h

[TEST-network-wifi]

mbedgt: greentea test automation tool ver. 1.7.4
mbedgt: test specification file './BUILD/tests/WIO_EMW3166/GCC_ARM/test_spec.json' (specified with --test-spec option)
mbedgt: using './BUILD/tests/WIO_EMW3166/GCC_ARM/test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
mbedgt: detected 1 device
    | platform_name | platform_name_unique | serial_port              | mount_point      | target_id                                        |
    |---------------|----------------------|--------------------------|------------------|--------------------------------------------------|
    | WIO_EMW3166   | WIO_EMW3166[0]       | /dev/tty.usbmodem1442202 | /Volumes/DAPLINK | 9017000101df135300000000000000000000000097969902 |
mbedgt: processing target 'WIO_EMW3166' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
    | platform_name | platform_name_unique | serial_port                   | mount_point      | target_id                                        |
    |---------------|----------------------|-------------------------------|------------------|--------------------------------------------------|
    | WIO_EMW3166   | WIO_EMW3166[0]       | /dev/tty.usbmodem1442202:9600 | /Volumes/DAPLINK | 9017000101df135300000000000000000000000097969902 |
mbedgt: test case filter (specified with -n option)
    tests-network-wifi
    test filtered in 'tests-network-wifi'
mbedgt: running 1 test for platform 'WIO_EMW3166' and toolchain 'GCC_ARM'
    use 1 instance of execution threads for testing
mbedgt: checking for 'host_tests' directory above image directory structure
    found 'host_tests' directory in: 'TESTS/host_tests'
mbedgt: selecting test case observer...
    calling mbedhtrun: mbedhtrun -m WIO_EMW3166 -p /dev/tty.usbmodem1442202:9600 -f "BUILD/tests/WIO_EMW3166/GCC_ARM/TESTS/network/wifi/wifi.bin" -e "TESTS/host_tests" -d /Volumes/DAPLINK -c default -t 9017000101df135300000000000000000000000097969902 -r default -C 4 --sync 5 -P 60
mbedgt: mbed-host-test-runner: started
[1591932342.48][HTST][INF] host test executor ver. 0.0.13
[1591932342.48][HTST][INF] copy image onto target...
[1591932342.48][COPY][INF] Waiting up to 60 sec for '9017000101df135300000000000000000000000097969902' mount point (current is '/Volumes/DAPLINK')...
[1591932381.27][HTST][INF] starting host test process...
[1591932381.27][CONN][INF] starting connection process...
[1591932381.27][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1591932381.27][CONN][INF] initializing serial port listener...
[1591932381.27][PLGN][INF] Waiting up to 60 sec for '9017000101df135300000000000000000000000097969902' serial port (current is '/dev/tty.usbmodem1442202')...
[1591932381.27][HTST][INF] setting timeout to: 60 sec
[1591932382.71][SERI][INF] serial(port=/dev/tty.usbmodem1442202, baudrate=9600, read_timeout=0.01, write_timeout=5)
[1591932382.72][SERI][INF] reset device using 'default' plugin...
[1591932383.12][SERI][INF] waiting 1.00 sec after reset
[1591932384.12][SERI][INF] wait for it...
[1591932384.12][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1591932384.12][CONN][INF] sending up to 5 __sync packets (specified with --sync=5)
[1591932384.12][CONN][INF] sending preamble '1040d7ad-ef04-4217-b4b4-8fcd2416d4b5'
[1591932384.12][SERI][TXD] {{__sync;1040d7ad-ef04-4217-b4b4-8fcd2416d4b5}}
[1591932384.25][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1591932384.30][CONN][INF] found SYNC in stream: {{__sync;1040d7ad-ef04-4217-b4b4-8fcd2416d4b5}} it is #0 sent, queued...
[1591932384.30][HTST][INF] sync KV found, uuid=1040d7ad-ef04-4217-b4b4-8fcd2416d4b5, timestamp=1591932384.299365
[1591932384.32][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1591932384.32][HTST][INF] DUT greentea-client version: 1.3.0
[1591932384.34][CONN][INF] found KV pair in stream: {{__timeout;360}}, queued...
[1591932384.34][HTST][INF] setting timeout to: 360 sec
[1591932384.37][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1591932384.37][HTST][INF] host test class: '<class 'mbed_os_tools.test.host_tests.default_auto.DefaultAuto'>'
[1591932384.37][HTST][INF] host test setup() call...
[1591932384.37][HTST][INF] CALLBACKs updated
[1591932384.37][HTST][INF] host test detected: default_auto
[1591932384.41][CONN][RXD] >>> Running 15 test cases...
[1591932384.45][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONSTRUCTOR}}, queued...
[1591932384.49][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-NOCREDENTIALS}}, queued...
[1591932384.53][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SET-CREDENTIAL}}, queued...
[1591932384.58][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SET-CHANNEL}}, queued...
[1591932384.63][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-NULL}}, queued...
[1591932384.66][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SCAN-NULL}}, queued...
[1591932384.69][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SCAN}}, queued...
[1591932384.73][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-GET-RSSI}}, queued...
[1591932384.79][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-DISCONNECT-REPEAT}}, queued...
[1591932384.84][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-VALID-SECURE}}, queued...
[1591932384.89][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-CHANNEL}}, queued...
[1591932384.95][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-CHANNEL-FAIL}}, queued...
[1591932384.99][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-SECURE}}, queued...
[1591932385.04][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-SECURE-FAIL}}, queued...
[1591932385.07][CONN][RXD]
[1591932385.07][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT}}, queued...
[1591932385.11][CONN][RXD] >>> Running case #1: 'WIFI-CONSTRUCTOR'...
[1591932385.15][CONN][INF] found KV pair in stream: {{__testcase_start;WIFI-CONSTRUCTOR}}, queued...
[1591932385.20][CONN][INF] found KV pair in stream: {{__testcase_finish;WIFI-CONSTRUCTOR;1;0}}, queued...
[1591932385.25][CONN][RXD] >>> 'WIFI-CONSTRUCTOR': 1 passed, 0 failed
[1591932385.25][CONN][RXD]
[1591932385.30][CONN][RXD] >>> Running case #2: 'WIFI-CONNECT-NOCREDENTIALS'...
[1591932385.36][CONN][RXD]
[1591932385.36][CONN][RXD]
[1591932385.36][CONN][INF] found KV pair in stream: {{__testcase_start;WIFI-CONNECT-NOCREDENTIALS}}, queued...
[1591932385.38][CONN][RXD] ++ MbedOS Error Info ++
[1591932385.43][CONN][RXD] Error Status: 0x80FF0144 Code: 324 Module: 255
[1591932385.47][CONN][RXD] Error Message: Assertion failed: bool(*this)
[1591932385.50][CONN][RXD] Location: 0x801030D

Note: other greentea test cases worked fine.

mbedgt: test case results: 686 OK
mbedgt: completed in 3050.71 sec
[mbed] Working path "/Users/toywat01/dev/seeed/mbed-os" (program)
[mbed] Detected "WIO_EMW3166" connected to "/Volumes/DAPLINK" and using com port "/dev/tty.usbmodem1442202"
[mbed] Exec "mbedgt --test-spec ./BUILD/tests/WIO_EMW3166/GCC_ARM/test_spec.json -V" in "/Users/toywat01/dev/seeed/mbed-os"

Complete log : wio_emw3166_gcc_arm.txt

The wifi example with mbed-os-5.15.3 worked without any problem.

Different between 5.15.3 and 6.0.0 for this target:

Target(s) affected by this defect ?

Seeed WIO_EMW3166 (Compatible with MTX_MXCHIP_EMW3166)

Toolchain(s) (name and version) displaying this defect ?

GCC_ARM and ARM build

arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)
Copyright (C) 2019 Free Software Foundation, Inc.
Product: ARM Compiler 6.13 for Mbed Studio
Component: ARM Compiler 6.13
Tool: armclang [5d895a00]

What version of Mbed-os are you using (tag or sha) ?

mbed-os-6.0.0

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

ackage            Version
------------------ -------------
appdirs            1.4.4
asn1ate            0.6.0
beautifulsoup4     4.6.3
cbor               1.0.0
certifi            2020.4.5.2
cffi               1.14.0
chardet            3.0.4
Click              7.0
cmsis-pack-manager 0.2.10
colorama           0.3.9
cryptography       2.9.2
ecdsa              0.15
fasteners          0.15
future             0.16.0
hidapi             0.7.99.post21
icetea             1.2.4
idna               2.7
intelhex           2.2.1
Jinja2             2.10.3
jsonmerge          1.7.0
jsonschema         2.6.0
junit-xml          1.8
lockfile           0.12.2
lxml               4.5.1
manifest-tool      1.5.2
MarkupSafe         1.1.1
mbed-cli           1.10.4
mbed-cloud-sdk     2.0.8
mbed-flasher       0.10.1
mbed-greentea      1.7.4
mbed-host-tests    1.5.10
mbed-ls            1.7.10
mbed-os-tools      0.0.13
milksnake          0.1.5
monotonic          1.5
pip                20.1.1
prettytable        0.7.2
protobuf           3.5.2.post1
psutil             5.6.6
pyasn1             0.2.3
pycparser          2.20
pycryptodome       3.9.7
pyelftools         0.25
pyparsing          2.4.7
pyserial           3.4
python-dateutil    2.8.1
python-dotenv      0.13.0
pyusb              1.0.2
PyYAML             4.2b1
requests           2.20.1
semver             2.10.1
setuptools         28.8.0
six                1.12.0
urllib3            1.24.2
yattag             1.13.2

How is this defect reproduced ?

[mbed-os-example-wifi]

$ mbed import mbed-os-example-wifi
$ cd mbed-os-example-wifi
# set Wi-Fi credential in mbed_app.json
$ mbed compile -m wio_emw3166 -t gcc_arm -f

[TEST-network-wifi]

$ git clone -b mbed-os-6.0.0 https://github.com/ARMmbed/mbed-os
$ cd mbed-os
# set Wi-Fi credential in template_mbed_app.txt
$ mbed test -m wio_emw3166 -t gcc_arm -n TESTS-network-wifi --app-config TESTS/network/wifi/template_mbed_app.txt --compile
$ mbed test -m wio_emw3166 -t gcc_arm -n TESTS-network-wifi --run -v

cc @MarceloSalazar @ARMmbed/team-seeed

ciarmcom commented 4 years ago

@toyowata thank you for raising this issue.Please take a look at the following comments:

We cannot automatically identify a release based on the version of Mbed OS that you have provided. Please provide either a single valid sha of the form #abcde12 or #3b8265d70af32261311a06e423ca33434d8d80de or a single valid release tag of the form mbed-os-x.y.z . E.g. 'mbed-os-6.0.0)' has not been matched as a valid tag or sha. NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'.This indicates to us that at least all the fields have been considered. Please update the issue header with the missing information, the issue will not be mirroredto our internal defect tracking system or investigated until this has been fully resolved.

adbridge commented 4 years ago

@toyowata this failed to mirror because of 'mbed-os (#165be79392ae, tag: mbed-os-6.0.0)' that is not a single valid tag or sha :). I've fixed it for you.

toyowata commented 4 years ago

I've got same result on 6.2.1.

WiFi example
Mbed OS version 6.2.1

Scan:

++ MbedOS Error Info ++
Error Status: 0x80FF0144 Code: 324 Module: 255
Error Message: Assertion failed: bool(*this)
Location: 0x800DD85
File: ./mbed-os/platform/include/platform/Callback.h
ciarmcom commented 4 years ago

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. Internal Jira reference: https://jira.arm.com/browse/IOTOSM-2285

ciarmcom commented 3 years ago

We closed this issue because it has been inactive for quite some time and we believe it to be low priority. If you think that the priority should be higher, then please reopen with your justification for increasing the priority.