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

[op-creds] Fix RemoveFabric on Sleepy End Devices #16110

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

Damian-Nordic
Copy link
Contributor

Problem

RemoveFabric command sent for the current fabric crashes on Sleepy End Devices because UpdateSEDPollingMode() method,
used to switch between fast and slow polling mode, references a session object that is released by the command.

Change overview

Add a check for the session state.
By the way, remove a debug printf().
Fixes #15910

Testing

Sent RemoveFabric command with the current fabric as an argument and tested that the application doesn't crash.

@boring-cyborg boring-cyborg bot added the app label Mar 11, 2022
@github-actions
Copy link

github-actions bot commented Mar 11, 2022

PR #16110: Size comparison from ae514b6 to 4876875

Decreases (17 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section ae514b6 4876875 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 599102 599038 -64 -0.0
.app_xip_area 506700 506636 -64 -0.0
lock cyw930739m2evb_01 (read/write) 556986 556922 -64 -0.0
.app_xip_area 466112 466048 -64 -0.0
ota-requestor cyw930739m2evb_01 (read/write) 566766 566702 -64 -0.0
.app_xip_area 466228 466164 -64 -0.0
efr32 lighting-app BRD4161A (read only) 921128 920816 -312 -0.0
.text 921120 920808 -312 -0.0
BRD4161A+rpc (read only) 949940 949644 -296 -0.0
.text 949932 949636 -296 -0.0
window-app BRD4161A (read only) 853732 853444 -288 -0.0
.text 853724 853436 -288 -0.0
esp32 all-clusters-app c3devkit (read only) 958524 958508 -16 -0.0
(read/write) 1393858 1393802 -56 -0.0
.flash.rodata 197144 197088 -56 -0.0
.flash.text 958524 958508 -16 -0.0
m5stack (read only) 1014127 1014107 -20 -0.0
(read/write) 461092 461036 -56 -0.0
.flash.rodata 226104 226048 -56 -0.0
.flash.text 1008743 1008723 -20 -0.0
k32w light k32w061+release (read/write) 695388 695076 -312 -0.0
.text 610548 610236 -312 -0.1
lock k32w061+release (read/write) 696360 696064 -296 -0.0
.text 611528 611232 -296 -0.0
linux thermostat-no-ble arm64 (read only) 2181588 2181524 -64 -0.0
.rodata 133444 133380 -64 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2351012 2350956 -56 -0.0
.text 1313612 1313556 -56 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152643 1149775 -2868 -0.2
rodata 144516 144424 -92 -0.1
text 786676 783948 -2728 -0.3
p6 all-clusters-app default (read/write) 2495680 2495608 -72 -0.0
.text 1453944 1453872 -72 -0.0
light-app default (read/write) 2399680 2399624 -56 -0.0
.text 1357944 1357888 -56 -0.0
lock-app default (read/write) 2363240 2363184 -56 -0.0
.text 1321504 1321448 -56 -0.0
telink lighting-app tlsr9518adk80d (read/write) 889766 889630 -136 -0.0
text 628970 628896 -74 -0.0
Full report (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section ae514b6 4876875 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 599102 599038 -64 -0.0
.app_xip_area 506700 506636 -64 -0.0
.bss 75108 75108 0 0.0
.data 640 640 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 556986 556922 -64 -0.0
.app_xip_area 466112 466048 -64 -0.0
.bss 73612 73612 0 0.0
.data 604 604 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 566766 566702 -64 -0.0
.app_xip_area 466228 466164 -64 -0.0
.bss 82932 82932 0 0.0
.data 564 564 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921128 920816 -312 -0.0
(read/write) 128232 128232 0 0.0
.bss 126176 126176 0 0.0
.data 2052 2052 0 0.0
.text 921120 920808 -312 -0.0
BRD4161A+rpc (read only) 949940 949644 -296 -0.0
(read/write) 144184 144184 0 0.0
.bss 141952 141952 0 0.0
.data 2232 2232 0 0.0
.text 949932 949636 -296 -0.0
window-app BRD4161A (read only) 853732 853444 -288 -0.0
(read/write) 126216 126216 0 0.0
.bss 124312 124312 0 0.0
.data 1904 1904 0 0.0
.text 853724 853436 -288 -0.0
esp32 all-clusters-app c3devkit (read only) 958524 958508 -16 -0.0
(read/write) 1393858 1393802 -56 -0.0
.dram0.bss 63584 63584 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 197144 197088 -56 -0.0
.flash.text 958524 958508 -16 -0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1014127 1014107 -20 -0.0
(read/write) 461092 461036 -56 -0.0
.dram0.bss 69104 69104 0 0.0
.dram0.data 34048 34048 0 0.0
.flash.rodata 226104 226048 -56 -0.0
.flash.text 1008743 1008723 -20 -0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 695388 695076 -312 -0.0
.bss 77112 77112 0 0.0
.data 1928 1928 0 0.0
.text 610548 610236 -312 -0.1
lock k32w061+release (read/write) 696360 696064 -296 -0.0
.bss 77080 77080 0 0.0
.data 1952 1952 0 0.0
.text 611528 611232 -296 -0.0
linux chip-tool-ipv6only arm64 (read only) 9729660 9729660 0 0.0
(read/write) 475729 475729 0 0.0
.bss 43953 43953 0 0.0
.data 1176 1176 0 0.0
.data.rel.ro 371520 371520 0 0.0
.dynamic 560 560 0 0.0
.got 55280 55280 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492148 492148 0 0.0
.text 8186868 8186868 0 0.0
thermostat-no-ble arm64 (read only) 2181588 2181524 -64 -0.0
(read/write) 148625 148625 0 0.0
.bss 65409 65409 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 74968 74968 0 0.0
.dynamic 560 560 0 0.0
.got 4256 4256 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 133444 133380 -64 -0.0
.text 1829984 1829984 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2351012 2350956 -56 -0.0
.bss 186212 186212 0 0.0
.data 5784 5784 0 0.0
.text 1313612 1313556 -56 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152643 1149775 -2868 -0.2
bss 146188 146188 0 0.0
rodata 144516 144424 -92 -0.1
text 786676 783948 -2728 -0.3
p6 all-clusters-app default (read/write) 2495680 2495608 -72 -0.0
.bss 119640 119640 0 0.0
.data 2672 2672 0 0.0
.text 1453944 1453872 -72 -0.0
light-app default (read/write) 2399680 2399624 -56 -0.0
.bss 113104 113104 0 0.0
.data 2528 2528 0 0.0
.text 1357944 1357888 -56 -0.0
lock-app default (read/write) 2363240 2363184 -56 -0.0
.bss 112848 112848 0 0.0
.data 2488 2488 0 0.0
.text 1321504 1321448 -56 -0.0
telink lighting-app tlsr9518adk80d (read/write) 889766 889630 -136 -0.0
bss 86976 86976 0 0.0
noinit 37160 37160 0 0.0
text 628970 628896 -74 -0.0

RemoveFabric command sent for the current fabric crashes
on Sleepy End Devices because UpdateSEDPollingMode() method,
used to switch between fast and slow polling mode,
references a session object that is released by the command.

By the way, remove a debug printf().
@github-actions
Copy link

github-actions bot commented Mar 14, 2022

PR #16110: Size comparison from 2982c0c to bc781bd

Decreases (17 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2982c0c bc781bd change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602530 602466 -64 -0.0
.app_xip_area 509708 509644 -64 -0.0
lock cyw930739m2evb_01 (read/write) 560390 560326 -64 -0.0
.app_xip_area 469096 469032 -64 -0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570002 569938 -64 -0.0
.app_xip_area 469060 468996 -64 -0.0
efr32 lighting-app BRD4161A (read only) 918144 917832 -312 -0.0
.text 918136 917824 -312 -0.0
BRD4161A+rpc (read only) 946932 946636 -296 -0.0
.text 946924 946628 -296 -0.0
window-app BRD4161A (read only) 850616 850328 -288 -0.0
.text 850608 850320 -288 -0.0
esp32 all-clusters-app c3devkit (read only) 961344 961328 -16 -0.0
(read/write) 1394994 1394938 -56 -0.0
.flash.rodata 197832 197776 -56 -0.0
.flash.text 961344 961328 -16 -0.0
m5stack (read only) 1016963 1016939 -24 -0.0
(read/write) 462204 462148 -56 -0.0
.flash.rodata 226776 226720 -56 -0.0
.flash.text 1011579 1011555 -24 -0.0
k32w light k32w061+release (read/write) 699052 698740 -312 -0.0
.text 613804 613492 -312 -0.1
lock k32w061+release (read/write) 699884 699596 -288 -0.0
.text 614624 614336 -288 -0.0
linux thermostat-no-ble arm64 (read only) 2206980 2206900 -80 -0.0
.rodata 136820 136756 -64 -0.0
.text 1850848 1850832 -16 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2352748 2352692 -56 -0.0
.text 1315348 1315292 -56 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1156219 1153367 -2852 -0.2
rodata 145220 145128 -92 -0.1
text 789208 786480 -2728 -0.3
p6 all-clusters-app default (read/write) 2492128 2492072 -56 -0.0
.text 1450392 1450336 -56 -0.0
light-app default (read/write) 2395992 2395920 -72 -0.0
.text 1354256 1354184 -72 -0.0
lock-app default (read/write) 2359536 2359464 -72 -0.0
.text 1317800 1317728 -72 -0.0
telink lighting-app tlsr9518adk80d (read/write) 893842 893706 -136 -0.0
text 631882 631808 -74 -0.0
Full report (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2982c0c bc781bd change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602530 602466 -64 -0.0
.app_xip_area 509708 509644 -64 -0.0
.bss 75576 75576 0 0.0
.data 596 596 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 560390 560326 -64 -0.0
.app_xip_area 469096 469032 -64 -0.0
.bss 74080 74080 0 0.0
.data 560 560 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570002 569938 -64 -0.0
.app_xip_area 469060 468996 -64 -0.0
.bss 83384 83384 0 0.0
.data 520 520 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 918144 917832 -312 -0.0
(read/write) 128656 128656 0 0.0
.bss 126648 126648 0 0.0
.data 2008 2008 0 0.0
.text 918136 917824 -312 -0.0
BRD4161A+rpc (read only) 946932 946636 -296 -0.0
(read/write) 144612 144612 0 0.0
.bss 142424 142424 0 0.0
.data 2188 2188 0 0.0
.text 946924 946628 -296 -0.0
window-app BRD4161A (read only) 850616 850328 -288 -0.0
(read/write) 126632 126632 0 0.0
.bss 124768 124768 0 0.0
.data 1864 1864 0 0.0
.text 850608 850320 -288 -0.0
esp32 all-clusters-app c3devkit (read only) 961344 961328 -16 -0.0
(read/write) 1394994 1394938 -56 -0.0
.dram0.bss 64056 64056 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 197832 197776 -56 -0.0
.flash.text 961344 961328 -16 -0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1016963 1016939 -24 -0.0
(read/write) 462204 462148 -56 -0.0
.dram0.bss 69576 69576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 226776 226720 -56 -0.0
.flash.text 1011579 1011555 -24 -0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 699052 698740 -312 -0.0
.bss 77560 77560 0 0.0
.data 1888 1888 0 0.0
.text 613804 613492 -312 -0.1
lock k32w061+release (read/write) 699884 699596 -288 -0.0
.bss 77552 77552 0 0.0
.data 1908 1908 0 0.0
.text 614624 614336 -288 -0.0
linux chip-tool-ipv6only arm64 (read only) 9727788 9727788 0 0.0
(read/write) 475425 475425 0 0.0
.bss 44017 44017 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371232 371232 0 0.0
.dynamic 560 560 0 0.0
.got 55256 55256 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 492244 492244 0 0.0
.text 8185700 8185700 0 0.0
thermostat-no-ble arm64 (read only) 2206980 2206900 -80 -0.0
(read/write) 149377 149377 0 0.0
.bss 65649 65649 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75368 75368 0 0.0
.dynamic 560 560 0 0.0
.got 4352 4352 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 136820 136756 -64 -0.0
.text 1850848 1850832 -16 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2352748 2352692 -56 -0.0
.bss 186652 186652 0 0.0
.data 5752 5752 0 0.0
.text 1315348 1315292 -56 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1156219 1153367 -2852 -0.2
bss 146644 146644 0 0.0
rodata 145220 145128 -92 -0.1
text 789208 786480 -2728 -0.3
p6 all-clusters-app default (read/write) 2492128 2492072 -56 -0.0
.bss 120080 120080 0 0.0
.data 2632 2632 0 0.0
.text 1450392 1450336 -56 -0.0
light-app default (read/write) 2395992 2395920 -72 -0.0
.bss 113544 113544 0 0.0
.data 2488 2488 0 0.0
.text 1354256 1354184 -72 -0.0
lock-app default (read/write) 2359536 2359464 -72 -0.0
.bss 113288 113288 0 0.0
.data 2448 2448 0 0.0
.text 1317800 1317728 -72 -0.0
telink lighting-app tlsr9518adk80d (read/write) 893842 893706 -136 -0.0
bss 87432 87432 0 0.0
noinit 37160 37160 0 0.0
text 631882 631808 -74 -0.0

@bzbarsky-apple bzbarsky-apple merged commit 6e76729 into project-chip:master Mar 14, 2022
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
RemoveFabric command sent for the current fabric crashes
on Sleepy End Devices because UpdateSEDPollingMode() method,
used to switch between fast and slow polling mode,
references a session object that is released by the command.

By the way, remove a debug printf().
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.

[TC-MF-1.17] [TE8] SDK code crashes
4 participants