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

Fix EFR lock app #18623

Merged
merged 1 commit into from
May 19, 2022
Merged

Fix EFR lock app #18623

merged 1 commit into from
May 19, 2022

Conversation

rgoliver
Copy link

Problem

The EFR lock app now crashes, the logs indicate this is from a chip stack lock issue:

20220519 11:41:41  DBG  CHIP  [DL]   Start BLE advertissement
20220519 11:41:41  INF  APP          Current Software Version: 0.1ALPHA
20220519 11:41:41  DBG  CHIP  [DMG]  Endpoint 0, Cluster 0x0000_002A update version to 9e7ffbf5
20220519 11:41:41  INF  CHIP  [ZCL]  Cluster callback: 0x0000_002A
20220519 11:41:41  DBG  CHIP  [DMG]  Endpoint 0, Cluster 0x0000_002A update version to 9e7ffbf6
20220519 11:41:41  INF  CHIP  [ZCL]  Cluster callback: 0x0000_002A
20220519 11:41:41  INF  CHIP  [DL]   _OnPlatformEvent default:  event->Type = 32780
20220519 11:41:41  DBG  CHIP  [DL]   OpenThread State Changed (Flags: 0x00038200)
20220519 11:41:41  DBG  CHIP  [DL]      Network Name: OpenThread
20220519 11:41:41  DBG  CHIP  [DL]      PAN Id: 0xFFFF
20220519 11:41:41  DBG  CHIP  [DL]      Extended PAN Id: 0xDEAD00BEEF00CAFE
20220519 11:41:41  DBG  CHIP  [DL]      Channel: 11
20220519 11:41:41  DBG  CHIP  [DL]      Mesh Prefix: fdde:ad00:beef:0:0:0:0:0/64
20220519 11:41:41  ERR  CHIP  [DL]   Chip stack locking error at '../../examples/lock-app/efr32/third_party/connectedhomeip/src/app/util/attribute-stor
20220519 11:41:41  INF               age.cpp:549'. Code is unsafe/racy
20220519 11:41:41  ERR  CHIP  [-]    chipDie chipDie chipDie

Bisect indicates it was introduced from: #18280

Change overview

Lock chip stack for 'GetNumberOfCredentialsSupportedPerUser' at init.

Testing

Efr32mg12 lock example now boots.

Efr lock example was crashing from a missing lock at init.
Added the required lock around the offending code.
@github-actions
Copy link

github-actions bot commented May 19, 2022

PR #18623: Size comparison from 45f623b to da75f3e

Full report (37 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 45f623b da75f3e change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 667279 667279 0 0.0
(read/write) 183392 183392 0 0.0
.bss 73652 73652 0 0.0
.data 3404 3404 0 0.0
.rodata 100087 100087 0 0.0
.text 566964 566964 0 0.0
lock-ftd LP_CC2652R7 (read only) 677355 677355 0 0.0
(read/write) 165300 165300 0 0.0
.bss 72692 72692 0 0.0
.data 3236 3236 0 0.0
.rodata 94907 94907 0 0.0
.text 581964 581964 0 0.0
lock-mtd LP_CC2652R7 (read only) 626179 626179 0 0.0
(read/write) 145524 145524 0 0.0
.bss 68428 68428 0 0.0
.data 3236 3236 0 0.0
.rodata 94795 94795 0 0.0
.text 530892 530892 0 0.0
pump-app LP_CC2652R7 (read only) 659583 659583 0 0.0
(read/write) 184352 184352 0 0.0
.bss 72948 72948 0 0.0
.data 3268 3268 0 0.0
.rodata 79415 79415 0 0.0
.text 579688 579688 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654095 654095 0 0.0
(read/write) 189648 189648 0 0.0
.bss 73012 73012 0 0.0
.data 3232 3232 0 0.0
.rodata 83527 83527 0 0.0
.text 570088 570088 0 0.0
shell LP_CC2652R7 (read only) 660346 660346 0 0.0
(read/write) 185884 185884 0 0.0
.bss 76012 76012 0 0.0
.data 3408 3408 0 0.0
.rodata 97042 97042 0 0.0
.text 563080 563080 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 625402 625402 0 0.0
.app_xip_area 529016 529016 0 0.0
.bss 79028 79028 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 628342 628342 0 0.0
.app_xip_area 533412 533412 0 0.0
.bss 77604 77604 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571006 571006 0 0.0
.app_xip_area 466360 466360 0 0.0
.bss 87024 87024 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 917844 917844 0 0.0
(read/write) 133244 133244 0 0.0
.bss 131184 131184 0 0.0
.data 2060 2060 0 0.0
.text 917836 917836 0 0.0
BRD4161A+rpc (read only) 952016 952016 0 0.0
(read/write) 149928 149928 0 0.0
.bss 147664 147664 0 0.0
.data 2264 2264 0 0.0
.text 952008 952008 0 0.0
BRD4161A+rs911x (read only) 791372 791372 0 0.0
(read/write) 129512 129512 0 0.0
.bss 127444 127444 0 0.0
.data 2068 2068 0 0.0
.text 791364 791364 0 0.0
lock-app BRD4161A+wf200 (read only) 947348 947348 0 0.0
(read/write) 123996 123996 0 0.0
.bss 121972 121972 0 0.0
.data 2024 2024 0 0.0
.text 947340 947340 0 0.0
window-app BRD4161A (read only) 897956 897956 0 0.0
(read/write) 133304 133304 0 0.0
.bss 131256 131256 0 0.0
.data 2048 2048 0 0.0
.text 897948 897948 0 0.0
esp32 all-clusters-app c3devkit (read only) 1000984 1000984 0 0.0
(read/write) 1477898 1477898 0 0.0
.dram0.bss 68208 68208 0 0.0
.dram0.data 14624 14624 0 0.0
.flash.rodata 209640 209640 0 0.0
.flash.text 1000984 1000984 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1056075 1056075 0 0.0
(read/write) 479884 479884 0 0.0
.dram0.bss 73728 73728 0 0.0
.dram0.data 34200 34200 0 0.0
.flash.rodata 239960 239960 0 0.0
.flash.text 1050691 1050691 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 682880 682880 0 0.0
.bss 80224 80224 0 0.0
.data 2016 2016 0 0.0
.text 598936 598936 0 0.0
lock k32w061+release (read/write) 729424 729424 0 0.0
.bss 80656 80656 0 0.0
.data 1976 1976 0 0.0
.text 645088 645088 0 0.0
linux all-clusters-app debug (read only) 2752121 2752121 0 0.0
(read/write) 175904 175904 0 0.0
.bss 85056 85056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 82632 82632 0 0.0
.dynamic 608 608 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 1016 1016 0 0.0
.rodata 240925 240925 0 0.0
.text 2336882 2336882 0 0.0
bridge-app debug+rpc (read only) 2034737 2034737 0 0.0
(read/write) 147736 147736 0 0.0
.bss 72864 72864 0 0.0
.data 3936 3936 0 0.0
.data.rel.ro 65368 65368 0 0.0
.dynamic 592 592 0 0.0
.got 4272 4272 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 169257 169257 0 0.0
.text 1708434 1708434 0 0.0
chip-tool debug (read only) 9305205 9305205 0 0.0
(read/write) 579160 579160 0 0.0
.bss 23936 23936 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 547768 547768 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 480701 480701 0 0.0
.text 7497669 7497669 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9076804 9076804 0 0.0
(read/write) 645265 645265 0 0.0
.bss 42225 42225 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 583016 583016 0 0.0
.dynamic 560 560 0 0.0
.got 14984 14984 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 445540 445540 0 0.0
.text 7169364 7169364 0 0.0
lighting-app debug+rpc (read only) 2329249 2329249 0 0.0
(read/write) 153184 153184 0 0.0
.bss 74656 74656 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 70712 70712 0 0.0
.dynamic 608 608 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 188297 188297 0 0.0
.text 1974674 1974674 0 0.0
lock-app debug (read only) 2242697 2242697 0 0.0
(read/write) 147896 147896 0 0.0
.bss 73344 73344 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 67272 67272 0 0.0
.dynamic 592 592 0 0.0
.got 4336 4336 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 198905 198905 0 0.0
.text 1883906 1883906 0 0.0
ota-provider-app debug (read only) 2064657 2064657 0 0.0
(read/write) 140944 140944 0 0.0
.bss 72800 72800 0 0.0
.data 1768 1768 0 0.0
.data.rel.ro 60584 60584 0 0.0
.dynamic 608 608 0 0.0
.got 4504 4504 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 179488 179488 0 0.0
.text 1726674 1726674 0 0.0
ota-requestor-app debug (read only) 2093609 2093609 0 0.0
(read/write) 143752 143752 0 0.0
.bss 73472 73472 0 0.0
.data 1992 1992 0 0.0
.data.rel.ro 62648 62648 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 175520 175520 0 0.0
.text 1758130 1758130 0 0.0
shell debug (read only) 2567945 2567945 0 0.0
(read/write) 199768 199768 0 0.0
.bss 115752 115752 0 0.0
.data 1376 1376 0 0.0
.data.rel.ro 76896 76896 0 0.0
.dynamic 608 608 0 0.0
.got 4192 4192 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 221970 221970 0 0.0
.text 2185042 2185042 0 0.0
thermostat-no-ble arm64 (read only) 2354460 2354460 0 0.0
(read/write) 176305 176305 0 0.0
.bss 87601 87601 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79376 79376 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 147356 147356 0 0.0
.text 1978192 1978192 0 0.0
tv-app debug (read only) 2854689 2854689 0 0.0
(read/write) 278752 278752 0 0.0
.bss 190744 190744 0 0.0
.data 4672 4672 0 0.0
.data.rel.ro 77088 77088 0 0.0
.dynamic 592 592 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 221329 221329 0 0.0
.text 2451234 2451234 0 0.0
tv-casting-app debug (read only) 5417657 5417657 0 0.0
(read/write) 225024 225024 0 0.0
.bss 78360 78360 0 0.0
.data 2368 2368 0 0.0
.data.rel.ro 138080 138080 0 0.0
.dynamic 608 608 0 0.0
.got 4728 4728 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 339873 339873 0 0.0
.text 4718386 4718386 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2420600 2420600 0 0.0
.bss 202668 202668 0 0.0
.data 5872 5872 0 0.0
.text 1383244 1383244 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180887 1180887 0 0.0
bss 138380 138380 0 0.0
rodata 152848 152848 0 0.0
text 810796 810796 0 0.0
p6 all-clusters-app default (read/write) 2538872 2538872 0 0.0
.bss 136176 136176 0 0.0
.data 2808 2808 0 0.0
.text 1497136 1497136 0 0.0
light-app default (read/write) 2425408 2425408 0 0.0
.bss 129488 129488 0 0.0
.data 2608 2608 0 0.0
.text 1383672 1383672 0 0.0
lock-app default (read/write) 2436112 2436112 0 0.0
.bss 129304 129304 0 0.0
.data 2568 2568 0 0.0
.text 1394376 1394376 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 782620 782620 0 0.0
bss 70608 70608 0 0.0
noinit 40416 40416 0 0.0
text 553516 553516 0 0.0
lighting-app tlsr9518adk80d (read/write) 802700 802700 0 0.0
bss 70864 70864 0 0.0
noinit 40416 40416 0 0.0
text 570282 570282 0 0.0

@andy31415 andy31415 merged commit 29a7c42 into project-chip:master May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants