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

Increase background stack size to fix overflows #8551

Merged
merged 1 commit into from Nov 8, 2018

Conversation

Projects
None yet
7 participants
@c1728p9
Contributor

c1728p9 commented Oct 25, 2018

Description

On platforms using both tickless and the low power ticker wrapper so much of the background stack is used that it overflows. To ensure the background thread's stack doesn't overflow in any configuration increase this size by 256 bytes. Worst case usage on the NUCLEO_F476RG was recorded at 656 when tickless is turned on so this increased size should safely prevent overflows.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change
@c1728p9

This comment has been minimized.

Contributor

c1728p9 commented Oct 25, 2018

This is one possible fix for #8184

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Oct 26, 2018

There is no condition on TICKLESS ?

@c1728p9

This comment has been minimized.

Contributor

c1728p9 commented Oct 26, 2018

Right now this patch bumps the background stack size regardless of if tickless is on. If this is too much overhead I could make two configs - one for with tickless and one for without.

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Oct 26, 2018

Right now this patch bumps the background stack size regardless of if tickless is on. If this is too much overhead I could make two configs - one for with tickless and one for without.

We have few devices with limited RAM, I am 90% sure we will see failures in CI for those specific targets, but in few test we skip if enough memory is not available. Good to have it configurable

@c1728p9 c1728p9 force-pushed the c1728p9:fix_background_overflow branch from 19ef943 to 508662b Oct 26, 2018

@c1728p9

This comment has been minimized.

Contributor

c1728p9 commented Oct 26, 2018

I updated this PR to only increase the background stack size when tickless is enabled.

@0xc0170

0xc0170 approved these changes Nov 6, 2018

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Nov 6, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 6, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Nov 6, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 6, 2018

Please review the build failures. Few small targets fail for IAR (placement errors)

@0xc0170 0xc0170 added needs: work and removed needs: CI labels Nov 6, 2018

Increase background stack size to fix overflows
On platforms using both tickless and the low power ticker wrapper
so much of the background stack is used that it overflows. To
ensure the background thread's stack doesn't overflow increase this
size by 256 bytes when tickless is enabled. Worst case usage
on the NUCLEO_F476RG was recorded at 656 when tickless is
turned on so this increased size should safely prevent overflows.

@c1728p9 c1728p9 force-pushed the c1728p9:fix_background_overflow branch from 508662b to 9613e0f Nov 6, 2018

@c1728p9

This comment has been minimized.

Contributor

c1728p9 commented Nov 6, 2018

I updated this PR so the background thread stack is only increased if both MBED_TICKLESS and LPTICKER_DELAY_TICKS are used. This should allow the small devices without enough ram to build as these are not using LPTICKER_DELAY_TICKS.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Nov 7, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Nov 7, 2018

Build : SUCCESS

Build number : 3565
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8551/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 7, 2018

/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Nov 8, 2018

Note: This PR is now a part of a rollup PR (#8675).

Jenkins CI export nodes experienced many drops throughout the day causing false failures. In an attempt to get those PRs through CI, while keeping CI load low, several PRs have been bundled into a single rollup PR.

If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@0xc0170 0xc0170 referenced this pull request Nov 8, 2018

Merged

Rollup PR #8676

@cmonr cmonr merged commit 9613e0f into ARMmbed:master Nov 8, 2018

17 of 18 checks passed

ci-morph-exporter build completed
Details
ci-morph-build build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 545 files (+0 files)
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10449 cycles (+207 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment