-
Notifications
You must be signed in to change notification settings - Fork 52
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
Memory allocation failure in benchmark example IAR + KW24D #138
Comments
@maclobdell would you like to review this for the KW24D platform? |
@bentcooke - did you recently make a heap size change to get KW24D working in another example? Perhaps that could be relevant to this issue. Please share any details you have. |
@maclobdell I had to reduce the heap size (20k->15k) and move the nanostack heap into the system heap ( |
ARM Internal Ref: IOTSSL-2427 |
The impact of this issue has increased by one more test failing to allocate memory on the heap. Currently there are two allocation failures in the BIGNUM module:
|
I understand the underlying issue is there's not enough heap available on this target for the test, which has been raised as issue #8306. We've got no way of externally determining if the target can support the test or not, so I'd like to propose we change the benchmark to only test Equally, I suggest we disable the Diffie-Hellman tests. They're not part of the default configuration of Mbed TLS in Mbed OS, so why run them? The lines enabling them in the config.h file, can just be removed. |
@sbutcher-arm
I think that (strictly speaking) this is not the issue. As I explained here and here, the problem is that the IAR linker script for that target sets the heap size to just 16KB, which is too small for this application. However, the devices does have enough memory (64K) to run the application. Unfortunately, the allocator used by the IAR libc does not allow the heap to grow and shrink dynamically at runtime and instead is fixed at compile-time, so we get those allocation failures while is succeeds in other targets. As the Mbed OS team suggested (see internal ticket IOTSSL-2427 and GitHub) is that we just change the linker script for the IAR target in Mbed OS as a temporary fix while they roll out automatic generation of linker scripts that will enable us to set different heap sizes for each application and solve the problem.
Sure, that would also make the test pass by not running the problematic code. I personally like testing/running the other primitives using this application, but I don't mind if we just remove it.... |
I was trying to summarise the issue in one line with less than 20 words, but thanks for the clarification anyway. ;) |
@maclobdell / @MarceloSalazar / @ashok-rao - We think we've fixed this issue with PR #213, but we don't have the KW24D board in our CI, nor one available to test. Could one of you please confirm this is fixed? It may well have been tested in the last OOB run for 5.11, so might not even need a new test. |
Yes, I can test it. With respect to: "we don't have the KW24D board in our CI" |
@maclobdell Test results are easiest place to see what we really run in CI. For example: http://mbed-os-ci.s3-website-eu-west-1.amazonaws.com/?prefix=jenkins-ci/artifacts/9250/1/ There are activities ongoing to add more boards on nightly tests. We are also integrating Austin and Oulu labs working together. If you can provide 4 pieces of those in Oulu or Austin labs we can start trying how well those works in CI. |
Looks like KW24D is in the Mbed OS CI. http://mbed-os-ci.s3-eu-west-1.amazonaws.com/jenkins-ci/artifacts/9250/1/greentea-test/696/PASS/KW24D/IAR/report_test_greentea_KW24D_IAR.html. I'm assuming the Mbed TLS benchmark tests are not run in regular Mbed OS CI jobs. Is there a separate job that can run the benchmark tests on the same boards that are in Mbed OS CI? I'm happy to run it manually, but it will take some time and it would be nice to have it automated. |
@maclobdell The most up to date list of greentea CI tests can be found here: https://github.com/ARMmbed/mbed-os-ci/blob/master/mbed-os-jenkins/mbed-os-ci-greentea-test/Jenkinsfile.groovy#L44 (private repo). Afaik, the CI team has tickets for all of the tests that aren't enabled and/or the stability issues are being worked out. @OPpuolitaival can confirm. |
Error:
IAR 7.8
KW24D
CI log https://jenkins-internal.mbed.com/job/mbedtls-mbed-os-examples-pr/75/execution/node/592/log/
mbed-os 5.7
@MarceloSalazar please check.
The text was updated successfully, but these errors were encountered: