Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OdinWiFiInterface crashes #5139

Closed
SeppoTakalo opened this issue Sep 19, 2017 · 18 comments
Closed

OdinWiFiInterface crashes #5139

SeppoTakalo opened this issue Sep 19, 2017 · 18 comments

Comments

@SeppoTakalo
Copy link
Contributor

SeppoTakalo commented Sep 19, 2017

Description

  • Type: Bug
  • Priority: Major

Bug

Target
UBLOX_EVK_ODIN_W2

Toolchain:
GCC_ARM

mbed-cli version:
1.2.0

mbed-os sha:

tag/branch works
mbed-os-5.6.0-rc1 no
mbed-os-5.5.7 no
mbed-os-5.5.1 yes
mbed-os-5.5.0 no
mbed-os-5.4.7 yes
mbed-os-5.4.5 yes
master(#79bd2638) yes
mbed-os-5.7.6 no
mbed-os-5.7.0 yes
mbed-os-5.8.0-rc1 yes
mbed-os-5.8.6 yes
mbed-os-5.9.0-rc3 yes

Expected behavior
Driver initialises itself.

Actual behavior
Driver crashes, program does not continue.

Steps to reproduce

$ mbed new odin-test
$ cd odin-test

Edit main.cpp to contain following

#include "mbed.h"
#include "OdinWiFiInterface.h"

int main()
{
    printf("Initialising OdinWiFiInterface\r\n");
    wait(0.5);
    OdinWiFiInterface wifi;

    printf("Done\r\n");
    return 0;
}

Build & flash.

Check serial port:
Initialising OdinWiFiInterface is printed but Done does not appear.

Works on version 5.5.1 and 5.4.7

@SeppoTakalo
Copy link
Contributor Author

tag/branch works
master no
mbed-os-5.6.0-rc1 no
mbed-os-5.5.7 no
mbed-os-5.5.1 yes
mbed-os-5.5.0 no
mbed-os-5.4.7 yes
mbed-os-5.4.5 yes

This seems to have been known problem in Mbed OS 5.5 release time, but never reported
in the known issues list. Fix seems to have been merged in 5.5.1, but re-appears later.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 19, 2017

@andreaslarssonublox
Copy link

I tested this and I could reproduce the same way as above. However, when using the latest mbed-os master(bb61b42) it seems to work.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 29, 2017

I tested this and I could reproduce the same way as above. However, when using the latest mbed-os master(bb61b42) it seems to work.

Can you test 5.6.0 ? 5.6.1 could also be tested from a 5.6 branch (will be published soon).

@andreaslarssonublox
Copy link

I tested this:
Branch mbed-os-5.6 (cc7556a)
Works

Tag mbed-os-5.6.0-rc3 (5499db1)
Does not work

I will continue looking at why it fails.

@andreaslarssonublox
Copy link

I have compiled a new driver based on mbed-os 5.5.6 and that seems to work fine for all versions above. We will most likely release it later this week.

@SeppoTakalo
Copy link
Contributor Author

This seems to be fixed now in Mbed OS 5.6.2 and master branch.

Can somebody verify whether fix was applied or do I fail to reproduce the problem?

@SeppoTakalo
Copy link
Contributor Author

I tried to bisect and looks like the behaviour changed in #5080

Can this be the corrective action or is this just a side effect, (or me not bisecting correctly).

@SeppoTakalo
Copy link
Contributor Author

If Odin Wifi drivers are using Mbed TLS in their binaries, it might be that when HW acceleration is turned on, the binaries will break because size of some internal structures changes.

@teetak01
Copy link
Contributor

teetak01 commented Oct 9, 2017

It would seem that already Mbed OS 5.6.1 fixed this issue.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 13, 2017

It would seem that already Mbed OS 5.6.1 fixed this issue.

@SeppoTakalo Can you confirm, that since 5.6.1 this is working?

@JanneKiiskila
Copy link
Contributor

I don't think this is limited to WiFI only, I think it's also the ethernet stack. I.e. any networking you enable on the Odin will crash like this.

@SeppoTakalo
Copy link
Contributor Author

@0xc0170 I did already confirm earlier that 5.6.2 is working.
The root cause, as I bisected, was in HW crypto engine.

@JanneKiiskila
Copy link
Contributor

For my case it turned out to be a flashing issue in the end. I just got the serial number and nothing else, but the example wasn't printing much.

@andreaslarssonublox
Copy link

andreaslarssonublox commented Oct 17, 2017

Thanks for investigating this :) I agree that this is probably caused by the HW acceleration. This issue is related: #5040

@SeppoTakalo
Copy link
Contributor Author

SeppoTakalo commented Mar 8, 2018

Re-tested this:

tag/branch works
master(#79bd2638) yes
mbed-os-5.7.6 no
mbed-os-5.7.0 yes
mbed-os-5.8.0-rc1 yes

@ciarmcom
Copy link
Member

ciarmcom commented Jun 1, 2018

ARM Internal Ref: MBOTRIAGE-168

@SeppoTakalo
Copy link
Contributor Author

I'm inclined to close this as it does not seems to happen anymore with 5.8.x or 5.9 branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants