Skip to content

[nrf fromtree] Increase STACK_SIZE to 2048 where CI detected test failures - #4481

Open
jaz1-nordic wants to merge 3 commits into
nrfconnect:mainfrom
jaz1-nordic:ztest_stack_size_test
Open

jaz1-nordic wants to merge 3 commits into
nrfconnect:mainfrom
jaz1-nordic:ztest_stack_size_test

Conversation

@jaz1-nordic

@jaz1-nordic jaz1-nordic commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds targeted stack-size overrides for tests exposed by restoring Zephyr's default stack sizes.

The changes:

  • increase the main stack for Bluetooth GATT tests on qemu_cortex_m3, where Mbed TLS PSA initialization runs before main(),
  • increase the Ztest stack for the VLAN IPv6 send test,
  • increase the Ztest stack for the scheduler per-thread slicing test, which allocates thread control blocks on the test stack.

manifest-pr-skip

@jaz1-nordic
jaz1-nordic marked this pull request as ready for review September 17, 2026 10:08
NordicBuilder added a commit to NordicBuilder/sdk-nrf that referenced this pull request Sep 17, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4481

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
@jaz1-nordic jaz1-nordic changed the title Increase STACK_SIZE to 2048 where CI detected test failures. Increase STACK_SIZE to 2048 where CI detected test failures Sep 17, 2026
jaz1-nordic pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Sep 17, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4481

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
@jaz1-nordic jaz1-nordic changed the title Increase STACK_SIZE to 2048 where CI detected test failures [nrf fromtree] Increase STACK_SIZE to 2048 where CI detected test failures Sep 22, 2026
jaz1-nordic pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Sep 22, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4481

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
jaz1-nordic pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Sep 23, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4481

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
jaz1-nordic pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Sep 29, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4481

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
On qemu_cortex_m3, the Mbed TLS SYS_INIT hook runs psa_crypto_init()
before main(). Without an entropy driver, seeding the software
HMAC_DRBG peaks at 1344 bytes of main-thread stack.

Set MAIN_STACK_SIZE to 2048 to prevent pre-main memory corruption.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>

(cherry picked from commit 66cc57e)
On nrf52840dk/nrf52840 and nrf5340dk/nrf5340/cpuapp,
test_zz_vlan_embed_ll_hdr overflows its Ztest thread while the IPv6
UDP path builds a packet with an embedded link-layer header.

Use a 2048-byte stack for net.vlan.separate_net_buf.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>

(cherry picked from commit 2cd64c5)
…bjects

On nrf52dk/nrf52832, test_slice_reset overflows its Ztest thread.
The test keeps three struct k_thread objects on that stack while
creating and scheduling worker threads.

Use a 2048-byte stack for kernel.scheduler.slice_perthread.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>

(cherry picked from commit f43b977)
@jaz1-nordic
jaz1-nordic force-pushed the ztest_stack_size_test branch from 5db827b to 189c22b Compare October 14, 2026 08:24
jaz1-nordic pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Oct 14, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4481

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants