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 CHIPDeviceControllerFactory shutdown #19022

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Jun 1, 2022

Problem

  • SessionResumptionStorage is leaked

    • Ownership is passed using raw pointers. This is bad form,
      and there are many more instances of it (not fixed here).
  • DeviceControllerSystemState destructor is called twice
    (once by Release(), then again by Delete())

Change overview

  • Use UniquePtr to avoid leaking SessionResumptionStorage and retain ownership on DeviceControllerSystemState
  • Don't destroy DeviceControllerSystemState in Release()

Testing

Unit tests & CI

@mspang mspang force-pushed the for-chip/factory-shutdown branch 2 times, most recently from 7c5a9b5 to 8a9c33c Compare June 20, 2022 15:06
@github-actions
Copy link

github-actions bot commented Jun 20, 2022

PR #19022: Size comparison from 98a1c6b to 8a9c33c

Increases (5 builds for cyw30739, linux, telink)
platform target config section 98a1c6b 8a9c33c change % change
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 616122 616130 8 0.0
.app_xip_area 473676 473684 8 0.0
linux chip-tool debug (read only) 10141773 10144685 2912 0.0
.text 8226741 8229653 2912 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9884884 2272 0.0
.text 7873860 7876132 2272 0.0
tv-app debug (read only) 3068849 3071761 2912 0.1
.text 2635810 2638722 2912 0.1
telink lighting-app tlsr9518adk80d text 576134 576136 2 0.0
Decreases (1 build for cc13x2_26x2)
platform target config section 98a1c6b 8a9c33c change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 648063 648055 -8 -0.0
.text 557336 557328 -8 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 98a1c6b 8a9c33c change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659567 659567 0 0.0
(read/write) 191296 191296 0 0.0
.bss 73756 73756 0 0.0
.data 3356 3356 0 0.0
.rodata 87087 87087 0 0.0
.text 572168 572168 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 648063 648055 -8 -0.0
(read/write) 157316 157316 0 0.0
.bss 73044 73044 0 0.0
.data 3356 3356 0 0.0
.rodata 90407 90407 0 0.0
.text 557336 557328 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 690531 690531 0 0.0
(read/write) 150444 150444 0 0.0
.bss 70756 70756 0 0.0
.data 3280 3280 0 0.0
.rodata 99163 99163 0 0.0
.text 590884 590884 0 0.0
lock-mtd LP_CC2652R7 (read only) 639931 639931 0 0.0
(read/write) 143888 143888 0 0.0
.bss 66492 66492 0 0.0
.data 3280 3280 0 0.0
.rodata 99043 99043 0 0.0
.text 540396 540396 0 0.0
pump-app LP_CC2652R7 (read only) 671467 671467 0 0.0
(read/write) 170396 170396 0 0.0
.bss 70876 70876 0 0.0
.data 3280 3280 0 0.0
.rodata 87259 87259 0 0.0
.text 583724 583724 0 0.0
pump-controller-app LP_CC2652R7 (read only) 657359 657359 0 0.0
(read/write) 184616 184616 0 0.0
.bss 70988 70988 0 0.0
.data 3276 3276 0 0.0
.rodata 83103 83103 0 0.0
.text 573776 573776 0 0.0
shell LP_CC2652R7 (read only) 688994 688994 0 0.0
(read/write) 157364 157364 0 0.0
.bss 76052 76052 0 0.0
.data 3360 3360 0 0.0
.rodata 109658 109658 0 0.0
.text 579024 579024 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 612766 612766 0 0.0
.app_xip_area 469432 469432 0 0.0
.bss 86288 86288 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 610122 610122 0 0.0
.app_xip_area 466612 466612 0 0.0
.bss 86464 86464 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 616122 616130 8 0.0
.app_xip_area 473676 473684 8 0.0
.bss 85456 85456 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 924060 924060 0 0.0
(read/write) 132416 132416 0 0.0
.bss 130336 130336 0 0.0
.data 2080 2080 0 0.0
.text 924052 924052 0 0.0
BRD4161A+rpc (read only) 959748 959748 0 0.0
(read/write) 149292 149292 0 0.0
.bss 147008 147008 0 0.0
.data 2284 2284 0 0.0
.text 959740 959740 0 0.0
BRD4161A+rs911x (read only) 799456 799456 0 0.0
(read/write) 128692 128692 0 0.0
.bss 126604 126604 0 0.0
.data 2088 2088 0 0.0
.text 799448 799448 0 0.0
lock-app BRD4161A+wf200 (read only) 965876 965876 0 0.0
(read/write) 129068 129068 0 0.0
.bss 126980 126980 0 0.0
.data 2088 2088 0 0.0
.text 965868 965868 0 0.0
window-app BRD4161A (read only) 909204 909204 0 0.0
(read/write) 132516 132516 0 0.0
.bss 130408 130408 0 0.0
.data 2108 2108 0 0.0
.text 909196 909196 0 0.0
esp32 all-clusters-app c3devkit (read only) 1012960 1012960 0 0.0
(read/write) 1482898 1482898 0 0.0
.dram0.bss 69392 69392 0 0.0
.dram0.data 14632 14632 0 0.0
.flash.rodata 213440 213440 0 0.0
.flash.text 1012960 1012960 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1067459 1067459 0 0.0
(read/write) 485016 485016 0 0.0
.dram0.bss 74912 74912 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 243964 243964 0 0.0
.flash.text 1062075 1062075 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 658940 658940 0 0.0
.bss 68756 68756 0 0.0
.data 1992 1992 0 0.0
.text 582392 582392 0 0.0
lock k32w061+release (read/write) 720916 720916 0 0.0
.bss 69196 69196 0 0.0
.data 2000 2000 0 0.0
.text 643920 643920 0 0.0
linux all-clusters-app debug (read only) 2931385 2931385 0 0.0
(read/write) 188656 188656 0 0.0
.bss 95744 95744 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84664 84664 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 260029 260029 0 0.0
.text 2494914 2494914 0 0.0
all-clusters-minimal-app debug (read only) 2785097 2785097 0 0.0
(read/write) 180560 180560 0 0.0
.bss 95072 95072 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77304 77304 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 261565 261565 0 0.0
.text 2349266 2349266 0 0.0
bridge-app debug+rpc (read only) 2287665 2287665 0 0.0
(read/write) 159424 159424 0 0.0
.bss 83136 83136 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 66728 66728 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 194848 194848 0 0.0
.text 1931730 1931730 0 0.0
chip-tool debug (read only) 10141773 10144685 2912 0.0
(read/write) 609544 609544 0 0.0
.bss 24352 24352 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 577808 577808 0 0.0
.dynamic 624 624 0 0.0
.got 5008 5008 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509301 509301 0 0.0
.text 8226741 8229653 2912 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9884884 2272 0.0
(read/write) 674225 674225 0 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 613208 613208 0 0.0
.dynamic 528 528 0 0.0
.got 13416 13416 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472324 472324 0 0.0
.text 7873860 7876132 2272 0.0
lighting-app debug+rpc (read only) 2520433 2520433 0 0.0
(read/write) 163448 163448 0 0.0
.bss 83616 83616 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 71896 71896 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 210632 210632 0 0.0
.text 2140098 2140098 0 0.0
lock-app debug (read only) 2459113 2459113 0 0.0
(read/write) 158096 158096 0 0.0
.bss 82016 82016 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 68568 68568 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 224328 224328 0 0.0
.text 2070482 2070482 0 0.0
ota-provider-app debug (read only) 2296993 2296993 0 0.0
(read/write) 152232 152232 0 0.0
.bss 81696 81696 0 0.0
.data 1912 1912 0 0.0
.data.rel.ro 62840 62840 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 200504 200504 0 0.0
.text 1934338 1934338 0 0.0
ota-requestor-app debug (read only) 2412705 2412705 0 0.0
(read/write) 158976 158976 0 0.0
.bss 84000 84000 0 0.0
.data 2200 2200 0 0.0
.data.rel.ro 66936 66936 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 204192 204192 0 0.0
.text 2038130 2038130 0 0.0
shell debug (read only) 2604865 2604865 0 0.0
(read/write) 219288 219288 0 0.0
.bss 134504 134504 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 77808 77808 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 230290 230290 0 0.0
.text 2214818 2214818 0 0.0
thermostat-no-ble arm64 (read only) 2571580 2571580 0 0.0
(read/write) 192193 192193 0 0.0
.bss 99489 99489 0 0.0
.data 1688 1688 0 0.0
.data.rel.ro 82928 82928 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 163340 163340 0 0.0
.text 2169120 2169120 0 0.0
tv-app debug (read only) 3068849 3071761 2912 0.1
(read/write) 289352 289352 0 0.0
.bss 199240 199240 0 0.0
.data 4656 4656 0 0.0
.data.rel.ro 79016 79016 0 0.0
.dynamic 608 608 0 0.0
.got 4840 4840 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 246176 246176 0 0.0
.text 2635810 2638722 2912 0.1
tv-casting-app debug (read only) 5534513 5534513 0 0.0
(read/write) 195664 195664 0 0.0
.bss 84424 84424 0 0.0
.data 2448 2448 0 0.0
.data.rel.ro 102576 102576 0 0.0
.dynamic 608 608 0 0.0
.got 4712 4712 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 340137 340137 0 0.0
.text 4918146 4918146 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2438104 2438104 0 0.0
.bss 208204 208204 0 0.0
.data 5864 5864 0 0.0
.text 1400748 1400748 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1198747 1198747 0 0.0
bss 141598 141598 0 0.0
rodata 155676 155676 0 0.0
text 822552 822552 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1146703 1146703 0 0.0
bss 140850 140850 0 0.0
rodata 132200 132200 0 0.0
text 794772 794772 0 0.0
p6 all-clusters-app default (read/write) 2553928 2553928 0 0.0
.bss 143384 143384 0 0.0
.data 2776 2776 0 0.0
.text 1512192 1512192 0 0.0
all-clusters-minimal-app default (read/write) 2499776 2499776 0 0.0
.bss 142664 142664 0 0.0
.data 2776 2776 0 0.0
.text 1458040 1458040 0 0.0
light-app default (read/write) 2430520 2430520 0 0.0
.bss 134744 134744 0 0.0
.data 2592 2592 0 0.0
.text 1388784 1388784 0 0.0
lock-app default (read/write) 2451216 2451216 0 0.0
.bss 134568 134568 0 0.0
.data 2600 2600 0 0.0
.text 1409480 1409480 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 789088 789088 0 0.0
bss 69892 69892 0 0.0
noinit 40416 40416 0 0.0
text 559674 559674 0 0.0
lighting-app tlsr9518adk80d (read/write) 808792 808792 0 0.0
bss 70140 70140 0 0.0
noinit 40416 40416 0 0.0
text 576134 576136 2 0.0

@mspang mspang force-pushed the for-chip/factory-shutdown branch from 8a9c33c to b75b8c6 Compare June 20, 2022 22:11
@mspang mspang force-pushed the for-chip/factory-shutdown branch from b75b8c6 to 623d21c Compare June 20, 2022 22:24
@github-actions
Copy link

github-actions bot commented Jun 20, 2022

PR #19022: Size comparison from 48606c6 to 623d21c

Increases (4 builds for cc13x2_26x2, linux)
platform target config section 48606c6 623d21c change % change
cc13x2_26x2 shell LP_CC2652R7 (read/write) 157364 157372 8 0.0
linux chip-tool debug (read only) 10141773 10144685 2912 0.0
.rodata 509301 509333 32 0.0
.text 8226741 8229621 2880 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9885012 2400 0.0
.rodata 472324 472372 48 0.0
.text 7873860 7876212 2352 0.0
tv-app debug (read only) 3068849 3071761 2912 0.1
.rodata 246176 246208 32 0.0
.text 2635810 2638690 2880 0.1
Decreases (3 builds for cc13x2_26x2, telink)
platform target config section 48606c6 623d21c change % change
cc13x2_26x2 shell LP_CC2652R7 (read only) 688994 688986 -8 -0.0
.text 579024 579016 -8 -0.0
telink light-switch-app tlsr9518adk80d text 559678 559676 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 808800 808792 -8 -0.0
text 576138 576136 -2 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 48606c6 623d21c change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659567 659567 0 0.0
(read/write) 191296 191296 0 0.0
.bss 73756 73756 0 0.0
.data 3356 3356 0 0.0
.rodata 87087 87087 0 0.0
.text 572168 572168 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 648063 648063 0 0.0
(read/write) 157316 157316 0 0.0
.bss 73044 73044 0 0.0
.data 3356 3356 0 0.0
.rodata 90407 90407 0 0.0
.text 557336 557336 0 0.0
lock-ftd LP_CC2652R7 (read only) 690531 690531 0 0.0
(read/write) 150444 150444 0 0.0
.bss 70756 70756 0 0.0
.data 3280 3280 0 0.0
.rodata 99163 99163 0 0.0
.text 590884 590884 0 0.0
lock-mtd LP_CC2652R7 (read only) 639931 639931 0 0.0
(read/write) 143888 143888 0 0.0
.bss 66492 66492 0 0.0
.data 3280 3280 0 0.0
.rodata 99043 99043 0 0.0
.text 540396 540396 0 0.0
pump-app LP_CC2652R7 (read only) 671467 671467 0 0.0
(read/write) 170396 170396 0 0.0
.bss 70876 70876 0 0.0
.data 3280 3280 0 0.0
.rodata 87259 87259 0 0.0
.text 583724 583724 0 0.0
pump-controller-app LP_CC2652R7 (read only) 657359 657359 0 0.0
(read/write) 184616 184616 0 0.0
.bss 70988 70988 0 0.0
.data 3276 3276 0 0.0
.rodata 83103 83103 0 0.0
.text 573776 573776 0 0.0
shell LP_CC2652R7 (read only) 688994 688986 -8 -0.0
(read/write) 157364 157372 8 0.0
.bss 76052 76052 0 0.0
.data 3360 3360 0 0.0
.rodata 109658 109658 0 0.0
.text 579024 579016 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 612766 612766 0 0.0
.app_xip_area 469432 469432 0 0.0
.bss 86288 86288 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 610122 610122 0 0.0
.app_xip_area 466612 466612 0 0.0
.bss 86464 86464 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 616130 616130 0 0.0
.app_xip_area 473684 473684 0 0.0
.bss 85456 85456 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 924060 924060 0 0.0
(read/write) 132416 132416 0 0.0
.bss 130336 130336 0 0.0
.data 2080 2080 0 0.0
.text 924052 924052 0 0.0
BRD4161A+rpc (read only) 959748 959748 0 0.0
(read/write) 149292 149292 0 0.0
.bss 147008 147008 0 0.0
.data 2284 2284 0 0.0
.text 959740 959740 0 0.0
BRD4161A+rs911x (read only) 799456 799456 0 0.0
(read/write) 128692 128692 0 0.0
.bss 126604 126604 0 0.0
.data 2088 2088 0 0.0
.text 799448 799448 0 0.0
lock-app BRD4161A+wf200 (read only) 965876 965876 0 0.0
(read/write) 129068 129068 0 0.0
.bss 126980 126980 0 0.0
.data 2088 2088 0 0.0
.text 965868 965868 0 0.0
window-app BRD4161A (read only) 909204 909204 0 0.0
(read/write) 132516 132516 0 0.0
.bss 130408 130408 0 0.0
.data 2108 2108 0 0.0
.text 909196 909196 0 0.0
esp32 all-clusters-app c3devkit (read only) 1012958 1012958 0 0.0
(read/write) 1482898 1482898 0 0.0
.dram0.bss 69392 69392 0 0.0
.dram0.data 14632 14632 0 0.0
.flash.rodata 213440 213440 0 0.0
.flash.text 1012958 1012958 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1067459 1067459 0 0.0
(read/write) 485016 485016 0 0.0
.dram0.bss 74912 74912 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 243964 243964 0 0.0
.flash.text 1062075 1062075 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 658940 658940 0 0.0
.bss 68756 68756 0 0.0
.data 1992 1992 0 0.0
.text 582392 582392 0 0.0
lock k32w061+release (read/write) 720916 720916 0 0.0
.bss 69196 69196 0 0.0
.data 2000 2000 0 0.0
.text 643920 643920 0 0.0
linux all-clusters-app debug (read only) 2931385 2931385 0 0.0
(read/write) 188656 188656 0 0.0
.bss 95744 95744 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84664 84664 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 260029 260029 0 0.0
.text 2494914 2494914 0 0.0
all-clusters-minimal-app debug (read only) 2785097 2785097 0 0.0
(read/write) 180560 180560 0 0.0
.bss 95072 95072 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77304 77304 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 261565 261565 0 0.0
.text 2349266 2349266 0 0.0
bridge-app debug+rpc (read only) 2287665 2287665 0 0.0
(read/write) 159424 159424 0 0.0
.bss 83136 83136 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 66728 66728 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 194848 194848 0 0.0
.text 1931730 1931730 0 0.0
chip-tool debug (read only) 10141773 10144685 2912 0.0
(read/write) 609544 609544 0 0.0
.bss 24352 24352 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 577808 577808 0 0.0
.dynamic 624 624 0 0.0
.got 5008 5008 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509301 509333 32 0.0
.text 8226741 8229621 2880 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9885012 2400 0.0
(read/write) 674225 674225 0 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 613208 613208 0 0.0
.dynamic 528 528 0 0.0
.got 13416 13416 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472324 472372 48 0.0
.text 7873860 7876212 2352 0.0
lighting-app debug+rpc (read only) 2520433 2520433 0 0.0
(read/write) 163448 163448 0 0.0
.bss 83616 83616 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 71896 71896 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 210632 210632 0 0.0
.text 2140098 2140098 0 0.0
lock-app debug (read only) 2459113 2459113 0 0.0
(read/write) 158096 158096 0 0.0
.bss 82016 82016 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 68568 68568 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 224328 224328 0 0.0
.text 2070482 2070482 0 0.0
ota-provider-app debug (read only) 2296993 2296993 0 0.0
(read/write) 152232 152232 0 0.0
.bss 81696 81696 0 0.0
.data 1912 1912 0 0.0
.data.rel.ro 62840 62840 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 200504 200504 0 0.0
.text 1934338 1934338 0 0.0
ota-requestor-app debug (read only) 2412705 2412705 0 0.0
(read/write) 158976 158976 0 0.0
.bss 84000 84000 0 0.0
.data 2200 2200 0 0.0
.data.rel.ro 66936 66936 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 204192 204192 0 0.0
.text 2038130 2038130 0 0.0
shell debug (read only) 2604865 2604865 0 0.0
(read/write) 219288 219288 0 0.0
.bss 134504 134504 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 77808 77808 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 230290 230290 0 0.0
.text 2214818 2214818 0 0.0
thermostat-no-ble arm64 (read only) 2571580 2571580 0 0.0
(read/write) 192193 192193 0 0.0
.bss 99489 99489 0 0.0
.data 1688 1688 0 0.0
.data.rel.ro 82928 82928 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 163340 163340 0 0.0
.text 2169120 2169120 0 0.0
tv-app debug (read only) 3068849 3071761 2912 0.1
(read/write) 289352 289352 0 0.0
.bss 199240 199240 0 0.0
.data 4656 4656 0 0.0
.data.rel.ro 79016 79016 0 0.0
.dynamic 608 608 0 0.0
.got 4840 4840 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 246176 246208 32 0.0
.text 2635810 2638690 2880 0.1
tv-casting-app debug (read only) 5534513 5534513 0 0.0
(read/write) 195664 195664 0 0.0
.bss 84424 84424 0 0.0
.data 2448 2448 0 0.0
.data.rel.ro 102576 102576 0 0.0
.dynamic 608 608 0 0.0
.got 4712 4712 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 340137 340137 0 0.0
.text 4918146 4918146 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2438104 2438104 0 0.0
.bss 208204 208204 0 0.0
.data 5864 5864 0 0.0
.text 1400748 1400748 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1198747 1198747 0 0.0
bss 141598 141598 0 0.0
rodata 155676 155676 0 0.0
text 822552 822552 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1146703 1146703 0 0.0
bss 140850 140850 0 0.0
rodata 132200 132200 0 0.0
text 794772 794772 0 0.0
p6 all-clusters-app default (read/write) 2553928 2553928 0 0.0
.bss 143384 143384 0 0.0
.data 2776 2776 0 0.0
.text 1512192 1512192 0 0.0
all-clusters-minimal-app default (read/write) 2499776 2499776 0 0.0
.bss 142664 142664 0 0.0
.data 2776 2776 0 0.0
.text 1458040 1458040 0 0.0
light-app default (read/write) 2430520 2430520 0 0.0
.bss 134744 134744 0 0.0
.data 2592 2592 0 0.0
.text 1388784 1388784 0 0.0
lock-app default (read/write) 2451216 2451216 0 0.0
.bss 134568 134568 0 0.0
.data 2600 2600 0 0.0
.text 1409480 1409480 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 789088 789088 0 0.0
bss 69892 69892 0 0.0
noinit 40416 40416 0 0.0
text 559678 559676 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 808800 808792 -8 -0.0
bss 70140 70140 0 0.0
noinit 40416 40416 0 0.0
text 576138 576136 -2 -0.0

@mspang mspang force-pushed the for-chip/factory-shutdown branch 2 times, most recently from 56d3d04 to dd05fae Compare June 21, 2022 01:17
@github-actions
Copy link

github-actions bot commented Jun 21, 2022

PR #19022: Size comparison from 2ac3ee7 to dd05fae

Increases (7 builds for cc13x2_26x2, linux, telink)
platform target config section 2ac3ee7 dd05fae change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 648055 648063 8 0.0
.text 557328 557336 8 0.0
shell LP_CC2652R7 (read/write) 157364 157372 8 0.0
linux chip-tool debug (read only) 10141773 10144925 3152 0.0
.rodata 509301 509365 64 0.0
.text 8226741 8229829 3088 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9885316 2704 0.0
.rodata 472324 472404 80 0.0
.text 7873860 7876484 2624 0.0
tv-app debug (read only) 3068849 3072033 3184 0.1
.rodata 246176 246272 96 0.0
.text 2635810 2638898 3088 0.1
telink light-switch-app tlsr9518adk80d text 559674 559678 4 0.0
lighting-app tlsr9518adk80d text 576134 576136 2 0.0
Decreases (1 build for cc13x2_26x2)
platform target config section 2ac3ee7 dd05fae change % change
cc13x2_26x2 shell LP_CC2652R7 (read only) 688994 688986 -8 -0.0
.text 579024 579016 -8 -0.0
Full report (34 builds for cc13x2_26x2, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2ac3ee7 dd05fae change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 659567 659567 0 0.0
(read/write) 191296 191296 0 0.0
.bss 73756 73756 0 0.0
.data 3356 3356 0 0.0
.rodata 87087 87087 0 0.0
.text 572168 572168 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 648055 648063 8 0.0
(read/write) 157316 157316 0 0.0
.bss 73044 73044 0 0.0
.data 3356 3356 0 0.0
.rodata 90407 90407 0 0.0
.text 557328 557336 8 0.0
lock-ftd LP_CC2652R7 (read only) 690531 690531 0 0.0
(read/write) 150444 150444 0 0.0
.bss 70756 70756 0 0.0
.data 3280 3280 0 0.0
.rodata 99163 99163 0 0.0
.text 590884 590884 0 0.0
lock-mtd LP_CC2652R7 (read only) 639931 639931 0 0.0
(read/write) 143888 143888 0 0.0
.bss 66492 66492 0 0.0
.data 3280 3280 0 0.0
.rodata 99043 99043 0 0.0
.text 540396 540396 0 0.0
pump-app LP_CC2652R7 (read only) 671467 671467 0 0.0
(read/write) 170396 170396 0 0.0
.bss 70876 70876 0 0.0
.data 3280 3280 0 0.0
.rodata 87259 87259 0 0.0
.text 583724 583724 0 0.0
pump-controller-app LP_CC2652R7 (read only) 657359 657359 0 0.0
(read/write) 184616 184616 0 0.0
.bss 70988 70988 0 0.0
.data 3276 3276 0 0.0
.rodata 83103 83103 0 0.0
.text 573776 573776 0 0.0
shell LP_CC2652R7 (read only) 688994 688986 -8 -0.0
(read/write) 157364 157372 8 0.0
.bss 76052 76052 0 0.0
.data 3360 3360 0 0.0
.rodata 109658 109658 0 0.0
.text 579024 579016 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 612766 612766 0 0.0
.app_xip_area 469432 469432 0 0.0
.bss 86288 86288 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 610122 610122 0 0.0
.app_xip_area 466612 466612 0 0.0
.bss 86464 86464 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 616130 616130 0 0.0
.app_xip_area 473684 473684 0 0.0
.bss 85456 85456 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
k32w light k32w061+release (read/write) 658940 658940 0 0.0
.bss 68756 68756 0 0.0
.data 1992 1992 0 0.0
.text 582392 582392 0 0.0
lock k32w061+release (read/write) 720916 720916 0 0.0
.bss 69196 69196 0 0.0
.data 2000 2000 0 0.0
.text 643920 643920 0 0.0
linux all-clusters-app debug (read only) 2931385 2931385 0 0.0
(read/write) 188656 188656 0 0.0
.bss 95744 95744 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84664 84664 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 260029 260029 0 0.0
.text 2494914 2494914 0 0.0
all-clusters-minimal-app debug (read only) 2785097 2785097 0 0.0
(read/write) 180560 180560 0 0.0
.bss 95072 95072 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77304 77304 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 261565 261565 0 0.0
.text 2349266 2349266 0 0.0
bridge-app debug+rpc (read only) 2287665 2287665 0 0.0
(read/write) 159424 159424 0 0.0
.bss 83136 83136 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 66728 66728 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 194848 194848 0 0.0
.text 1931730 1931730 0 0.0
chip-tool debug (read only) 10141773 10144925 3152 0.0
(read/write) 609544 609544 0 0.0
.bss 24352 24352 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 577808 577808 0 0.0
.dynamic 624 624 0 0.0
.got 5008 5008 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509301 509365 64 0.0
.text 8226741 8229829 3088 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9882612 9885316 2704 0.0
(read/write) 674225 674225 0 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 613208 613208 0 0.0
.dynamic 528 528 0 0.0
.got 13416 13416 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472324 472404 80 0.0
.text 7873860 7876484 2624 0.0
lighting-app debug+rpc (read only) 2520433 2520433 0 0.0
(read/write) 163448 163448 0 0.0
.bss 83616 83616 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 71896 71896 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 210632 210632 0 0.0
.text 2140098 2140098 0 0.0
lock-app debug (read only) 2459113 2459113 0 0.0
(read/write) 158096 158096 0 0.0
.bss 82016 82016 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 68568 68568 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 224328 224328 0 0.0
.text 2070482 2070482 0 0.0
ota-provider-app debug (read only) 2296993 2296993 0 0.0
(read/write) 152232 152232 0 0.0
.bss 81696 81696 0 0.0
.data 1912 1912 0 0.0
.data.rel.ro 62840 62840 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 200504 200504 0 0.0
.text 1934338 1934338 0 0.0
ota-requestor-app debug (read only) 2412705 2412705 0 0.0
(read/write) 158976 158976 0 0.0
.bss 84000 84000 0 0.0
.data 2200 2200 0 0.0
.data.rel.ro 66936 66936 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 204192 204192 0 0.0
.text 2038130 2038130 0 0.0
shell debug (read only) 2604865 2604865 0 0.0
(read/write) 219288 219288 0 0.0
.bss 134504 134504 0 0.0
.data 1232 1232 0 0.0
.data.rel.ro 77808 77808 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 230290 230290 0 0.0
.text 2214818 2214818 0 0.0
thermostat-no-ble arm64 (read only) 2571580 2571580 0 0.0
(read/write) 192193 192193 0 0.0
.bss 99489 99489 0 0.0
.data 1688 1688 0 0.0
.data.rel.ro 82928 82928 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 163340 163340 0 0.0
.text 2169120 2169120 0 0.0
tv-app debug (read only) 3068849 3072033 3184 0.1
(read/write) 289352 289352 0 0.0
.bss 199240 199240 0 0.0
.data 4656 4656 0 0.0
.data.rel.ro 79016 79016 0 0.0
.dynamic 608 608 0 0.0
.got 4840 4840 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 246176 246272 96 0.0
.text 2635810 2638898 3088 0.1
tv-casting-app debug (read only) 5534513 5534513 0 0.0
(read/write) 195664 195664 0 0.0
.bss 84424 84424 0 0.0
.data 2448 2448 0 0.0
.data.rel.ro 102576 102576 0 0.0
.dynamic 608 608 0 0.0
.got 4712 4712 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 340137 340137 0 0.0
.text 4918146 4918146 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2438104 2438104 0 0.0
.bss 208204 208204 0 0.0
.data 5864 5864 0 0.0
.text 1400748 1400748 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1198747 1198747 0 0.0
bss 141598 141598 0 0.0
rodata 155676 155676 0 0.0
text 822552 822552 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1146703 1146703 0 0.0
bss 140850 140850 0 0.0
rodata 132200 132200 0 0.0
text 794772 794772 0 0.0
p6 all-clusters-app default (read/write) 2553928 2553928 0 0.0
.bss 143384 143384 0 0.0
.data 2776 2776 0 0.0
.text 1512192 1512192 0 0.0
all-clusters-minimal-app default (read/write) 2499776 2499776 0 0.0
.bss 142664 142664 0 0.0
.data 2776 2776 0 0.0
.text 1458040 1458040 0 0.0
light-app default (read/write) 2430520 2430520 0 0.0
.bss 134744 134744 0 0.0
.data 2592 2592 0 0.0
.text 1388784 1388784 0 0.0
lock-app default (read/write) 2451216 2451216 0 0.0
.bss 134568 134568 0 0.0
.data 2600 2600 0 0.0
.text 1409480 1409480 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 789088 789088 0 0.0
bss 69892 69892 0 0.0
noinit 40416 40416 0 0.0
text 559674 559678 4 0.0
lighting-app tlsr9518adk80d (read/write) 808792 808792 0 0.0
bss 70140 70140 0 0.0
noinit 40416 40416 0 0.0
text 576134 576136 2 0.0

@bzbarsky-apple
Copy link
Contributor

What worries me more is that testControllerCertChainFabricMismatchIntermediate also hits:

[1655780033479] [36907:150376] CHIP: [SPT] VerifyOrDie failure at ../../../../../../../../../../../work/connectedhomeip/connectedhomeip/src/controller/CHIPDeviceControllerSystemState.h:112: mWasShutdown

but that test does nothing particularly complicated: it brings up a factory, brings up a controller, shuts down the controller, shuts down the factory. I would expect that to Retain and Release things correctly...

@mspang
Copy link
Contributor Author

mspang commented Jun 21, 2022

What worries me more is that testControllerCertChainFabricMismatchIntermediate also hits:

[1655780033479] [36907:150376] CHIP: [SPT] VerifyOrDie failure at ../../../../../../../../../../../work/connectedhomeip/connectedhomeip/src/controller/CHIPDeviceControllerSystemState.h:112: mWasShutdown

but that test does nothing particularly complicated: it brings up a factory, brings up a controller, shuts down the controller, shuts down the factory. I would expect that to Retain and Release things correctly...

Trying to get hold of a Mac so I can track that down.

Let me make some broader assertions about this

  • Currently we have a broken situation where we mixing refcounting and 'strict ownership' of the system state. The factory always destroys the state, and the system state also partially destroys itself, leading to double destruction.
  1. I don't agree with a refcounting design that has a 'magic shutdown' at refcount ==1 separately from freeing the storage at refcount == 0.
  2. I don't think that refcounting is necessary here in the first place. The application can call Factory::Shutdown() when it wants to clean up the factory state, and refrain from calling it when it does not. The refcounting is already causing other issues, e.g. python gained a hacky 'retain' call to bump the refcount and never calls 'release'.

The reason this patch has been evolved back towards calling Delete from the factory instead of when refcount drops to zero is that I think the refcounting should be removed entirely, and this de-emphasizes it (keeping only the 'magic shutdown' in an attempt to preserve the semantics and fix the most critical issues while we find all the places that need to have an explicit shutdown).

@mspang
Copy link
Contributor Author

mspang commented Jun 21, 2022

but that test does nothing particularly complicated: it brings up a factory, brings up a controller, shuts down the controller, shuts down the factory. I would expect that to Retain and Release things correctly...

One last assertion is that I think it is not actually useful for the refcount to be able to extend the lifetime of the system state past the factory itself. Which is why I believe descoping the refcount to only 'magic shutdown' and not lifetime should be OK (the other reason being that we always deleted the state here, anyway).

@bzbarsky-apple
Copy link
Contributor

it brings up a factory, brings up a controller, shuts down the controller, shuts down the factory

I misread the test. It brings up a factory, fails to bring up a controller because it fails some pre-bringup validation, shuts down the factory. So it is in fact hitting the "factory being shut down without ever bringing up a controller" case.

@bzbarsky-apple
Copy link
Contributor

Currently we have a broken situation where we mixing refcounting and 'strict ownership' of the system state. The factory always destroys the state, and the system state also partially destroys itself, leading to double destruction.

I agree.

I don't agree with a refcounting design that has a 'magic shutdown' at refcount ==1 separately from freeing the storage at refcount == 0.

That seems sane.

The important part is that we want to shut down the state when the number of live controllers transitions back to 0 after becoming nonzero.

Even better would be if we never even created the state's various members until the first controller is brought up, and then shut it down when the last controller shuts down.

One last assertion is that I think it is not actually useful for the refcount to be able to extend the lifetime of the system state past the factory itself.

I agree.

It looks like #19697 got merged in a few hours ago, which was also fixing some of the things around this stuff. In particular, that PR just calls Shutdown in the destructor if it has not been called yet, precisely because of the issues this PR was running into.... The Darwin tests were hitting that case and leaking in it, but not trying to do anything that would fail as a result of the leaks, which is why it was not getting caught. :(

@mspang
Copy link
Contributor Author

mspang commented Jun 21, 2022

Currently we have a broken situation where we mixing refcounting and 'strict ownership' of the system state. The factory always destroys the state, and the system state also partially destroys itself, leading to double destruction.

I agree.

I don't agree with a refcounting design that has a 'magic shutdown' at refcount ==1 separately from freeing the storage at refcount == 0.

That seems sane.

The important part is that we want to shut down the state when the number of live controllers transitions back to 0 after becoming nonzero.

That still feels fairly magic to me; I would prefer that we leave deciding when to init the factory and shut it down to a higher layer:

  • it can still implement the "init on first controller" and "shutdown on no remaining controller" policy if it wants.
  • shutdown can have a precondition that there are no active controllers

I don't know that the system state and factory need to even be different objects.

Changing the API is probably out of scope for this bugfix, but would appreciate your thoughts while I have your attention. For our purposes, direct control over the lifecycle seems best.

Even better would be if we never even created the state's various members until the first controller is brought up, and then shut it down when the last controller shuts down.

One last assertion is that I think it is not actually useful for the refcount to be able to extend the lifetime of the system state past the factory itself.

I agree.

It looks like #19697 got merged in a few hours ago, which was also fixing some of the things around this stuff. In particular, that PR just calls Shutdown in the destructor if it has not been called yet, precisely because of the issues this PR was running into.... The Darwin tests were hitting that case and leaking in it, but not trying to do anything that would fail as a result of the leaks, which is why it was not getting caught. :(

That makes sense. A prior version of this PR actually had the shutdown-from-dtor but then I thought that non-idempotent shutdown was breaking the tests (thus was before the mWasShutdown was added to force idempotency).

This version had a VerifyOrDie instead of force-shutdown to see if this was happening.

The important part is that we want to shut down the state when the number of live controllers transitions back to 0 after becoming nonzero.

@mspang mspang force-pushed the for-chip/factory-shutdown branch from dd05fae to 1fb1536 Compare June 21, 2022 18:37
@github-actions
Copy link

github-actions bot commented Jun 21, 2022

PR #19022: Size comparison from 676646d to 1fb1536

Increases (3 builds for linux, telink)
platform target config section 676646d 1fb1536 change % change
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9886988 9889340 2352 0.0
.rodata 473180 473244 64 0.0
.text 7877380 7879668 2288 0.0
telink light-switch-app tlsr9518adk80d (read/write) 790472 790480 8 0.0
text 560390 560394 4 0.0
lighting-app tlsr9518adk80d text 576850 576852 2 0.0
Decreases (2 builds for cc13x2_26x2, esp32)
platform target config section 676646d 1fb1536 change % change
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 640927 640919 -8 -0.0
.text 541028 541020 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1013700 1013698 -2 -0.0
.flash.text 1013700 1013698 -2 -0.0
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 676646d 1fb1536 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 660135 660135 0 0.0
(read/write) 190736 190736 0 0.0
.bss 73764 73764 0 0.0
.data 3356 3356 0 0.0
.rodata 87239 87239 0 0.0
.text 572584 572584 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 648947 648947 0 0.0
(read/write) 157324 157324 0 0.0
.bss 73052 73052 0 0.0
.data 3356 3356 0 0.0
.rodata 90771 90771 0 0.0
.text 557856 557856 0 0.0
lock-ftd LP_CC2652R7 (read only) 691511 691511 0 0.0
(read/write) 149472 149472 0 0.0
.bss 70764 70764 0 0.0
.data 3280 3280 0 0.0
.rodata 99527 99527 0 0.0
.text 591500 591500 0 0.0
lock-mtd LP_CC2652R7 (read only) 640927 640919 -8 -0.0
(read/write) 143896 143896 0 0.0
.bss 66500 66500 0 0.0
.data 3280 3280 0 0.0
.rodata 99407 99407 0 0.0
.text 541028 541020 -8 -0.0
pump-app LP_CC2652R7 (read only) 672799 672799 0 0.0
(read/write) 169072 169072 0 0.0
.bss 70884 70884 0 0.0
.data 3280 3280 0 0.0
.rodata 87903 87903 0 0.0
.text 584412 584412 0 0.0
pump-controller-app LP_CC2652R7 (read only) 658675 658675 0 0.0
(read/write) 183308 183308 0 0.0
.bss 70996 70996 0 0.0
.data 3276 3276 0 0.0
.rodata 83747 83747 0 0.0
.text 574448 574448 0 0.0
shell LP_CC2652R7 (read only) 689870 689870 0 0.0
(read/write) 156496 156496 0 0.0
.bss 76060 76060 0 0.0
.data 3360 3360 0 0.0
.rodata 110022 110022 0 0.0
.text 579536 579536 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 613246 613246 0 0.0
.app_xip_area 469896 469896 0 0.0
.bss 86304 86304 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 610602 610602 0 0.0
.app_xip_area 467076 467076 0 0.0
.bss 86480 86480 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 617134 617134 0 0.0
.app_xip_area 474672 474672 0 0.0
.bss 85472 85472 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 925456 925456 0 0.0
(read/write) 132424 132424 0 0.0
.bss 130344 130344 0 0.0
.data 2080 2080 0 0.0
.text 925448 925448 0 0.0
BRD4161A+rpc (read only) 961160 961160 0 0.0
(read/write) 149304 149304 0 0.0
.bss 147016 147016 0 0.0
.data 2284 2284 0 0.0
.text 961152 961152 0 0.0
BRD4161A+rs911x (read only) 800804 800804 0 0.0
(read/write) 128700 128700 0 0.0
.bss 126612 126612 0 0.0
.data 2088 2088 0 0.0
.text 800796 800796 0 0.0
lock-app BRD4161A+wf200 (read only) 967120 967120 0 0.0
(read/write) 129076 129076 0 0.0
.bss 126988 126988 0 0.0
.data 2088 2088 0 0.0
.text 967112 967112 0 0.0
window-app BRD4161A (read only) 910600 910600 0 0.0
(read/write) 132528 132528 0 0.0
.bss 130416 130416 0 0.0
.data 2108 2108 0 0.0
.text 910592 910592 0 0.0
esp32 all-clusters-app c3devkit (read only) 1013700 1013698 -2 -0.0
(read/write) 1483554 1483554 0 0.0
.dram0.bss 69400 69400 0 0.0
.dram0.data 14632 14632 0 0.0
.flash.rodata 214080 214080 0 0.0
.flash.text 1013700 1013698 -2 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1068163 1068163 0 0.0
(read/write) 485640 485640 0 0.0
.dram0.bss 74920 74920 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 244580 244580 0 0.0
.flash.text 1062779 1062779 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 659604 659604 0 0.0
.bss 68764 68764 0 0.0
.data 1992 1992 0 0.0
.text 583048 583048 0 0.0
lock k32w061+release (read/write) 722132 722132 0 0.0
.bss 69204 69204 0 0.0
.data 2000 2000 0 0.0
.text 645128 645128 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9886988 9889340 2352 0.0
(read/write) 674225 674225 0 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 613208 613208 0 0.0
.dynamic 528 528 0 0.0
.got 13416 13416 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 473180 473244 64 0.0
.text 7877380 7879668 2288 0.0
thermostat-no-ble arm64 (read only) 2575988 2575988 0 0.0
(read/write) 180577 180577 0 0.0
.bss 87889 87889 0 0.0
.data 1688 1688 0 0.0
.data.rel.ro 82928 82928 0 0.0
.dynamic 528 528 0 0.0
.got 5056 5056 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 164196 164196 0 0.0
.text 2172720 2172720 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2439048 2439048 0 0.0
.bss 208212 208212 0 0.0
.data 5864 5864 0 0.0
.text 1401692 1401692 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1199927 1199927 0 0.0
bss 141606 141606 0 0.0
rodata 156312 156312 0 0.0
text 823096 823096 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1147887 1147887 0 0.0
bss 140858 140858 0 0.0
rodata 132840 132840 0 0.0
text 795316 795316 0 0.0
p6 all-clusters-app default (read/write) 2555392 2555392 0 0.0
.bss 143392 143392 0 0.0
.data 2776 2776 0 0.0
.text 1513656 1513656 0 0.0
all-clusters-minimal-app default (read/write) 2501240 2501240 0 0.0
.bss 142672 142672 0 0.0
.data 2776 2776 0 0.0
.text 1459504 1459504 0 0.0
light-app default (read/write) 2432000 2432000 0 0.0
.bss 134752 134752 0 0.0
.data 2592 2592 0 0.0
.text 1390264 1390264 0 0.0
lock-app default (read/write) 2452688 2452688 0 0.0
.bss 134576 134576 0 0.0
.data 2600 2600 0 0.0
.text 1410952 1410952 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 790472 790480 8 0.0
bss 69900 69900 0 0.0
noinit 40416 40416 0 0.0
text 560390 560394 4 0.0
lighting-app tlsr9518adk80d (read/write) 810184 810184 0 0.0
bss 70148 70148 0 0.0
noinit 40416 40416 0 0.0
text 576850 576852 2 0.0

@bzbarsky-apple
Copy link
Contributor

Changing the API is probably out of scope for this bugfix, but would appreciate your thoughts

@mspang So I think the intent is that the factory is basically a singleton. It can be inited and shut down, but there's just one around.

The factory keeps track of two sets of objects:

  1. Those provided to its init. These were created by the factory's consumer. The factory just holds on to pointers to these things until it's shut down.
  2. Those the factory creates itself, as part of bringing up the Matter stack and actually listening for incoming messages, etc.

The system state is just a convenient way to keep track of these various objects, both for consumption from inside controllers and for cleanup purposes.

We could move all the logic of when the Matter stack should be listening for messages out to consumers. Then the factory would basically have the following API:

  1. Init with the externally-provided objects.
  2. Bring up the actual Matter stack, create the objects that needs.
  3. Create controller; will fail if Initial Outline #1 and Run clang-tidy locally #2 have not happened.
  4. Shut down controller (possibly via an API on the controller).
  5. Shut down the Matter stack. Should assert that all controllers are shut down, or fail if they are not, or shut down any outstanding ones.
  6. Shut down the factory, to allow later re-init with a different set of externally-provided objects as needed.

Item 1 could be combined with item 2 and item 5 with item 6, if we want to insist that consumers should just keep track of the externally-provided objects themselves.....

Right now a factory basically has item 1, item 3, item 4, and item 6 as explicit API. Item 2 happens (not very consistently) when item 1 happens or when the controller count increases from 0 after we've hit item 5. Item 5 happens when the controller count goes to 0 or item 6 happens, whichever comes first. I agree this is a pretty annoying API. In particular, the asymmetry between "I inited the factory but have not created the first controller" (stack is running) and "I inited the factory, created a controller, then shut it down" (stack is not running) is really unfortunate.

I am very interested, in general, in saner API here...

@mspang mspang force-pushed the for-chip/factory-shutdown branch from 1fb1536 to 7553dca Compare June 22, 2022 13:26
@mspang
Copy link
Contributor Author

mspang commented Jun 22, 2022

I am very interested, in general, in saner API here...

Definitely. I think we should follow this bug fix up with a more thorough cleanup. The asymmetry is just one of the warts with this, the other is that there is very little ability to actually inject many of these dependencies.

@github-actions
Copy link

github-actions bot commented Jun 22, 2022

PR #19022: Size comparison from d1a4bb7 to 7553dca

Increases (2 builds for linux, telink)
platform target config section d1a4bb7 7553dca change % change
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9925180 9927548 2368 0.0
.rodata 473916 473980 64 0.0
.text 7910292 7912596 2304 0.0
telink light-switch-app tlsr9518adk80d text 561060 561062 2 0.0
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section d1a4bb7 7553dca change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 660439 660439 0 0.0
(read/write) 191168 191168 0 0.0
.bss 74500 74500 0 0.0
.data 3356 3356 0 0.0
.rodata 86975 86975 0 0.0
.text 573152 573152 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 649251 649251 0 0.0
(read/write) 158060 158060 0 0.0
.bss 73788 73788 0 0.0
.data 3356 3356 0 0.0
.rodata 90507 90507 0 0.0
.text 558424 558424 0 0.0
lock-ftd LP_CC2652R7 (read only) 691999 691999 0 0.0
(read/write) 149720 149720 0 0.0
.bss 71500 71500 0 0.0
.data 3280 3280 0 0.0
.rodata 99351 99351 0 0.0
.text 592164 592164 0 0.0
lock-mtd LP_CC2652R7 (read only) 641415 641415 0 0.0
(read/write) 144632 144632 0 0.0
.bss 67236 67236 0 0.0
.data 3280 3280 0 0.0
.rodata 99239 99239 0 0.0
.text 541684 541684 0 0.0
pump-app LP_CC2652R7 (read only) 673231 673231 0 0.0
(read/write) 169384 169384 0 0.0
.bss 71628 71628 0 0.0
.data 3280 3280 0 0.0
.rodata 87663 87663 0 0.0
.text 585084 585084 0 0.0
pump-controller-app LP_CC2652R7 (read only) 659123 659123 0 0.0
(read/write) 183604 183604 0 0.0
.bss 71740 71740 0 0.0
.data 3276 3276 0 0.0
.rodata 83507 83507 0 0.0
.text 575136 575136 0 0.0
shell LP_CC2652R7 (read only) 690198 690198 0 0.0
(read/write) 156912 156912 0 0.0
.bss 76804 76804 0 0.0
.data 3360 3360 0 0.0
.rodata 109758 109758 0 0.0
.text 580128 580128 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 591730 591730 0 0.0
.app_xip_area 462628 462628 0 0.0
.bss 72064 72064 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589106 589106 0 0.0
.app_xip_area 459828 459828 0 0.0
.bss 72240 72240 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 594250 594250 0 0.0
.app_xip_area 466020 466020 0 0.0
.bss 71248 71248 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 926072 926072 0 0.0
(read/write) 133664 133664 0 0.0
.bss 131584 131584 0 0.0
.data 2080 2080 0 0.0
.text 926064 926064 0 0.0
BRD4161A+rpc (read only) 963216 963216 0 0.0
(read/write) 150552 150552 0 0.0
.bss 148264 148264 0 0.0
.data 2284 2284 0 0.0
.text 963208 963208 0 0.0
BRD4161A+rs911x (read only) 802580 802580 0 0.0
(read/write) 140316 140316 0 0.0
.bss 138228 138228 0 0.0
.data 2088 2088 0 0.0
.text 802572 802572 0 0.0
lock-app BRD4161A+wf200 (read only) 968288 968288 0 0.0
(read/write) 140692 140692 0 0.0
.bss 138604 138604 0 0.0
.data 2088 2088 0 0.0
.text 968280 968280 0 0.0
window-app BRD4161A (read only) 911240 911240 0 0.0
(read/write) 133768 133768 0 0.0
.bss 131656 131656 0 0.0
.data 2108 2108 0 0.0
.text 911232 911232 0 0.0
esp32 all-clusters-app c3devkit (read only) 1014134 1014134 0 0.0
(read/write) 1484770 1484770 0 0.0
.dram0.bss 70640 70640 0 0.0
.dram0.data 14632 14632 0 0.0
.flash.rodata 214064 214064 0 0.0
.flash.text 1014134 1014134 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1068459 1068459 0 0.0
(read/write) 486856 486856 0 0.0
.dram0.bss 76152 76152 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 244564 244564 0 0.0
.flash.text 1063075 1063075 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 661524 661524 0 0.0
.bss 69756 69756 0 0.0
.data 1992 1992 0 0.0
.text 583976 583976 0 0.0
lock k32w061+release (read/write) 723452 723452 0 0.0
.bss 70204 70204 0 0.0
.data 2000 2000 0 0.0
.text 645448 645448 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9925180 9927548 2368 0.0
(read/write) 676161 676161 0 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 615080 615080 0 0.0
.dynamic 528 528 0 0.0
.got 13472 13472 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 473916 473980 64 0.0
.text 7910292 7912596 2304 0.0
thermostat-no-ble arm64 (read only) 2578364 2578364 0 0.0
(read/write) 180609 180609 0 0.0
.bss 87905 87905 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 82896 82896 0 0.0
.dynamic 528 528 0 0.0
.got 5080 5080 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 164540 164540 0 0.0
.text 2174752 2174752 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2439432 2439432 0 0.0
.bss 212180 212180 0 0.0
.data 5864 5864 0 0.0
.text 1402076 1402076 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1201883 1201883 0 0.0
bss 142862 142862 0 0.0
rodata 156108 156108 0 0.0
text 823984 823984 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1149639 1149639 0 0.0
bss 142098 142098 0 0.0
rodata 132592 132592 0 0.0
text 796032 796032 0 0.0
p6 all-clusters-app default (read/write) 2555776 2555776 0 0.0
.bss 147360 147360 0 0.0
.data 2776 2776 0 0.0
.text 1514040 1514040 0 0.0
all-clusters-minimal-app default (read/write) 2501624 2501624 0 0.0
.bss 146640 146640 0 0.0
.data 2776 2776 0 0.0
.text 1459888 1459888 0 0.0
light-app default (read/write) 2432384 2432384 0 0.0
.bss 138720 138720 0 0.0
.data 2592 2592 0 0.0
.text 1390648 1390648 0 0.0
lock-app default (read/write) 2453096 2453096 0 0.0
.bss 138544 138544 0 0.0
.data 2600 2600 0 0.0
.text 1411360 1411360 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 792080 792080 0 0.0
bss 71140 71140 0 0.0
noinit 40416 40416 0 0.0
text 561060 561062 2 0.0
lighting-app tlsr9518adk80d (read/write) 811784 811784 0 0.0
bss 71388 71388 0 0.0
noinit 40416 40416 0 0.0
text 577520 577520 0 0.0

- SessionResumptionStorage is leaked
  - Ownership is passed using raw pointers. This is bad form,
    and there are many more instances of it (not fixed here).

- DeviceControllerSystemState destructor is called twice
  (once by Release(), then again by Delete())
@mspang mspang force-pushed the for-chip/factory-shutdown branch from 7553dca to d2662fc Compare June 22, 2022 19:02
@github-actions
Copy link

github-actions bot commented Jun 22, 2022

PR #19022: Size comparison from 5809552 to d2662fc

Increases (6 builds for cc13x2_26x2, k32w, linux, nrfconnect)
platform target config section 5809552 d2662fc change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 649227 649235 8 0.0
.text 558400 558408 8 0.0
lock-ftd LP_CC2652R7 (read/write) 149736 149744 8 0.0
shell LP_CC2652R7 (read/write) 156928 156936 8 0.0
k32w lock k32w061+release (read/write) 723436 723452 16 0.0
.text 645432 645448 16 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9925532 9927884 2352 0.0
.rodata 473932 473980 48 0.0
.text 7910628 7912932 2304 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1202275 1202291 16 0.0
text 824228 824232 4 0.0
Decreases (6 builds for cc13x2_26x2, cyw30739, k32w, nrfconnect, telink)
platform target config section 5809552 d2662fc change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 691983 691975 -8 -0.0
.text 592148 592140 -8 -0.0
shell LP_CC2652R7 (read only) 690182 690174 -8 -0.0
.text 580112 580104 -8 -0.0
cyw30739 lock cyw930739m2evb_01 (read/write) 589106 589098 -8 -0.0
.app_xip_area 459828 459820 -8 -0.0
k32w light k32w061+release (read/write) 661524 661508 -16 -0.0
.text 583976 583960 -16 -0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1149639 1149623 -16 -0.0
text 796024 796020 -4 -0.0
telink lighting-app tlsr9518adk80d (read/write) 811792 811784 -8 -0.0
text 577522 577520 -2 -0.0
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 5809552 d2662fc change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 660423 660423 0 0.0
(read/write) 191184 191184 0 0.0
.bss 74500 74500 0 0.0
.data 3356 3356 0 0.0
.rodata 86975 86975 0 0.0
.text 573136 573136 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 649227 649235 8 0.0
(read/write) 158060 158060 0 0.0
.bss 73788 73788 0 0.0
.data 3356 3356 0 0.0
.rodata 90507 90507 0 0.0
.text 558400 558408 8 0.0
lock-ftd LP_CC2652R7 (read only) 691983 691975 -8 -0.0
(read/write) 149736 149744 8 0.0
.bss 71500 71500 0 0.0
.data 3280 3280 0 0.0
.rodata 99351 99351 0 0.0
.text 592148 592140 -8 -0.0
lock-mtd LP_CC2652R7 (read only) 641399 641399 0 0.0
(read/write) 144632 144632 0 0.0
.bss 67236 67236 0 0.0
.data 3280 3280 0 0.0
.rodata 99239 99239 0 0.0
.text 541668 541668 0 0.0
pump-app LP_CC2652R7 (read only) 673223 673223 0 0.0
(read/write) 169392 169392 0 0.0
.bss 71628 71628 0 0.0
.data 3280 3280 0 0.0
.rodata 87663 87663 0 0.0
.text 585076 585076 0 0.0
pump-controller-app LP_CC2652R7 (read only) 659115 659115 0 0.0
(read/write) 183612 183612 0 0.0
.bss 71740 71740 0 0.0
.data 3276 3276 0 0.0
.rodata 83507 83507 0 0.0
.text 575128 575128 0 0.0
shell LP_CC2652R7 (read only) 690182 690174 -8 -0.0
(read/write) 156928 156936 8 0.0
.bss 76804 76804 0 0.0
.data 3360 3360 0 0.0
.rodata 109758 109758 0 0.0
.text 580112 580104 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 591722 591722 0 0.0
.app_xip_area 462620 462620 0 0.0
.bss 72064 72064 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589106 589098 -8 -0.0
.app_xip_area 459828 459820 -8 -0.0
.bss 72240 72240 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 594250 594250 0 0.0
.app_xip_area 466020 466020 0 0.0
.bss 71248 71248 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 926072 926072 0 0.0
(read/write) 133664 133664 0 0.0
.bss 131584 131584 0 0.0
.data 2080 2080 0 0.0
.text 926064 926064 0 0.0
BRD4161A+rpc (read only) 963216 963216 0 0.0
(read/write) 150552 150552 0 0.0
.bss 148264 148264 0 0.0
.data 2284 2284 0 0.0
.text 963208 963208 0 0.0
BRD4161A+rs911x (read only) 802580 802580 0 0.0
(read/write) 140316 140316 0 0.0
.bss 138228 138228 0 0.0
.data 2088 2088 0 0.0
.text 802572 802572 0 0.0
lock-app BRD4161A+wf200 (read only) 968288 968288 0 0.0
(read/write) 140692 140692 0 0.0
.bss 138604 138604 0 0.0
.data 2088 2088 0 0.0
.text 968280 968280 0 0.0
window-app BRD4161A (read only) 911240 911240 0 0.0
(read/write) 133768 133768 0 0.0
.bss 131656 131656 0 0.0
.data 2108 2108 0 0.0
.text 911232 911232 0 0.0
esp32 all-clusters-app c3devkit (read only) 1014136 1014136 0 0.0
(read/write) 1484770 1484770 0 0.0
.dram0.bss 70640 70640 0 0.0
.dram0.data 14632 14632 0 0.0
.flash.rodata 214064 214064 0 0.0
.flash.text 1014136 1014136 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1068459 1068459 0 0.0
(read/write) 486856 486856 0 0.0
.dram0.bss 76152 76152 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 244564 244564 0 0.0
.flash.text 1063075 1063075 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 661524 661508 -16 -0.0
.bss 69756 69756 0 0.0
.data 1992 1992 0 0.0
.text 583976 583960 -16 -0.0
lock k32w061+release (read/write) 723436 723452 16 0.0
.bss 70204 70204 0 0.0
.data 2000 2000 0 0.0
.text 645432 645448 16 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9925532 9927884 2352 0.0
(read/write) 676161 676161 0 0.0
.bss 42641 42641 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 615080 615080 0 0.0
.dynamic 528 528 0 0.0
.got 13472 13472 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 473932 473980 48 0.0
.text 7910628 7912932 2304 0.0
thermostat-no-ble arm64 (read only) 2578428 2578428 0 0.0
(read/write) 180609 180609 0 0.0
.bss 87905 87905 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 82896 82896 0 0.0
.dynamic 528 528 0 0.0
.got 5080 5080 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 164540 164540 0 0.0
.text 2174816 2174816 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2439432 2439432 0 0.0
.bss 212180 212180 0 0.0
.data 5864 5864 0 0.0
.text 1402076 1402076 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1202275 1202291 16 0.0
bss 142862 142862 0 0.0
rodata 156260 156260 0 0.0
text 824228 824232 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1149639 1149623 -16 -0.0
bss 142098 142098 0 0.0
rodata 132592 132592 0 0.0
text 796024 796020 -4 -0.0
p6 all-clusters-app default (read/write) 2555776 2555776 0 0.0
.bss 147360 147360 0 0.0
.data 2776 2776 0 0.0
.text 1514040 1514040 0 0.0
all-clusters-minimal-app default (read/write) 2501624 2501624 0 0.0
.bss 146640 146640 0 0.0
.data 2776 2776 0 0.0
.text 1459888 1459888 0 0.0
light-app default (read/write) 2432384 2432384 0 0.0
.bss 138720 138720 0 0.0
.data 2592 2592 0 0.0
.text 1390648 1390648 0 0.0
lock-app default (read/write) 2453096 2453096 0 0.0
.bss 138544 138544 0 0.0
.data 2600 2600 0 0.0
.text 1411360 1411360 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 792080 792080 0 0.0
bss 71140 71140 0 0.0
noinit 40416 40416 0 0.0
text 561060 561060 0 0.0
lighting-app tlsr9518adk80d (read/write) 811792 811784 -8 -0.0
bss 71388 71388 0 0.0
noinit 40416 40416 0 0.0
text 577522 577520 -2 -0.0

@woody-apple woody-apple merged commit 20e65bf into project-chip:master Jun 23, 2022
@mspang mspang deleted the for-chip/factory-shutdown branch June 23, 2022 03:46
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.

7 participants