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

Add a helper class for opening commissioning windows. #16474

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

There's a bunch of state involved in this, and trying to hang it all
off the controller leads to too many complications, ranging from the
inability to be opening more than one commissioning window at a time
to crashes.

Fixes #16209

Problem

See above.

Change overview

Adds a helper class for doing the opening of commissioning windows. Uses it in Darwin, python, Android controllers and chip-tool.

Testing

Verified that I can open commissioning windows (basic and enhanced) from chip-tool and commission with the expected codes from the iOS CHIPTool app, and vice versa.

@bzbarsky-apple bzbarsky-apple force-pushed the commissioning-window-opener branch from e86c4b0 to bb6de8d Compare March 19, 2022 06:20
@github-actions
Copy link

github-actions bot commented Mar 19, 2022

PR #16474: Size comparison from ae63451 to bb6de8d

Increases above 0.2%:

platform target config section ae63451 bb6de8d change % change
linux chip-tool debug .init_array 632 640 8 1.3
Increases (2 builds for linux)
platform target config section ae63451 bb6de8d change % change
linux chip-tool debug (read only) 10146085 10153277 7192 0.1
(read/write) 354848 354856 8 0.0
.init_array 632 640 8 1.3
.rodata 518101 518869 768 0.1
.text 8845381 8851781 6400 0.1
chip-tool-ipv6only arm64 (read only) 9769468 9776596 7128 0.1
(read/write) 472689 472721 32 0.0
.data.rel.ro 371824 371848 24 0.0
.got 55328 55336 8 0.0
.rodata 493812 493996 184 0.0
.text 8224292 8231188 6896 0.1
Decreases (1 build for linux)
platform target config section ae63451 bb6de8d change % change
linux tv-app debug (read only) 2677017 2676089 -928 -0.0
(read/write) 247712 247552 -160 -0.1
.bss 164384 164224 -160 -0.1
.rodata 206869 205995 -874 -0.4
.text 2295298 2295250 -48 -0.0
Full report (25 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section ae63451 bb6de8d change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603874 603874 0 0.0
.app_xip_area 510972 510972 0 0.0
.bss 75656 75656 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) 561654 561654 0 0.0
.app_xip_area 470280 470280 0 0.0
.bss 74160 74160 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) 571506 571506 0 0.0
.app_xip_area 470484 470484 0 0.0
.bss 83488 83488 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921992 921992 0 0.0
(read/write) 128760 128760 0 0.0
.bss 126768 126768 0 0.0
.data 1988 1988 0 0.0
.text 921984 921984 0 0.0
BRD4161A+rpc (read only) 950812 950812 0 0.0
(read/write) 144712 144712 0 0.0
.bss 142544 142544 0 0.0
.data 2168 2168 0 0.0
.text 950804 950804 0 0.0
window-app BRD4161A (read only) 852296 852296 0 0.0
(read/write) 126712 126712 0 0.0
.bss 124848 124848 0 0.0
.data 1864 1864 0 0.0
.text 852288 852288 0 0.0
k32w light k32w061+release (read/write) 701104 701104 0 0.0
.bss 77656 77656 0 0.0
.data 1868 1868 0 0.0
.text 615780 615780 0 0.0
lock k32w061+release (read/write) 700964 700964 0 0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 615632 615632 0 0.0
linux all-clusters-app debug (read only) 2476737 2476737 0 0.0
(read/write) 143152 143152 0 0.0
.bss 57312 57312 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78840 78840 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 211557 211557 0 0.0
.text 2101730 2101730 0 0.0
bridge-app debug+rpc (read only) 1752749 1752749 0 0.0
(read/write) 89424 89424 0 0.0
.bss 44456 44456 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 37944 37944 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 144556 144556 0 0.0
.text 1492981 1492981 0 0.0
chip-tool debug (read only) 10146085 10153277 7192 0.1
(read/write) 354848 354856 8 0.0
.bss 22304 22304 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 325408 325408 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 632 640 8 1.3
.rodata 518101 518869 768 0.1
.text 8845381 8851781 6400 0.1
chip-tool-ipv6only arm64 (read only) 9769468 9776596 7128 0.1
(read/write) 472689 472721 32 0.0
.bss 40609 40609 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371824 371848 24 0.0
.dynamic 560 560 0 0.0
.got 55328 55336 8 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493812 493996 184 0.0
.text 8224292 8231188 6896 0.1
door-lock-app debug (read only) 2004073 2004073 0 0.0
(read/write) 116832 116832 0 0.0
.bss 47584 47584 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62856 62856 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 180796 180796 0 0.0
.text 1673618 1673618 0 0.0
lighting-app debug+rpc (read only) 2135353 2135353 0 0.0
(read/write) 122120 122120 0 0.0
.bss 48352 48352 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 66792 66792 0 0.0
.dynamic 608 608 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 173052 173052 0 0.0
.text 1805618 1805618 0 0.0
ota-provider-app debug (read only) 1938561 1938561 0 0.0
(read/write) 112624 112624 0 0.0
.bss 47488 47488 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 58200 58200 0 0.0
.dynamic 608 608 0 0.0
.got 4376 4376 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 166315 166315 0 0.0
.text 1620482 1620482 0 0.0
ota-requestor-app debug (read only) 1968585 1968585 0 0.0
(read/write) 115592 115592 0 0.0
.bss 48480 48480 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 60264 60264 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 162564 162564 0 0.0
.text 1654034 1654034 0 0.0
shell debug (read only) 2426897 2426897 0 0.0
(read/write) 147208 147208 0 0.0
.bss 67240 67240 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73472 73472 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 209458 209458 0 0.0
.text 2060738 2060738 0 0.0
thermostat-no-ble arm64 (read only) 2224068 2224068 0 0.0
(read/write) 146369 146369 0 0.0
.bss 62273 62273 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75728 75728 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 138148 138148 0 0.0
.text 1865856 1865856 0 0.0
tv-app debug (read only) 2677017 2676089 -928 -0.0
(read/write) 247712 247552 -160 -0.1
.bss 164384 164224 -160 -0.1
.data 3104 3104 0 0.0
.data.rel.ro 74168 74168 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 206869 205995 -874 -0.4
.text 2295298 2295250 -48 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353460 2353460 0 0.0
.bss 184652 184652 0 0.0
.data 5752 5752 0 0.0
.text 1316060 1316060 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155919 1155919 0 0.0
bss 146716 146716 0 0.0
rodata 145968 145968 0 0.0
text 788068 788068 0 0.0
p6 all-clusters-app default (read/write) 2492968 2492968 0 0.0
.bss 118072 118072 0 0.0
.data 2632 2632 0 0.0
.text 1451232 1451232 0 0.0
light-app default (read/write) 2396352 2396352 0 0.0
.bss 111544 111544 0 0.0
.data 2488 2488 0 0.0
.text 1354616 1354616 0 0.0
lock-app default (read/write) 2359912 2359912 0 0.0
.bss 111288 111288 0 0.0
.data 2448 2448 0 0.0
.text 1318176 1318176 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 895834 895834 0 0.0
bss 87424 87424 0 0.0
noinit 37160 37160 0 0.0
text 633394 633394 0 0.0

There's a bunch of state involved in this, and trying to hang it all
off the controller leads to too many complications, ranging from the
inability to be opening more than one commissioning window at a time
to crashes.

Fixes project-chip#16209
@bzbarsky-apple bzbarsky-apple force-pushed the commissioning-window-opener branch from bb6de8d to 46f17b0 Compare March 19, 2022 07:11
@github-actions
Copy link

github-actions bot commented Mar 19, 2022

PR #16474: Size comparison from a3390fd to 46f17b0

Increases (1 build for linux)
platform target config section a3390fd 46f17b0 change % change
linux chip-tool-ipv6only arm64 (read only) 9769516 9776644 7128 0.1
(read/write) 472689 472721 32 0.0
.data.rel.ro 371824 371848 24 0.0
.got 55328 55336 8 0.0
.rodata 493844 494028 184 0.0
.text 8224308 8231204 6896 0.1
Full report (18 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section a3390fd 46f17b0 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603874 603874 0 0.0
.app_xip_area 510972 510972 0 0.0
.bss 75656 75656 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) 561654 561654 0 0.0
.app_xip_area 470280 470280 0 0.0
.bss 74160 74160 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) 571506 571506 0 0.0
.app_xip_area 470484 470484 0 0.0
.bss 83488 83488 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921992 921992 0 0.0
(read/write) 128760 128760 0 0.0
.bss 126768 126768 0 0.0
.data 1988 1988 0 0.0
.text 921984 921984 0 0.0
BRD4161A+rpc (read only) 950812 950812 0 0.0
(read/write) 144712 144712 0 0.0
.bss 142544 142544 0 0.0
.data 2168 2168 0 0.0
.text 950804 950804 0 0.0
window-app BRD4161A (read only) 852296 852296 0 0.0
(read/write) 126712 126712 0 0.0
.bss 124848 124848 0 0.0
.data 1864 1864 0 0.0
.text 852288 852288 0 0.0
esp32 all-clusters-app c3devkit (read only) 962000 962000 0 0.0
(read/write) 1393314 1393314 0 0.0
.dram0.bss 62048 62048 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 198168 198168 0 0.0
.flash.text 962000 962000 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1018099 1018099 0 0.0
(read/write) 461164 461164 0 0.0
.dram0.bss 67576 67576 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 227736 227736 0 0.0
.flash.text 1012715 1012715 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 701104 701104 0 0.0
.bss 77656 77656 0 0.0
.data 1868 1868 0 0.0
.text 615780 615780 0 0.0
lock k32w061+release (read/write) 700964 700964 0 0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 615632 615632 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9769516 9776644 7128 0.1
(read/write) 472689 472721 32 0.0
.bss 40609 40609 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371824 371848 24 0.0
.dynamic 560 560 0 0.0
.got 55328 55336 8 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493844 494028 184 0.0
.text 8224308 8231204 6896 0.1
thermostat-no-ble arm64 (read only) 2224068 2224068 0 0.0
(read/write) 146369 146369 0 0.0
.bss 62273 62273 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 75728 75728 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 138148 138148 0 0.0
.text 1865856 1865856 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353460 2353460 0 0.0
.bss 184652 184652 0 0.0
.data 5752 5752 0 0.0
.text 1316060 1316060 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155919 1155919 0 0.0
bss 146716 146716 0 0.0
rodata 145968 145968 0 0.0
text 788068 788068 0 0.0
p6 all-clusters-app default (read/write) 2492968 2492968 0 0.0
.bss 118072 118072 0 0.0
.data 2632 2632 0 0.0
.text 1451232 1451232 0 0.0
light-app default (read/write) 2396352 2396352 0 0.0
.bss 111544 111544 0 0.0
.data 2488 2488 0 0.0
.text 1354616 1354616 0 0.0
lock-app default (read/write) 2359912 2359912 0 0.0
.bss 111288 111288 0 0.0
.data 2448 2448 0 0.0
.text 1318176 1318176 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 895834 895834 0 0.0
bss 87424 87424 0 0.0
noinit 37160 37160 0 0.0
text 633394 633394 0 0.0

src/controller/CommissioningWindowOpener.cpp Outdated Show resolved Hide resolved
src/controller/CommissioningWindowOpener.cpp Outdated Show resolved Hide resolved
src/controller/CommissioningWindowOpener.cpp Outdated Show resolved Hide resolved
src/controller/CommissioningWindowOpener.h Outdated Show resolved Hide resolved
src/controller/CommissioningWindowOpener.h Outdated Show resolved Hide resolved
@bzbarsky-apple bzbarsky-apple force-pushed the commissioning-window-opener branch from 3fcb7b5 to 754051c Compare March 22, 2022 17:08
@github-actions
Copy link

github-actions bot commented Mar 22, 2022

PR #16474: Size comparison from 2e658fb to 754051c

Increases above 0.2%:

platform target config section 2e658fb 754051c change % change
linux chip-tool debug .init_array 632 640 8 1.3
Increases (2 builds for linux)
platform target config section 2e658fb 754051c change % change
linux chip-tool debug (read only) 10145893 10153197 7304 0.1
(read/write) 354848 354856 8 0.0
.init_array 632 640 8 1.3
.rodata 517813 518645 832 0.2
.text 8845477 8851925 6448 0.1
chip-tool-ipv6only arm64 (read only) 9769404 9776628 7224 0.1
(read/write) 472689 472721 32 0.0
.data.rel.ro 371824 371848 24 0.0
.got 55328 55336 8 0.0
.rodata 493604 493788 184 0.0
.text 8224436 8231428 6992 0.1
Decreases (1 build for linux)
platform target config section 2e658fb 754051c change % change
linux tv-app debug (read only) 2677657 2676713 -944 -0.0
(read/write) 247712 247552 -160 -0.1
.bss 164384 164224 -160 -0.1
.rodata 207413 206539 -874 -0.4
.text 2295394 2295330 -64 -0.0
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 2e658fb 754051c change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603870 603870 0 0.0
.app_xip_area 510968 510968 0 0.0
.bss 75656 75656 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) 561658 561658 0 0.0
.app_xip_area 470284 470284 0 0.0
.bss 74160 74160 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) 571494 571494 0 0.0
.app_xip_area 470472 470472 0 0.0
.bss 83488 83488 0 0.0
.data 500 500 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 922008 922008 0 0.0
(read/write) 128760 128760 0 0.0
.bss 126768 126768 0 0.0
.data 1988 1988 0 0.0
.text 922000 922000 0 0.0
BRD4161A+rpc (read only) 950820 950820 0 0.0
(read/write) 144712 144712 0 0.0
.bss 142544 142544 0 0.0
.data 2168 2168 0 0.0
.text 950812 950812 0 0.0
window-app BRD4161A (read only) 852384 852384 0 0.0
(read/write) 126720 126720 0 0.0
.bss 124856 124856 0 0.0
.data 1864 1864 0 0.0
.text 852376 852376 0 0.0
esp32 all-clusters-app c3devkit (read only) 963776 963776 0 0.0
(read/write) 1393690 1393690 0 0.0
.dram0.bss 62072 62072 0 0.0
.dram0.data 14188 14188 0 0.0
.flash.rodata 198512 198512 0 0.0
.flash.text 963776 963776 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1020319 1020319 0 0.0
(read/write) 461460 461460 0 0.0
.dram0.bss 67592 67592 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 228016 228016 0 0.0
.flash.text 1014935 1014935 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 701092 701092 0 0.0
.bss 77656 77656 0 0.0
.data 1868 1868 0 0.0
.text 615768 615768 0 0.0
lock k32w061+release (read/write) 700964 700964 0 0.0
.bss 77624 77624 0 0.0
.data 1908 1908 0 0.0
.text 615632 615632 0 0.0
linux all-clusters-app debug (read only) 2477089 2477089 0 0.0
(read/write) 143152 143152 0 0.0
.bss 57312 57312 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78840 78840 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 212005 212005 0 0.0
.text 2101634 2101634 0 0.0
bridge-app debug+rpc (read only) 1752637 1752637 0 0.0
(read/write) 89424 89424 0 0.0
.bss 44456 44456 0 0.0
.data 1952 1952 0 0.0
.data.rel.ro 37944 37944 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 144684 144684 0 0.0
.text 1492741 1492741 0 0.0
chip-tool debug (read only) 10145893 10153197 7304 0.1
(read/write) 354848 354856 8 0.0
.bss 22304 22304 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 325408 325408 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 632 640 8 1.3
.rodata 517813 518645 832 0.2
.text 8845477 8851925 6448 0.1
chip-tool-ipv6only arm64 (read only) 9769404 9776628 7224 0.1
(read/write) 472689 472721 32 0.0
.bss 40609 40609 0 0.0
.data 1128 1128 0 0.0
.data.rel.ro 371824 371848 24 0.0
.dynamic 560 560 0 0.0
.got 55328 55336 8 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493604 493788 184 0.0
.text 8224436 8231428 6992 0.1
door-lock-app debug (read only) 2004473 2004473 0 0.0
(read/write) 116832 116832 0 0.0
.bss 47584 47584 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62856 62856 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 181180 181180 0 0.0
.text 1673634 1673634 0 0.0
lighting-app debug+rpc (read only) 2178137 2178137 0 0.0
(read/write) 123792 123792 0 0.0
.bss 48864 48864 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 67928 67928 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 175484 175484 0 0.0
.text 1843634 1843634 0 0.0
ota-provider-app debug (read only) 1938833 1938833 0 0.0
(read/write) 112624 112624 0 0.0
.bss 47488 47488 0 0.0
.data 1288 1288 0 0.0
.data.rel.ro 58200 58200 0 0.0
.dynamic 608 608 0 0.0
.got 4376 4376 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 166571 166571 0 0.0
.text 1620498 1620498 0 0.0
ota-requestor-app debug (read only) 1969001 1969001 0 0.0
(read/write) 115592 115592 0 0.0
.bss 48480 48480 0 0.0
.data 1416 1416 0 0.0
.data.rel.ro 60264 60264 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 162980 162980 0 0.0
.text 1654034 1654034 0 0.0
shell debug (read only) 2426433 2426433 0 0.0
(read/write) 147208 147208 0 0.0
.bss 67240 67240 0 0.0
.data 784 784 0 0.0
.data.rel.ro 73472 73472 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 209426 209426 0 0.0
.text 2060306 2060306 0 0.0
thermostat-no-ble arm64 (read only) 2262500 2262500 0 0.0
(read/write) 148273 148273 0 0.0
.bss 62753 62753 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 77000 77000 0 0.0
.dynamic 560 560 0 0.0
.got 4480 4480 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 140036 140036 0 0.0
.text 1899152 1899152 0 0.0
tv-app debug (read only) 2677657 2676713 -944 -0.0
(read/write) 247712 247552 -160 -0.1
.bss 164384 164224 -160 -0.1
.data 3104 3104 0 0.0
.data.rel.ro 74168 74168 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 207413 206539 -874 -0.4
.text 2295394 2295330 -64 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353452 2353452 0 0.0
.bss 184652 184652 0 0.0
.data 5752 5752 0 0.0
.text 1316052 1316052 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1155987 1155987 0 0.0
bss 146716 146716 0 0.0
rodata 145956 145956 0 0.0
text 788148 788148 0 0.0
p6 all-clusters-app default (read/write) 2492976 2492976 0 0.0
.bss 118072 118072 0 0.0
.data 2632 2632 0 0.0
.text 1451240 1451240 0 0.0
light-app default (read/write) 2396376 2396376 0 0.0
.bss 111544 111544 0 0.0
.data 2488 2488 0 0.0
.text 1354640 1354640 0 0.0
lock-app default (read/write) 2359928 2359928 0 0.0
.bss 111288 111288 0 0.0
.data 2448 2448 0 0.0
.text 1318192 1318192 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 895830 895830 0 0.0
bss 87424 87424 0 0.0
noinit 37160 37160 0 0.0
text 633404 633404 0 0.0

@mrjerryjohns
Copy link
Contributor

Is there a way to add a test for the 'dangling OperationalDeviceProxy' case (i.e try to FindOrEstablishSession, and have that fail, and then ensure FindExistingSession fails correctly instead of crashing.

@bzbarsky-apple
Copy link
Contributor Author

Is there a way to add a test for the 'dangling OperationalDeviceProxy' case (i.e try to FindOrEstablishSession, and have that fail, and then ensure FindExistingSession fails correctly instead of crashing.

The point is, FindExistingSession will not fail in that case. It will return an OperationalDeviceProxy. That OperationalDeviceProxy will just not have a SecureSession, and attempts to get one from it will crash (in VerifyOrDie).

FindExistingSession should only be used in extremely rare cases, basically. Once this PR merges I should evaluate the remaining callsites to see whether we can make it private to CASESessionManager....

@bzbarsky-apple bzbarsky-apple force-pushed the commissioning-window-opener branch from 29a4543 to a0ddff3 Compare March 24, 2022 15:51
@bzbarsky-apple bzbarsky-apple force-pushed the commissioning-window-opener branch from a0ddff3 to 01fa52c Compare March 24, 2022 18:36
@github-actions
Copy link

github-actions bot commented Mar 24, 2022

PR #16474: Size comparison from 20f8b95 to 01fa52c

Increases above 0.2%:

platform target config section 20f8b95 01fa52c change % change
linux chip-tool debug .init_array 632 640 8 1.3
Increases (2 builds for linux)
platform target config section 20f8b95 01fa52c change % change
linux chip-tool debug (read only) 10207365 10214669 7304 0.1
(read/write) 355712 355720 8 0.0
.init_array 632 640 8 1.3
.rodata 517973 518805 832 0.2
.text 8904885 8911333 6448 0.1
chip-tool-ipv6only arm64 (read only) 9826172 9833460 7288 0.1
(read/write) 473793 473825 32 0.0
.data.rel.ro 372664 372688 24 0.0
.got 55416 55424 8 0.0
.rodata 493716 493964 248 0.1
.text 8279028 8286020 6992 0.1
Decreases (1 build for linux)
platform target config section 20f8b95 01fa52c change % change
linux tv-app debug (read only) 2682561 2681625 -936 -0.0
(read/write) 247872 247712 -160 -0.1
.bss 164512 164352 -160 -0.1
.rodata 206813 205931 -882 -0.4
.text 2300850 2300802 -48 -0.0
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 20f8b95 01fa52c change % change
cyw30739 light cyw930739m2evb_01 (read/write) 603634 603634 0 0.0
.app_xip_area 510804 510804 0 0.0
.bss 75576 75576 0 0.0
.data 604 604 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 561422 561422 0 0.0
.app_xip_area 470120 470120 0 0.0
.bss 74080 74080 0 0.0
.data 568 568 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 573522 573522 0 0.0
.app_xip_area 472572 472572 0 0.0
.bss 83408 83408 0 0.0
.data 508 508 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 923536 923536 0 0.0
(read/write) 128680 128680 0 0.0
.bss 126680 126680 0 0.0
.data 1996 1996 0 0.0
.text 923528 923528 0 0.0
BRD4161A+rpc (read only) 952344 952344 0 0.0
(read/write) 144632 144632 0 0.0
.bss 142456 142456 0 0.0
.data 2176 2176 0 0.0
.text 952336 952336 0 0.0
window-app BRD4161A (read only) 853340 853340 0 0.0
(read/write) 126648 126648 0 0.0
.bss 124776 124776 0 0.0
.data 1872 1872 0 0.0
.text 853332 853332 0 0.0
esp32 all-clusters-app c3devkit (read only) 964910 964910 0 0.0
(read/write) 1394154 1394154 0 0.0
.dram0.bss 61992 61992 0 0.0
.dram0.data 14212 14212 0 0.0
.flash.rodata 199024 199024 0 0.0
.flash.text 964910 964910 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1021219 1021219 0 0.0
(read/write) 461900 461900 0 0.0
.dram0.bss 67520 67520 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 228520 228520 0 0.0
.flash.text 1015835 1015835 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 701776 701776 0 0.0
.bss 77568 77568 0 0.0
.data 1876 1876 0 0.0
.text 616532 616532 0 0.0
lock k32w061+release (read/write) 701228 701228 0 0.0
.bss 77544 77544 0 0.0
.data 1916 1916 0 0.0
.text 615968 615968 0 0.0
linux all-clusters-app debug (read only) 2484001 2484001 0 0.0
(read/write) 143344 143344 0 0.0
.bss 57408 57408 0 0.0
.data 1280 1280 0 0.0
.data.rel.ro 78920 78920 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 212101 212101 0 0.0
.text 2108178 2108178 0 0.0
bridge-app debug+rpc (read only) 1756261 1756261 0 0.0
(read/write) 89552 89552 0 0.0
.bss 44552 44552 0 0.0
.data 1984 1984 0 0.0
.data.rel.ro 37936 37936 0 0.0
.dynamic 592 592 0 0.0
.got 3920 3920 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 144140 144140 0 0.0
.text 1496885 1496885 0 0.0
chip-tool debug (read only) 10207365 10214669 7304 0.1
(read/write) 355712 355720 8 0.0
.bss 22496 22496 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 326056 326056 0 0.0
.dynamic 608 608 0 0.0
.got 4816 4816 0 0.0
.init 27 27 0 0.0
.init_array 632 640 8 1.3
.rodata 517973 518805 832 0.2
.text 8904885 8911333 6448 0.1
chip-tool-ipv6only arm64 (read only) 9826172 9833460 7288 0.1
(read/write) 473793 473825 32 0.0
.bss 40769 40769 0 0.0
.data 1144 1144 0 0.0
.data.rel.ro 372664 372688 24 0.0
.dynamic 560 560 0 0.0
.got 55416 55424 8 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 493716 493964 248 0.1
.text 8279028 8286020 6992 0.1
door-lock-app debug (read only) 2008225 2008225 0 0.0
(read/write) 116896 116896 0 0.0
.bss 47680 47680 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62840 62840 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 180860 180860 0 0.0
.text 1677682 1677682 0 0.0
lighting-app debug+rpc (read only) 2182169 2182169 0 0.0
(read/write) 123888 123888 0 0.0
.bss 48960 48960 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 67928 67928 0 0.0
.dynamic 608 608 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 174876 174876 0 0.0
.text 1848226 1848226 0 0.0
ota-provider-app debug (read only) 1949241 1949241 0 0.0
(read/write) 112624 112624 0 0.0
.bss 47552 47552 0 0.0
.data 1256 1256 0 0.0
.data.rel.ro 58184 58184 0 0.0
.dynamic 608 608 0 0.0
.got 4376 4376 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 166571 166571 0 0.0
.text 1630930 1630930 0 0.0
ota-requestor-app debug (read only) 1976017 1976017 0 0.0
(read/write) 115880 115880 0 0.0
.bss 48544 48544 0 0.0
.data 1480 1480 0 0.0
.data.rel.ro 60408 60408 0 0.0
.dynamic 592 592 0 0.0
.got 4184 4184 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 162532 162532 0 0.0
.text 1660834 1660834 0 0.0
shell debug (read only) 2432809 2432809 0 0.0
(read/write) 147400 147400 0 0.0
.bss 67336 67336 0 0.0
.data 800 800 0 0.0
.data.rel.ro 73568 73568 0 0.0
.dynamic 592 592 0 0.0
.got 4152 4152 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 209586 209586 0 0.0
.text 2066354 2066354 0 0.0
thermostat-no-ble arm64 (read only) 2267020 2267020 0 0.0
(read/write) 148385 148385 0 0.0
.bss 62833 62833 0 0.0
.data 1040 1040 0 0.0
.data.rel.ro 77000 77000 0 0.0
.dynamic 560 560 0 0.0
.got 4504 4504 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 139692 139692 0 0.0
.text 1903920 1903920 0 0.0
tv-app debug (read only) 2682561 2681625 -936 -0.0
(read/write) 247872 247712 -160 -0.1
.bss 164512 164352 -160 -0.1
.data 3136 3136 0 0.0
.data.rel.ro 74160 74160 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 206813 205931 -882 -0.4
.text 2300850 2300802 -48 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2353868 2353868 0 0.0
.bss 184572 184572 0 0.0
.data 5760 5760 0 0.0
.text 1316468 1316468 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1140095 1140095 0 0.0
bss 142512 142512 0 0.0
rodata 141872 141872 0 0.0
text 780868 780868 0 0.0
p6 all-clusters-app default (read/write) 2495088 2495088 0 0.0
.bss 117992 117992 0 0.0
.data 2640 2640 0 0.0
.text 1453352 1453352 0 0.0
light-app default (read/write) 2397464 2397464 0 0.0
.bss 111464 111464 0 0.0
.data 2496 2496 0 0.0
.text 1355728 1355728 0 0.0
lock-app default (read/write) 2360992 2360992 0 0.0
.bss 111208 111208 0 0.0
.data 2456 2456 0 0.0
.text 1319256 1319256 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 896686 896686 0 0.0
bss 87356 87356 0 0.0
noinit 37160 37160 0 0.0
text 634102 634102 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit 710b9d8 into project-chip:master Mar 24, 2022
@bzbarsky-apple bzbarsky-apple deleted the commissioning-window-opener branch March 24, 2022 20:22
rochaferraz pushed a commit to rochaferraz/connectedhomeip that referenced this pull request Mar 31, 2022
…6474)

* Add a helper class for opening commissioning windows.

There's a bunch of state involved in this, and trying to hang it all
off the controller leads to too many complications, ranging from the
inability to be opening more than one commissioning window at a time
to crashes.

Fixes project-chip#16209

* Address review comments.

* Address review comments.
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
…6474)

* Add a helper class for opening commissioning windows.

There's a bunch of state involved in this, and trying to hang it all
off the controller leads to too many complications, ranging from the
inability to be opening more than one commissioning window at a time
to crashes.

Fixes project-chip#16209

* Address review comments.

* Address review comments.
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.

Crash trying to call OpenCommissioningWindow for a node ID that can't be connected to
5 participants