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

CMSIS-RTOS error: Stack overflow for test :features-nvstore-tests-nvstore-functionality on LPC546XX and LPC54114 #7046

Closed
studavekar opened this issue May 29, 2018 · 7 comments

Comments

@studavekar
Copy link
Contributor

Description

  • Type: Bug
  • Priority: Major

Bug

Target
LPC546XX and LPC54114

Toolchain:
GCC_ARM | ARM | IAR

mbed-os sha:
88d863a Merge pull request #6984 from stevew817/'efm32_irq_bugfix'

Steps to reproduce

Use command run : mbed test -m LPC54114 -t GCC_ARM -n features-nvstore-tests-nvstore-functionality -v

[ ] Question
[ ] Enhancement
[ X] Bug

** log snippet

(env) arm@austin-ci-linux-002:~/repo/mbed-os$ mbed test -m LPC54114 -c -v --run -n features-nvstore-tests-nvstore-functionality
[mbed] Working path "/home/arm/repo/mbed-os" (program)
[mbed] Exec "mbedgt --test-spec /home/arm/repo/mbed-os/BUILD/tests/LPC54114/gcc_arm/test_spec.json -n features-nvstore-tests-nvstore-functionality -V" in /home/arm/repo/mbed-os
mbedgt: greentea test automation tool ver. 1.3.3
mbedgt: test specification file '/home/arm/repo/mbed-os/BUILD/tests/LPC54114/gcc_arm/test_spec.json' (specified with --test-spec option)
mbedgt: using '/home/arm/repo/mbed-os/BUILD/tests/LPC54114/gcc_arm/test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
[1527609963.07][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609963.07][mbedls.lstools_base]Could not read htm on from usb id 10540000024cac8c00000000000000000000000097969905. Falling back to usb id
mbedgt: detected 1 device
        +---------------+----------------------+--------------+----------------------------------------------------+--------------------------------------------------+
        | platform_name | platform_name_unique | serial_port  | mount_point                                        | target_id                                        |
        +---------------+----------------------+--------------+----------------------------------------------------+--------------------------------------------------+
        | LPC54114      | LPC54114[0]          | /dev/ttyACM0 | /mnt/pci-0000_00_14_0-usb-0_6_1_5_1_0-scsi-0_0_0_0 | 10540000024cac8c00000000000000000000000097969905 |
        +---------------+----------------------+--------------+----------------------------------------------------+--------------------------------------------------+
mbedgt: processing target 'LPC54114' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
        +---------------+----------------------+-------------------+----------------------------------------------------+--------------------------------------------------+
        | platform_name | platform_name_unique | serial_port       | mount_point                                        | target_id                                        |
        +---------------+----------------------+-------------------+----------------------------------------------------+--------------------------------------------------+
        | LPC54114      | LPC54114[0]          | /dev/ttyACM0:9600 | /mnt/pci-0000_00_14_0-usb-0_6_1_5_1_0-scsi-0_0_0_0 | 10540000024cac8c00000000000000000000000097969905 |
        +---------------+----------------------+-------------------+----------------------------------------------------+--------------------------------------------------+
mbedgt: test case filter (specified with -n option)
        features-nvstore-tests-nvstore-functionality
        test filtered in 'features-nvstore-tests-nvstore-functionality'
mbedgt: running 1 test for platform 'LPC54114' and toolchain 'GCC_ARM'
        use 1 instance of execution threads for testing
mbedgt: checking for 'host_tests' directory above image directory structure
        'host_tests' directory not found: two directory levels above image path checked
mbedgt: selecting test case observer...
        calling mbedhtrun: mbedhtrun -m LPC54114 -p /dev/ttyACM0:9600 -f "BUILD/tests/LPC54114/gcc_arm/features/nvstore/TESTS/nvstore/functionality/functionality.bin" -d /mnt/pci-0000_00_14_0-usb-0_6_1_5_1_0-scsi-0_0_0_0 -c default -t 10540000024cac8c00000000000000000000000097969905 -r default -C 4 --sync 5 -P 60
mbedgt: mbed-host-test-runner: started
[1527609963.45][HTST][INF] host test executor ver. 1.3.1
[1527609963.45][HTST][INF] copy image onto target...
[1527609963.45][COPY][INF] Waiting up to 60 sec for '10540000024cac8c00000000000000000000000097969905' mount point (current is '/mnt/pci-0000_00_14_0-usb-0_6_1_5_1_0-scsi-0_0_0_0')...
[1527609963.45][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609963.45][mbedls.lstools_base]Could not read htm on from usb id 10540000024cac8c00000000000000000000000097969905. Falling back to usb id
[1527609969.80][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609969.81][mbedls.lstools_base]MBED with target id '10540000024cac8c00000000000000000000000097969905' is connected, but not mounted. Use the '-u' flag to include it in the list.
[1527609970.32][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609970.33][mbedls.lstools_base]MBED with target id '10540000024cac8c00000000000000000000000097969905' is connected, but not mounted. Use the '-u' flag to include it in the list.
[1527609970.83][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609970.83][mbedls.lstools_base]MBED with target id '10540000024cac8c00000000000000000000000097969905' is connected, but not mounted. Use the '-u' flag to include it in the list.
[1527609971.34][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609971.34][mbedls.lstools_base]MBED with target id '10540000024cac8c00000000000000000000000097969905' is connected, but not mounted. Use the '-u' flag to include it in the list.
[1527609971.85][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609971.85][mbedls.lstools_base]Could not read htm on from usb id 10540000024cac8c00000000000000000000000097969905. Falling back to usb id
[1527609972.36][HTST][INF] starting host test process...
[1527609972.36][CONN][INF] starting connection process...
[1527609972.36][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1527609972.36][CONN][INF] initializing serial port listener...
[1527609972.36][HTST][INF] setting timeout to: 60 sec
[1527609972.36][PLGN][INF] Waiting up to 60 sec for '10540000024cac8c00000000000000000000000097969905' serial port (current is '/dev/ttyACM0')...
[1527609972.37][mbedls.platform_database]Duplicate platform ids found: daplink.5000, ignoring the definitions from /home/arm/.local/share/mbedls/platforms.json
[1527609972.37][mbedls.lstools_base]Could not read htm on from usb id 10540000024cac8c00000000000000000000000097969905. Falling back to usb id
[1527609972.37][SERI][INF] serial(port=/dev/ttyACM0, baudrate=9600, read_timeout=0.01, write_timeout=5)
[1527609972.37][SERI][INF] reset device using 'default' plugin...
[1527609972.47][SERI][INF] waiting 1.00 sec after reset
[1527609973.48][SERI][INF] wait for it...
[1527609973.48][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1527609973.48][CONN][INF] sending up to 5 __sync packets (specified with --sync=5)
[1527609973.48][CONN][INF] sending preamble '91b1a9fb-9dd3-4b43-889e-b1ed873dde29'
[1527609973.48][SERI][TXD] {{__sync;91b1a9fb-9dd3-4b43-889e-b1ed873dde29}}
[1527609973.61][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1527609973.66][CONN][INF] found SYNC in stream: {{__sync;91b1a9fb-9dd3-4b43-889e-b1ed873dde29}} it is #0 sent, queued...
[1527609973.66][HTST][INF] sync KV found, uuid=91b1a9fb-9dd3-4b43-889e-b1ed873dde29, timestamp=1527609973.661590
[1527609973.68][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1527609973.68][HTST][INF] DUT greentea-client version: 1.3.0
[1527609973.70][CONN][INF] found KV pair in stream: {{__timeout;120}}, queued...
[1527609973.70][HTST][INF] setting timeout to: 120 sec
[1527609973.73][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1527609973.73][HTST][INF] host test class: '<class 'mbed_host_tests.host_tests.default_auto.DefaultAuto'>'
[1527609973.73][HTST][INF] host test setup() call...
[1527609973.73][HTST][INF] CALLBACKs updated
[1527609973.73][HTST][INF] host test detected: default_auto
[1527609973.76][CONN][INF] found KV pair in stream: {{__testcase_count;3}}, queued...
[1527609973.80][CONN][RXD] >>> Running 3 test cases...
[1527609973.85][CONN][INF] found KV pair in stream: {{__testcase_name;NVStore: Basic functionality}}, queued...
[1527609973.89][CONN][INF] found KV pair in stream: {{__testcase_name;NVStore: Race test}}, queued...
[1527609973.94][CONN][RXD]
[1527609973.94][CONN][INF] found KV pair in stream: {{__testcase_name;NVStore: Multiple thread test}}, queued...
[1527609974.00][CONN][RXD] >>> Running case #1: 'NVStore: Basic functionality'...
[1527609974.05][CONN][INF] found KV pair in stream: {{__testcase_start;NVStore: Basic functionality}}, queued...
[1527609974.06][CONN][RXD] NVStore areas:
[1527609974.12][CONN][RXD] Area 0: address 0x00030000, size 32768 (0x8000)
[1527609974.18][CONN][RXD] Area 1: address 0x00038000, size 32768 (0x8000)
[1527609974.44][CONN][RXD] Max keys 20 (out of 127 possible ones)
[1527609974.56][CONN][INF] found KV pair in stream: {{__testcase_finish;NVStore: Basic functionality;1;0}}, queued...
[1527609974.62][CONN][RXD] >>> 'NVStore: Basic functionality': 1 passed, 0 failed
[1527609974.62][CONN][RXD]
[1527609974.67][CONN][RXD] >>> Running case #2: 'NVStore: Race test'...
[1527609974.71][CONN][INF] found KV pair in stream: {{__testcase_start;NVStore: Race test}}, queued...
[1527609975.51][CONN][INF] found KV pair in stream: {{__testcase_finish;NVStore: Race test;1;0}}, queued...
[1527609975.55][CONN][RXD] >>> 'NVStore: Race test': 1 passed, 0 failed
[1527609975.55][CONN][RXD]
[1527609975.61][CONN][RXD] >>> Running case #3: 'NVStore: Multiple thread test'...
[1527609975.66][CONN][INF] found KV pair in stream: {{__testcase_start;NVStore: Multiple thread test}}, queued...
[1527609975.89][CONN][RXD]
[1527609975.89][CONN][RXD]
[1527609975.91][CONN][RXD] ++ MbedOS Error Info ++
[1527609975.96][CONN][RXD] Error Status: 0x80020125 Code: 293 Entity: 2
[1527609976.01][CONN][RXD] Error Message: CMSIS-RTOS error: Stack overflow
[1527609976.03][CONN][RXD] Location: 0x687d
[1527609976.04][CONN][RXD] Error Value: 0x1
[1527609976.16][CONN][RXD] Current Thread: Id: 0x20004498 Entry: 0x3006be9 StackSize: 0x200044e0 StackMem: 0x200044e8 SP: 0x2000ff40


[1527610094.28][HTST][INF] test suite run finished after 120.58 sec...
[1527610094.29][CONN][INF] received special event '__host_test_finished' value='True', finishing
[1527610094.33][HTST][INF] CONN exited with code: 0
[1527610094.33][HTST][INF] No events in queue
[1527610094.33][HTST][INF] stopped consuming events
[1527610094.33][HTST][INF] host test result(): None
[1527610094.33][HTST][WRN] missing __exit event from DUT
[1527610094.33][HTST][WRN] missing __exit_event_queue event from host test
[1527610094.33][HTST][ERR] missing __exit_event_queue event from host test and no result from host test, timeout...
[1527610094.33][HTST][INF] calling blocking teardown()
[1527610094.33][HTST][INF] teardown() finished
[1527610094.33][HTST][INF] {{result;timeout}}
mbedgt: retry mbedhtrun 1/1
mbedgt: ['mbedhtrun', '-m', u'LPC54114', '-p', '/dev/ttyACM0:9600', '-f', u'"BUILD/tests/LPC54114/gcc_arm/features/nvstore/TESTS/nvstore/functionality/functionality.bin"', '-d', u'/mnt/pci-0000_00_14_0-usb-0_6_1_5_1_0-scsi-0_0_0_0', '-c', 'default', '-t', '10540000024cac8c00000000000000000000000097969905', '-r', 'default', '-C', '4', '--sync', '5', '-P', '60'] failed after 1 count
mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'TIMEOUT'
mbedgt: test on hardware with target id: 10540000024cac8c00000000000000000000000097969905
mbedgt: test suite 'features-nvstore-tests-nvstore-functionality' .................................... TIMEOUT in 131.11 sec
        test case: 'NVStore: Basic functionality' .................................................... OK in 0.51 sec
        test case: 'NVStore: Multiple thread test' ................................................... ERROR in 0.00 sec
        test case: 'NVStore: Race test' .............................................................. OK in 0.80 sec
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.7764211262
mbedgt: test suite report:
+------------------+---------------+----------------------------------------------+---------+--------------------+-------------+
| target           | platform_name | test suite                                   | result  | elapsed_time (sec) | copy_method |
+------------------+---------------+----------------------------------------------+---------+--------------------+-------------+
| LPC54114-GCC_ARM | LPC54114      | features-nvstore-tests-nvstore-functionality | TIMEOUT | 131.11             | default     |
+------------------+---------------+----------------------------------------------+---------+--------------------+-------------+
mbedgt: test suite results: 1 TIMEOUT
mbedgt: test case report:
+------------------+---------------+----------------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| target           | platform_name | test suite                                   | test case                     | passed | failed | result | elapsed_time (sec) |
+------------------+---------------+----------------------------------------------+-------------------------------+--------+--------+--------+--------------------+
| LPC54114-GCC_ARM | LPC54114      | features-nvstore-tests-nvstore-functionality | NVStore: Basic functionality  | 1      | 0      | OK     | 0.51               |
| LPC54114-GCC_ARM | LPC54114      | features-nvstore-tests-nvstore-functionality | NVStore: Multiple thread test | 0      | 0      | ERROR  | 0.0                |
| LPC54114-GCC_ARM | LPC54114      | features-nvstore-tests-nvstore-functionality | NVStore: Race test            | 1      | 0      | OK     | 0.8                |
+------------------+---------------+----------------------------------------------+-------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 2 OK / 1 ERROR
mbedgt: completed in 131.30 sec
mbedgt: exited with code 1
[mbed] ERROR: "mbedgt" returned error code 1.
[mbed] ERROR: Command "mbedgt --test-spec /home/arm/repo/mbed-os/BUILD/tests/LPC54114/gcc_arm/test_spec.json -n features-nvstore-tests-nvstore-functionality -V" in "/home/arm/repo/mbed-os"
---

cc : @maclobdell @bentcooke

@cmonr
Copy link
Contributor

cmonr commented May 29, 2018

@ARMmbed/mbed-os-storage Mind taking a quick look at this as well, since an NVStore example is involved?

@davidsaada
Copy link
Contributor

Will have a look at it tomorrow, but at first glance, this seems like a problem we saw when launching the NVStore tests. These tests (mainly the multi thread one, the one that fails here) were initially failing on resource allocation (stack or heap) when running on a few boards. Tests were significantly reduced until we managed to make them work on all boards, including ones with low memory. I guess LPC54114 is such a board, right? If so, may have to take a look at this test again.

@studavekar
Copy link
Contributor Author

@davidsaada from the platform page : https://os.mbed.com/platforms/LPCXpresso54114/ it has 256KB flash, 192KB SRAM

@davidsaada
Copy link
Contributor

Thanks @studavekar. Should be quite sufficient then (comparing to other boards that have less RAM and work fine). I'll try looking into it tomorrow.

@ciarmcom
Copy link
Member

ciarmcom commented Jun 1, 2018

ARM Internal Ref: MBOTRIAGE-7

@davidsaada
Copy link
Contributor

Created PRs #7127 and #7128 to fix this issue. First one is mandatory, second one is optional (but recommended).

@cmonr
Copy link
Contributor

cmonr commented Aug 3, 2018

Closing since both PRs are merged!

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

4 participants