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

Emit Leave events before the fabric is actually removed. #21191

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

Otherwise we stop being able to do things like send a report for the
event.

Fixes #13930
Fixes #21012

Problem

See above issues.

Change overview

Add a fabric delegate notification for "fabric about to be removed" and emit the Leave event there.

Testing

Ran the following commands in chip-tool in interactive mode:

pairing code 17 749701123365521327694

basic subscribe-event leave 5 20 17 0

operationalcredentials remove-fabric 1 17 0

and observed the Leave event being logged.

Otherwise we stop being able to do things like send a report for the
event.

Fixes project-chip#13930
Fixes project-chip#21012
@github-actions
Copy link

github-actions bot commented Jul 26, 2022

PR #21191: Size comparison from 4f280ce to 62918cf

Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 4f280ce 62918cf change % change
bl602 lighting-app bl602 (read/write) 1381754 1381826 72 0.0
.text 1051804 1051848 44 0.0
bl602+rpc (read/write) 1427162 1427234 72 0.0
.text 1083460 1083504 44 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668791 668851 60 0.0
.rodata 88391 88419 28 0.0
.text 580084 580116 32 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634443 52 0.0
.rodata 77615 77643 28 0.0
.text 556452 556476 24 0.0
lock-ftd LP_CC2652R7 (read only) 671907 671975 68 0.0
.rodata 76475 76495 20 0.0
.text 594952 595000 48 0.0
lock-mtd LP_CC2652R7 (read only) 654167 654211 44 0.0
.rodata 101183 101203 20 0.0
.text 552504 552528 24 0.0
pump-app LP_CC2652R7 (read only) 681579 681631 52 0.0
.rodata 89219 89247 28 0.0
.text 591876 591900 24 0.0
pump-controller-app LP_CC2652R7 (read only) 667331 667383 52 0.0
.rodata 85059 85079 20 0.0
.text 581792 581824 32 0.0
shell LP_CC2652R7 (read only) 661250 661318 68 0.0
.rodata 85162 85182 20 0.0
.text 575772 575820 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583642 583702 60 0.0
.app_xip_area 460780 460840 60 0.0
lock cyw930739m2evb_01 (read/write) 589554 589614 60 0.0
.app_xip_area 461964 462024 60 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 588078 588122 44 0.0
.app_xip_area 466064 466108 44 0.0
efr32 lighting-app BRD4161A (read/write) 1088680 1088736 56 0.0
.text 953336 953392 56 0.0
BRD4161A+rpc (read/write) 1142980 1143028 48 0.0
.text 990744 990792 48 0.0
BRD4161A+rs911x (read/write) 953224 953272 48 0.0
.text 810164 810212 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128668 1128720 52 0.0
.text 982232 982284 52 0.0
window-app BRD4161A (read/write) 1082172 1082220 48 0.0
.text 945324 945372 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022418 1022444 26 0.0
(read/write) 1486618 1486634 16 0.0
.flash.rodata 216296 216312 16 0.0
.flash.text 1022418 1022444 26 0.0
m5stack (read only) 1075959 1076047 88 0.0
(read/write) 488616 488648 32 0.0
.flash.rodata 246676 246708 32 0.0
.flash.text 1070575 1070663 88 0.0
k32w light k32w0+release (read/write) 641876 641920 44 0.0
.text 567392 567436 44 0.0
lock k32w0+release (read/write) 699180 699232 52 0.0
.text 624248 624300 52 0.0
linux all-clusters-app debug (read only) 2986169 2986529 360 0.0
(read/write) 155416 155480 64 0.0
.data.rel.ro 85224 85272 48 0.1
.text 2540354 2540546 192 0.0
all-clusters-minimal-app debug (read only) 2829081 2829441 360 0.0
(read/write) 147120 147184 64 0.0
.data.rel.ro 77816 77864 48 0.1
.text 2385842 2386034 192 0.0
bridge-app debug+rpc (read only) 2343497 2343809 312 0.0
(read/write) 127024 127056 32 0.0
.data.rel.ro 67272 67304 32 0.0
.text 1981058 1981250 192 0.0
chip-tool debug (read only) 10384193 10384433 240 0.0
(read/write) 631056 631088 32 0.0
.data.rel.ro 596568 596592 24 0.0
.text 8401236 8401380 144 0.0
chip-tool-ipv6only arm64 (read only) 9808692 9808884 192 0.0
(read/write) 678561 678593 32 0.0
.data.rel.ro 623904 623936 32 0.0
.text 7760244 7760340 96 0.0
lighting-app debug+rpc (read only) 2566601 2566913 312 0.0
.data.rel.ro 72328 72344 16 0.0
.text 2180354 2180546 192 0.0
lock-app debug (read only) 2531625 2531977 352 0.0
(read/write) 124976 125040 64 0.1
.data.rel.ro 69304 69352 48 0.1
.text 2135202 2135410 208 0.0
ota-provider-app debug (read only) 2335401 2335729 328 0.0
(read/write) 118776 118840 64 0.1
.data.rel.ro 63288 63336 48 0.1
.text 1966386 1966594 208 0.0
ota-requestor-app debug (read only) 2453601 2453913 312 0.0
(read/write) 125680 125712 32 0.0
.data.rel.ro 67512 67544 32 0.0
.text 2072626 2072818 192 0.0
shell debug (read only) 2569825 2570201 376 0.0
(read/write) 141568 141632 64 0.0
.data.rel.ro 76888 76944 56 0.1
.text 2182114 2182322 208 0.0
thermostat-no-ble arm64 (read only) 2342092 2342364 272 0.0
(read/write) 141345 141393 48 0.0
.data.rel.ro 75624 75672 48 0.1
.text 1965728 1965856 128 0.0
tv-app debug (read only) 3116649 3117009 360 0.0
(read/write) 257160 257224 64 0.0
.data.rel.ro 78824 78888 64 0.1
.text 2676706 2676898 192 0.0
tv-casting-app debug (read only) 5370969 5371305 336 0.0
(read/write) 158432 158464 32 0.0
.data.rel.ro 98384 98432 48 0.0
.text 4768802 4768994 192 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2449472 2449560 88 0.0
.text 1412116 1412204 88 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177675 1177735 60 0.0
rodata 142692 142720 28 0.0
text 812924 812948 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157727 1157787 60 0.0
rodata 134224 134252 28 0.0
text 802232 802260 28 0.0
p6 all-clusters-app default (read/write) 1687524 1687580 56 0.0
.text 1527360 1527416 56 0.0
all-clusters-minimal-app default (read/write) 1631636 1631692 56 0.0
.text 1472192 1472248 56 0.0
light-app default (read/write) 1551708 1551764 56 0.0
.text 1400568 1400624 56 0.0
lock-app default (read/write) 1589300 1589364 64 0.0
.text 1433688 1433752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799980 800044 64 0.0
text 567494 567532 38 0.0
lighting-app tlsr9518adk80d (read/write) 820064 820128 64 0.0
text 584048 584084 36 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 4f280ce 62918cf change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 182568 182508 -60 -0.0
lock-ftd LP_CC2652R7 (read/write) 169644 169576 -68 -0.0
lock-mtd LP_CC2652R7 (read/write) 183072 183028 -44 -0.0
pump-app LP_CC2652R7 (read/write) 160804 160752 -52 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175188 175136 -52 -0.0
shell LP_CC2652R7 (read/write) 185628 185560 -68 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 4f280ce 62918cf change % change
bl602 lighting-app bl602 (read/write) 1381754 1381826 72 0.0
.bss 117538 117538 0 0.0
.data 4480 4480 0 0.0
.text 1051804 1051848 44 0.0
bl602+rpc (read/write) 1427162 1427234 72 0.0
.bss 124978 124978 0 0.0
.data 4600 4600 0 0.0
.text 1083460 1083504 44 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 668791 668851 60 0.0
(read/write) 182568 182508 -60 -0.0
.bss 74252 74252 0 0.0
.data 3356 3356 0 0.0
.rodata 88391 88419 28 0.0
.text 580084 580116 32 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 634391 634443 52 0.0
(read/write) 157820 157820 0 0.0
.bss 73548 73548 0 0.0
.data 3356 3356 0 0.0
.rodata 77615 77643 28 0.0
.text 556452 556476 24 0.0
lock-ftd LP_CC2652R7 (read only) 671907 671975 68 0.0
(read/write) 169644 169576 -68 -0.0
.bss 71332 71332 0 0.0
.data 3280 3280 0 0.0
.rodata 76475 76495 20 0.0
.text 594952 595000 48 0.0
lock-mtd LP_CC2652R7 (read only) 654167 654211 44 0.0
(read/write) 183072 183028 -44 -0.0
.bss 67020 67020 0 0.0
.data 3280 3280 0 0.0
.rodata 101183 101203 20 0.0
.text 552504 552528 24 0.0
pump-app LP_CC2652R7 (read only) 681579 681631 52 0.0
(read/write) 160804 160752 -52 -0.0
.bss 71396 71396 0 0.0
.data 3280 3280 0 0.0
.rodata 89219 89247 28 0.0
.text 591876 591900 24 0.0
pump-controller-app LP_CC2652R7 (read only) 667331 667383 52 0.0
(read/write) 175188 175136 -52 -0.0
.bss 71532 71532 0 0.0
.data 3276 3276 0 0.0
.rodata 85059 85079 20 0.0
.text 581792 581824 32 0.0
shell LP_CC2652R7 (read only) 661250 661318 68 0.0
(read/write) 185628 185560 -68 -0.0
.bss 76572 76572 0 0.0
.data 3360 3360 0 0.0
.rodata 85162 85182 20 0.0
.text 575772 575820 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 583642 583702 60 0.0
.app_xip_area 460780 460840 60 0.0
.bss 65656 65656 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) 589554 589614 60 0.0
.app_xip_area 461964 462024 60 0.0
.bss 70384 70384 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) 588078 588122 44 0.0
.app_xip_area 466064 466108 44 0.0
.bss 64864 64864 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/write) 1088680 1088736 56 0.0
.bss 133276 133276 0 0.0
.data 2048 2048 0 0.0
.text 953336 953392 56 0.0
BRD4161A+rpc (read/write) 1142980 1143028 48 0.0
.bss 149956 149956 0 0.0
.data 2260 2260 0 0.0
.text 990744 990792 48 0.0
BRD4161A+rs911x (read/write) 953224 953272 48 0.0
.bss 140992 140992 0 0.0
.data 2048 2048 0 0.0
.text 810164 810212 48 0.0
lock-app BRD4161A+wf200 (read/write) 1128668 1128720 52 0.0
.bss 144360 144360 0 0.0
.data 2056 2056 0 0.0
.text 982232 982284 52 0.0
window-app BRD4161A (read/write) 1082172 1082220 48 0.0
.bss 134748 134748 0 0.0
.data 2076 2076 0 0.0
.text 945324 945372 48 0.0
esp32 all-clusters-app c3devkit (read only) 1022418 1022444 26 0.0
(read/write) 1486618 1486634 16 0.0
.dram0.bss 70288 70288 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216296 216312 16 0.0
.flash.text 1022418 1022444 26 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1075959 1076047 88 0.0
(read/write) 488616 488648 32 0.0
.dram0.bss 75800 75800 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246676 246708 32 0.0
.flash.text 1070575 1070663 88 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 641876 641920 44 0.0
.bss 69728 69728 0 0.0
.data 2028 2028 0 0.0
.text 567392 567436 44 0.0
lock k32w0+release (read/write) 699180 699232 52 0.0
.bss 70168 70168 0 0.0
.data 2036 2036 0 0.0
.text 624248 624300 52 0.0
linux all-clusters-app debug (read only) 2986169 2986529 360 0.0
(read/write) 155416 155480 64 0.0
.bss 61856 61856 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 85224 85272 48 0.1
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1072 1072 0 0.0
.rodata 267627 267627 0 0.0
.text 2540354 2540546 192 0.0
all-clusters-minimal-app debug (read only) 2829081 2829441 360 0.0
(read/write) 147120 147184 64 0.0
.bss 61056 61056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77816 77864 48 0.1
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 267659 267659 0 0.0
.text 2385842 2386034 192 0.0
bridge-app debug+rpc (read only) 2343497 2343809 312 0.0
(read/write) 127024 127056 32 0.0
.bss 50144 50144 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 67272 67304 32 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 200008 200008 0 0.0
.text 1981058 1981250 192 0.0
chip-tool debug (read only) 10384193 10384433 240 0.0
(read/write) 631056 631088 32 0.0
.bss 24824 24824 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 596568 596592 24 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 531477 531477 0 0.0
.text 8401236 8401380 144 0.0
chip-tool-ipv6only arm64 (read only) 9808692 9808884 192 0.0
(read/write) 678561 678593 32 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 623904 623936 32 0.0
.dynamic 560 560 0 0.0
.got 13536 13536 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 466244 466244 0 0.0
.text 7760244 7760340 96 0.0
lighting-app debug+rpc (read only) 2566601 2566913 312 0.0
(read/write) 129992 129992 0 0.0
.bss 49696 49696 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72328 72344 16 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 215728 215728 0 0.0
.text 2180354 2180546 192 0.0
lock-app debug (read only) 2531625 2531977 352 0.0
(read/write) 124976 125040 64 0.1
.bss 48096 48096 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69304 69352 48 0.1
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 230704 230704 0 0.0
.text 2135202 2135410 208 0.0
ota-provider-app debug (read only) 2335401 2335729 328 0.0
(read/write) 118776 118840 64 0.1
.bss 47744 47744 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63288 63336 48 0.1
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 205688 205688 0 0.0
.text 1966386 1966594 208 0.0
ota-requestor-app debug (read only) 2453601 2453913 312 0.0
(read/write) 125680 125712 32 0.0
.bss 50080 50080 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 67512 67544 32 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 209248 209248 0 0.0
.text 2072626 2072818 192 0.0
shell debug (read only) 2569825 2570201 376 0.0
(read/write) 141568 141632 64 0.0
.bss 57704 57704 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76888 76944 56 0.1
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 230034 230034 0 0.0
.text 2182114 2182322 208 0.0
thermostat-no-ble arm64 (read only) 2342092 2342364 272 0.0
(read/write) 141345 141393 48 0.0
.bss 55297 55297 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75624 75672 48 0.1
.dynamic 560 560 0 0.0
.got 4984 4984 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 139460 139460 0 0.0
.text 1965728 1965856 128 0.0
tv-app debug (read only) 3116649 3117009 360 0.0
(read/write) 257160 257224 64 0.0
.bss 167160 167160 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 78824 78888 64 0.1
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 968 968 0 0.0
.rodata 251400 251400 0 0.0
.text 2676706 2676898 192 0.0
tv-casting-app debug (read only) 5370969 5371305 336 0.0
(read/write) 158432 158464 32 0.0
.bss 51320 51320 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98384 98432 48 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 335521 335521 0 0.0
.text 4768802 4768994 192 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2449472 2449560 88 0.0
.bss 214508 214508 0 0.0
.data 5872 5872 0 0.0
.text 1412116 1412204 88 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177675 1177735 60 0.0
bss 143132 143132 0 0.0
rodata 142692 142720 28 0.0
text 812924 812948 24 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157727 1157787 60 0.0
bss 142368 142368 0 0.0
rodata 134224 134252 28 0.0
text 802232 802260 28 0.0
p6 all-clusters-app default (read only) 881568 881568 0 0.0
(read/write) 1687524 1687580 56 0.0
.bss 149128 149128 0 0.0
.data 2648 2648 0 0.0
.text 1527360 1527416 56 0.0
all-clusters-minimal-app default (read only) 882288 882288 0 0.0
(read/write) 1631636 1631692 56 0.0
.bss 148408 148408 0 0.0
.data 2648 2648 0 0.0
.text 1472192 1472248 56 0.0
light-app default (read only) 890592 890592 0 0.0
(read/write) 1551708 1551764 56 0.0
.bss 140312 140312 0 0.0
.data 2440 2440 0 0.0
.text 1400568 1400624 56 0.0
lock-app default (read only) 886120 886120 0 0.0
(read/write) 1589300 1589364 64 0.0
.bss 144768 144768 0 0.0
.data 2456 2456 0 0.0
.text 1433688 1433752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 799980 800044 64 0.0
bss 70808 70808 0 0.0
noinit 40416 40416 0 0.0
text 567494 567532 38 0.0
lighting-app tlsr9518adk80d (read/write) 820064 820128 64 0.0
bss 71652 71652 0 0.0
noinit 40416 40416 0 0.0
text 584048 584084 36 0.0

@bzbarsky-apple bzbarsky-apple merged commit 75f1ddf into project-chip:master Jul 26, 2022
@bzbarsky-apple bzbarsky-apple deleted the fix-leave-event branch July 26, 2022 16:37
github-actions bot pushed a commit that referenced this pull request Jul 26, 2022
Otherwise we stop being able to do things like send a report for the
event.

Fixes #13930
Fixes #21012
woody-apple added a commit that referenced this pull request Jul 27, 2022
…1237)

Otherwise we stop being able to do things like send a report for the
event.

Fixes #13930
Fixes #21012

Co-authored-by: Boris Zbarsky <[email protected]>
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…p#21191)

Otherwise we stop being able to do things like send a report for the
event.

Fixes project-chip#13930
Fixes project-chip#21012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants