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 in-place save for DefaultSessionResumptionStorage #23062

Merged
merged 6 commits into from Oct 10, 2022

Conversation

msandstedt
Copy link
Contributor

@msandstedt msandstedt commented Oct 6, 2022

Nodes that already exist in the DefaultSessionResumptionStorage index are consuming additional entries in the index on save, and aren't cleaned from the link and state tables first. This has the following consequences:

  1. If session resumption storage is full, this causes unnecessary eviction of records for other nodes.
  2. This pulls the index out of sync from the backing state table because duplicate entries in the index for a given node only map to a single node-id-keyed entry in the state table.
  3. An entry in the link table is leaked on each occurrence, as the resumption-id-keyed link entry will be orphaned once its associated state table entry is overwritten.

This commit fixes the problem by first deleting the link table entry before saving a record for a node that already exists in the table. Save is also simplified in this case by not rewriting the index, as the node is already in the index.

Fixes #23044

Nodes that already exist in the DefaultSessionResumptionStorage index
are consuming additional entries in the index on save, and aren't
cleaned from the link and state tables first.  This has the following
consequences:

1. If session resumption storage is full, this causes unnecessary
   eviction of records for other nodes.
2. This pulls the index out of sync from the backing state table
   because duplicate entries in the index for a given node only map
   map to a single node-id-keyed entry in the state table.
3. An entry in the link table is leaked on each occurrence, as the
   resumption-id-keyed link entry will be orphaned once its associated
   state table entry is overwritten.

This commit fixes the problem by first deleting the link table entry
before saving a record for a node that already exists in the table.
Save is also simplified in this case by not rewriting the index, as
the node is already in the index.
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

PR #23062: Size comparison from 0bff5ad to e0007b3

Increases (32 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 0bff5ad e0007b3 change % change
bl602 lighting-app bl602 (read/write) 1389242 1389654 412 0.0
.text 1068834 1069060 226 0.0
bl602+rpc (read/write) 1434454 1434866 412 0.0
.text 1100182 1100406 224 0.0
bl702 lighting-app bl702 (read/write) 1188243 1188659 416 0.0
.debug_info 37904657 37905285 628 0.0
.debug_line 5256255 5256840 585 0.0
.debug_loc 3366594 3367112 518 0.0
.debug_ranges 359272 359368 96 0.0
.debug_str 3457767 3457811 44 0.0
.rodata 116552 116744 192 0.2
.text 956804 957030 226 0.0
bl702+rpc (read/write) 1284163 1284579 416 0.0
.debug_info 41811270 41811898 628 0.0
.debug_line 5630790 5631375 585 0.0
.debug_loc 3559254 3559772 518 0.0
.debug_ranges 381728 381824 96 0.0
.debug_str 3853667 3853711 44 0.0
.rodata 129944 130136 192 0.1
.text 1030506 1030732 226 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 677175 368 0.1
.rodata 89607 89791 184 0.2
.text 586888 587072 184 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641047 641423 376 0.1
.rodata 78743 78927 184 0.2
.text 561984 562176 192 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675867 376 0.1
.rodata 77131 77315 184 0.2
.text 597880 598072 192 0.0
lock-mtd LP_CC2652R7 (read only) 659239 659623 384 0.1
.rodata 102951 103135 184 0.2
.text 555808 556008 200 0.0
pump-app LP_CC2652R7 (read only) 687543 687923 380 0.1
.rodata 90543 90731 188 0.2
.text 596516 596708 192 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672423 380 0.1
.rodata 86099 86287 188 0.2
.text 585464 585656 192 0.0
shell LP_CC2652R7 (read only) 667830 668206 376 0.1
.rodata 86318 86502 184 0.2
.text 581196 581388 192 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587770 587914 144 0.0
.app_xip_area 464380 464524 144 0.0
lock cyw930739m2evb_01 (read/write) 592026 592170 144 0.0
.app_xip_area 463316 463460 144 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543586 543966 380 0.1
.app_xip_area 425252 425632 380 0.1
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973892 380 0.0
.text 818992 819372 380 0.0
BRD4161A+rs911x (read/write) 1030736 1031128 392 0.0
.text 841968 842360 392 0.0
BRD4187C (read/write) 1145476 1145876 400 0.0
.text 979644 980044 400 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1157168 376 0.0
.text 996460 996840 380 0.0
window-app BRD4187C (read/write) 1138912 1139312 400 0.0
.text 971616 972016 400 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10429908 944 0.0
(read/write) 706321 706353 32 0.0
.data.rel.ro 650608 650632 24 0.0
.rodata 518004 518180 176 0.0
.text 8255412 8256164 752 0.0
thermostat-no-ble arm64 (read only) 2389468 2390428 960 0.0
(read/write) 143617 143633 16 0.0
.data.rel.ro 77232 77256 24 0.0
.rodata 144244 144436 192 0.1
.text 2002336 2003088 752 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183451 368 0.0
rodata 144220 144396 176 0.1
text 815516 815708 192 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1162123 356 0.0
rodata 135792 135972 180 0.1
text 803412 803600 188 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1744764 1745164 400 0.0
.debug_abbrev 1229374 1229390 16 0.0
.debug_info 26830674 26831647 973 0.0
.debug_line 3671535 3672038 503 0.0
.debug_loc 3588341 3589149 808 0.0
.debug_ranges 339640 339712 72 0.0
.debug_str 3441170 3441214 44 0.0
.symtab 421184 421216 32 0.0
.text 1545000 1545400 400 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read/write) 1687372 1687772 400 0.0
.debug_abbrev 1221173 1221189 16 0.0
.debug_info 26567456 26568430 974 0.0
.debug_line 3692252 3692755 503 0.0
.debug_loc 3575978 3576786 808 0.0
.debug_ranges 338256 338328 72 0.0
.debug_str 3430183 3430227 44 0.0
.symtab 407616 407648 32 0.0
.text 1488344 1488744 400 0.0
light cy8ckit_062s2_43012 (read/write) 1605900 1606292 392 0.0
.debug_abbrev 1055284 1055300 16 0.0
.debug_info 22031182 22032153 971 0.0
.debug_line 3262190 3262693 503 0.0
.debug_loc 3273940 3274748 808 0.0
.debug_ranges 303560 303632 72 0.0
.debug_str 3235715 3235759 44 0.0
.symtab 376064 376096 32 0.0
.text 1415064 1415456 392 0.0
lock cy8ckit_062s2_43012 (read/write) 1639820 1640212 392 0.0
.debug_abbrev 1057410 1057426 16 0.0
.debug_info 22269877 2227084 971 0.0
.debug_line 3260055 3260558 503 0.0
.debug_loc 3302533 3303341 808 0.0
.debug_ranges 305504 305576 72 0.0
.debug_str 3255229 3255273 44 0.0
.symtab 377728 377760 32 0.0
.text 1443968 1444360 392 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148656 376 0.0
.text 595380 595756 376 0.1
lock-app qpg6105+debug (read/write) 1113336 1113720 384 0.0
.text 560432 560816 384 0.1
telink light-switch-app tlsr9518adk80d (read/write) 789000 789376 376 0.0
text 552954 553144 190 0.0
lighting-app tlsr9518adk80d (read/write) 811112 811488 376 0.0
text 571176 571366 190 0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819424 376 0.0
text 577356 577546 190 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 0bff5ad e0007b3 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 174736 174368 -368 -0.2
lock-ftd LP_CC2652R7 (read/write) 173204 172828 -376 -0.2
lock-mtd LP_CC2652R7 (read/write) 185144 184760 -384 -0.2
pump-app LP_CC2652R7 (read/write) 161872 161492 -380 -0.2
pump-controller-app LP_CC2652R7 (read/write) 177484 177104 -380 -0.2
shell LP_CC2652R7 (read/write) 186032 185656 -376 -0.2
Full report (32 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 0bff5ad e0007b3 change % change
bl602 lighting-app bl602 (read/write) 1389242 1389654 412 0.0
.bss 90729 90729 0 0.0
.data 9928 9928 0 0.0
.text 1068834 1069060 226 0.0
bl602+rpc (read/write) 1434454 1434866 412 0.0
.bss 98161 98161 0 0.0
.data 10312 10312 0 0.0
.text 1100182 1100406 224 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1188243 1188659 416 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67102 67102 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4272 4272 0 0.0
.debug_abbrev 1506865 1506865 0 0.0
.debug_aranges 133128 133128 0 0.0
.debug_frame 486580 486580 0 0.0
.debug_info 37904657 37905285 628 0.0
.debug_line 5256255 5256840 585 0.0
.debug_loc 3366594 3367112 518 0.0
.debug_ranges 359272 359368 96 0.0
.debug_str 3457767 3457811 44 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116552 116744 192 0.2
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565071 565071 0 0.0
.symtab 171664 171664 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
956804 957030 226 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1284163 1284579 416 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75150 75150 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4800 4800 0 0.0
.debug_abbrev 1644410 1644410 0 0.0
.debug_aranges 140632 140632 0 0.0
.debug_frame 511956 511956 0 0.0
.debug_info 41811270 41811898 628 0.0
.debug_line 5630790 5631375 585 0.0
.debug_loc 3559254 3559772 518 0.0
.debug_ranges 381728 381824 96 0.0
.debug_str 3853667 3853711 44 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 129944 130136 192 0.1
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 624244 624244 0 0.0
.symtab 189472 189472 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1030506 1030732 226 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 677175 368 0.1
(read/write) 174736 174368 -368 -0.2
.bss 81236 81236 0 0.0
.data 3380 3380 0 0.0
.rodata 89607 89791 184 0.2
.text 586888 587072 184 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641047 641423 376 0.1
(read/write) 158004 158004 0 0.0
.bss 80508 80508 0 0.0
.data 3380 3380 0 0.0
.rodata 78743 78927 184 0.2
.text 561984 562176 192 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675867 376 0.1
(read/write) 173204 172828 -376 -0.2
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77131 77315 184 0.2
.text 597880 598072 192 0.0
lock-mtd LP_CC2652R7 (read only) 659239 659623 384 0.1
(read/write) 185144 184760 -384 -0.2
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 102951 103135 184 0.2
.text 555808 556008 200 0.0
pump-app LP_CC2652R7 (read only) 687543 687923 380 0.1
(read/write) 161872 161492 -380 -0.2
.bss 78428 78428 0 0.0
.data 3296 3296 0 0.0
.rodata 90543 90731 188 0.2
.text 596516 596708 192 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672423 380 0.1
(read/write) 177484 177104 -380 -0.2
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86099 86287 188 0.2
.text 585464 585656 192 0.0
shell LP_CC2652R7 (read only) 667830 668206 376 0.1
(read/write) 186032 185656 -376 -0.2
.bss 83556 83556 0 0.0
.data 3376 3376 0 0.0
.rodata 86318 86502 184 0.2
.text 581196 581388 192 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587770 587914 144 0.0
.app_xip_area 464380 464524 144 0.0
.bss 65808 65808 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592026 592170 144 0.0
.app_xip_area 463316 463460 144 0.0
.bss 71120 71120 0 0.0
.data 768 768 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543586 543966 380 0.1
.app_xip_area 425252 425632 380 0.1
.bss 60800 60800 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973892 380 0.0
.bss 152252 152252 0 0.0
.data 2248 2248 0 0.0
.text 818992 819372 380 0.0
BRD4161A+rs911x (read/write) 1030736 1031128 392 0.0
.bss 186656 186656 0 0.0
.data 2092 2092 0 0.0
.text 841968 842360 392 0.0
BRD4187C (read/write) 1145476 1145876 400 0.0
.bss 138640 138640 0 0.0
.data 2596 2596 0 0.0
.text 979644 980044 400 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1157168 376 0.0
.bss 158208 158208 0 0.0
.data 2100 2100 0 0.0
.text 996460 996840 380 0.0
window-app BRD4187C (read/write) 1138912 1139312 400 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 971616 972016 400 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10429908 944 0.0
(read/write) 706321 706353 32 0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650608 650632 24 0.0
.dynamic 560 560 0 0.0
.got 13896 13896 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518004 518180 176 0.0
.text 8255412 8256164 752 0.0
thermostat-no-ble arm64 (read only) 2389468 2390428 960 0.0
(read/write) 143617 143633 16 0.0
.bss 55377 55377 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77232 77256 24 0.0
.dynamic 560 560 0 0.0
.got 5176 5176 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144244 144436 192 0.1
.text 2002336 2003088 752 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183451 368 0.0
bss 144441 144441 0 0.0
rodata 144220 144396 176 0.1
text 815516 815708 192 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1162123 356 0.0
bss 143668 143668 0 0.0
rodata 135792 135972 180 0.1
text 803412 803600 188 0.0
psoc6 all-clusters cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841968 841968 0 0.0
(read/write) 1744764 1745164 400 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1229374 1229390 16 0.0
.debug_aranges 111856 111856 0 0.0
.debug_frame 373484 373484 0 0.0
.debug_info 26830674 26831647 973 0.0
.debug_line 3671535 3672038 503 0.0
.debug_loc 3588341 3589149 808 0.0
.debug_ranges 339640 339712 72 0.0
.debug_str 3441170 3441214 44 0.0
.heap 841968 841968 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 569639 569639 0 0.0
.symtab 421184 421216 32 0.0
.text 1545000 1545400 400 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 0 0 0 0.0
(read only) 842704 842704 0 0.0
(read/write) 1687372 1687772 400 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1221173 1221189 16 0.0
.debug_aranges 111328 111328 0 0.0
.debug_frame 376564 376564 0 0.0
.debug_info 26567456 26568430 974 0.0
.debug_line 3692252 3692755 503 0.0
.debug_loc 3575978 3576786 808 0.0
.debug_ranges 338256 338328 72 0.0
.debug_str 3430183 3430227 44 0.0
.heap 842704 842704 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 533728 533728 0 0.0
.symtab 407616 407648 32 0.0
.text 1488344 1488744 400 0.0
.zero.table 8 8 0 0.0
light cy8ckit_062s2_43012 0 0 0 0.0
(read only) 850896 850896 0 0.0
(read/write) 1605900 1606292 392 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 179992 179992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1055284 1055300 16 0.0
.debug_aranges 103536 103536 0 0.0
.debug_frame 346896 346896 0 0.0
.debug_info 22031182 22032153 971 0.0
.debug_line 3262190 3262693 503 0.0
.debug_loc 3273940 3274748 808 0.0
.debug_ranges 303560 303632 72 0.0
.debug_str 3235715 3235759 44 0.0
.heap 850896 850896 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 470105 470105 0 0.0
.symtab 376064 376096 32 0.0
.text 1415064 1415456 392 0.0
.zero.table 8 8 0 0.0
lock cy8ckit_062s2_43012 0 0 0 0.0
(read only) 845880 845880 0 0.0
(read/write) 1639820 1640212 392 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184992 184992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1057410 1057426 16 0.0
.debug_aranges 103936 103936 0 0.0
.debug_frame 348788 348788 0 0.0
.debug_info 22269877 2227084 971 0.0
.debug_line 3260055 3260558 503 0.0
.debug_loc 3302533 3303341 808 0.0
.debug_ranges 305504 305576 72 0.0
.debug_str 3255229 3255273 44 0.0
.heap 845880 845880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 472512 472512 0 0.0
.symtab 377728 377760 32 0.0
.text 1443968 1444360 392 0.0
.zero.table 8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148656 376 0.0
.bss 110556 110556 0 0.0
.data 832 832 0 0.0
.text 595380 595756 376 0.1
lock-app qpg6105+debug (read/write) 1113336 1113720 384 0.0
.bss 106372 106372 0 0.0
.data 836 836 0 0.0
.text 560432 560816 384 0.1
telink light-switch-app tlsr9518adk80d (read/write) 789000 789376 376 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 552954 553144 190 0.0
lighting-app tlsr9518adk80d (read/write) 811112 811488 376 0.0
bss 73328 73328 0 0.0
noinit 43520 43520 0 0.0
text 571176 571366 190 0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819424 376 0.0
bss 74236 74236 0 0.0
noinit 43520 43520 0 0.0
text 577356 577546 190 0.0

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

PR #23062: Size comparison from 0bff5ad to 03fb7d9

Increases above 0.2%:

platform target config section 0bff5ad 03fb7d9 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 .rodata 89607 89791 184 0.2
all-clusters-minimal-app LP_CC2652R7 .rodata 78743 78927 184 0.2
lock-ftd LP_CC2652R7 .rodata 77131 77315 184 0.2
pump-app LP_CC2652R7 .rodata 90543 90731 188 0.2
pump-controller-app LP_CC2652R7 .rodata 86099 86287 188 0.2
shell LP_CC2652R7 .rodata 86318 86502 184 0.2
Increases (35 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, k32w, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 0bff5ad 03fb7d9 change % change
bl602 lighting-app bl602 (read/write) 1389242 1389654 412 0.0
.text 1068834 1069062 228 0.0
bl602+rpc (read/write) 1434454 1434866 412 0.0
.text 1100182 1100408 226 0.0
bl702 lighting-app bl702 (read/write) 1188243 1188659 416 0.0
.debug_info 37904657 37905288 631 0.0
.debug_line 5256255 5256840 585 0.0
.debug_loc 3366594 3367112 518 0.0
.debug_ranges 359272 359368 96 0.0
.debug_str 3457767 3457811 44 0.0
.rodata 116552 116744 192 0.2
.text 956804 957032 228 0.0
bl702+rpc (read/write) 1284163 1284579 416 0.0
.debug_info 41811270 41811902 632 0.0
.debug_line 5630790 5631375 585 0.0
.debug_loc 3559254 3559772 518 0.0
.debug_ranges 381728 381824 96 0.0
.debug_str 3853667 3853711 44 0.0
.rodata 129944 130136 192 0.1
.text 1030506 1030736 230 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 677175 368 0.1
.rodata 89607 89791 184 0.2
.text 586888 587072 184 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641047 641423 376 0.1
.rodata 78743 78927 184 0.2
.text 561984 562176 192 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675867 376 0.1
.rodata 77131 77315 184 0.2
.text 597880 598072 192 0.0
lock-mtd LP_CC2652R7 (read only) 659239 659623 384 0.1
.rodata 102951 103135 184 0.2
.text 555808 556008 200 0.0
pump-app LP_CC2652R7 (read only) 687543 687923 380 0.1
.rodata 90543 90731 188 0.2
.text 596516 596708 192 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672423 380 0.1
.rodata 86099 86287 188 0.2
.text 585464 585656 192 0.0
shell LP_CC2652R7 (read only) 667830 668206 376 0.1
.rodata 86318 86502 184 0.2
.text 581196 581388 192 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587770 587914 144 0.0
.app_xip_area 464380 464524 144 0.0
lock cyw930739m2evb_01 (read/write) 592026 592170 144 0.0
.app_xip_area 463316 463460 144 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543586 543966 380 0.1
.app_xip_area 425252 425632 380 0.1
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973876 364 0.0
.text 818992 819356 364 0.0
BRD4161A+rs911x (read/write) 1030736 1031128 392 0.0
.text 841968 842360 392 0.0
BRD4187C (read/write) 1145476 1145876 400 0.0
.text 979644 980044 400 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1157168 376 0.0
.text 996460 996840 380 0.0
window-app BRD4187C (read/write) 1138912 1139312 400 0.0
.text 971616 972016 400 0.0
k32w contact k32w0+release (read/write) 665944 666088 144 0.0
.text 567676 567820 144 0.0
light k32w0+release (read/write) 641620 641812 192 0.0
.text 562004 562196 192 0.0
lock k32w0+release (read/write) 632948 633092 144 0.0
.text 552540 552684 144 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10429908 944 0.0
(read/write) 706321 706353 32 0.0
.data.rel.ro 650608 650632 24 0.0
.rodata 518004 518180 176 0.0
.text 8255412 8256164 752 0.0
thermostat-no-ble arm64 (read only) 2389468 2390428 960 0.0
(read/write) 143617 143633 16 0.0
.data.rel.ro 77232 77256 24 0.0
.rodata 144244 144436 192 0.1
.text 2002336 2003088 752 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183451 368 0.0
rodata 144220 144396 176 0.1
text 815516 815708 192 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1162123 356 0.0
rodata 135792 135972 180 0.1
text 803412 803600 188 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1744764 1745164 400 0.0
.debug_abbrev 1229374 1229390 16 0.0
.debug_info 26830674 26831649 975 0.0
.debug_line 3671535 3672038 503 0.0
.debug_loc 3588341 3589149 808 0.0
.debug_ranges 339640 339712 72 0.0
.debug_str 3441170 3441214 44 0.0
.symtab 421184 421216 32 0.0
.text 1545000 1545400 400 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read/write) 1687372 1687772 400 0.0
.debug_abbrev 1221173 1221189 16 0.0
.debug_info 26567456 26568431 975 0.0
.debug_line 3692252 3692755 503 0.0
.debug_loc 3575978 3576786 808 0.0
.debug_ranges 338256 338328 72 0.0
.debug_str 3430183 3430227 44 0.0
.symtab 407616 407648 32 0.0
.text 1488344 1488744 400 0.0
light cy8ckit_062s2_43012 (read/write) 1605900 1606292 392 0.0
.debug_abbrev 1055284 1055300 16 0.0
.debug_info 22031182 22032155 973 0.0
.debug_line 3262190 3262693 503 0.0
.debug_loc 3273940 3274748 808 0.0
.debug_ranges 303560 303632 72 0.0
.debug_str 3235715 3235759 44 0.0
.symtab 376064 376096 32 0.0
.text 1415064 1415456 392 0.0
lock cy8ckit_062s2_43012 (read/write) 1639820 1640212 392 0.0
.debug_abbrev 1057410 1057426 16 0.0
.debug_info 22269877 22270852 975 0.0
.debug_line 3260055 3260558 503 0.0
.debug_loc 3302533 3303341 808 0.0
.debug_ranges 305504 305576 72 0.0
.debug_str 3255229 3255273 44 0.0
.symtab 377728 377760 32 0.0
.text 1443968 1444360 392 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148656 376 0.0
.text 595380 595756 376 0.1
lock-app qpg6105+debug (read/write) 1113336 1113720 384 0.0
.text 560432 560816 384 0.1
telink light-switch-app tlsr9518adk80d (read/write) 789000 789376 376 0.0
text 552954 553144 190 0.0
lighting-app tlsr9518adk80d (read/write) 811112 811488 376 0.0
text 571176 571366 190 0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819424 376 0.0
text 577356 577548 192 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 0bff5ad 03fb7d9 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 174736 174368 -368 -0.2
lock-ftd LP_CC2652R7 (read/write) 173204 172828 -376 -0.2
lock-mtd LP_CC2652R7 (read/write) 185144 184760 -384 -0.2
pump-app LP_CC2652R7 (read/write) 161872 161492 -380 -0.2
pump-controller-app LP_CC2652R7 (read/write) 177484 177104 -380 -0.2
shell LP_CC2652R7 (read/write) 186032 185656 -376 -0.2
Full report (35 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, k32w, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 0bff5ad 03fb7d9 change % change
bl602 lighting-app bl602 (read/write) 1389242 1389654 412 0.0
.bss 90729 90729 0 0.0
.data 9928 9928 0 0.0
.text 1068834 1069062 228 0.0
bl602+rpc (read/write) 1434454 1434866 412 0.0
.bss 98161 98161 0 0.0
.data 10312 10312 0 0.0
.text 1100182 1100408 226 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1188243 1188659 416 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67102 67102 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4272 4272 0 0.0
.debug_abbrev 1506865 1506865 0 0.0
.debug_aranges 133128 133128 0 0.0
.debug_frame 486580 486580 0 0.0
.debug_info 37904657 37905288 631 0.0
.debug_line 5256255 5256840 585 0.0
.debug_loc 3366594 3367112 518 0.0
.debug_ranges 359272 359368 96 0.0
.debug_str 3457767 3457811 44 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116552 116744 192 0.2
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565071 565071 0 0.0
.symtab 171664 171664 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
956804 957032 228 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1284163 1284579 416 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75150 75150 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4800 4800 0 0.0
.debug_abbrev 1644410 1644410 0 0.0
.debug_aranges 140632 140632 0 0.0
.debug_frame 511956 511956 0 0.0
.debug_info 41811270 41811902 632 0.0
.debug_line 5630790 5631375 585 0.0
.debug_loc 3559254 3559772 518 0.0
.debug_ranges 381728 381824 96 0.0
.debug_str 3853667 3853711 44 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 129944 130136 192 0.1
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 624244 624244 0 0.0
.symtab 189472 189472 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1030506 1030736 230 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 677175 368 0.1
(read/write) 174736 174368 -368 -0.2
.bss 81236 81236 0 0.0
.data 3380 3380 0 0.0
.rodata 89607 89791 184 0.2
.text 586888 587072 184 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641047 641423 376 0.1
(read/write) 158004 158004 0 0.0
.bss 80508 80508 0 0.0
.data 3380 3380 0 0.0
.rodata 78743 78927 184 0.2
.text 561984 562176 192 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675867 376 0.1
(read/write) 173204 172828 -376 -0.2
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77131 77315 184 0.2
.text 597880 598072 192 0.0
lock-mtd LP_CC2652R7 (read only) 659239 659623 384 0.1
(read/write) 185144 184760 -384 -0.2
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 102951 103135 184 0.2
.text 555808 556008 200 0.0
pump-app LP_CC2652R7 (read only) 687543 687923 380 0.1
(read/write) 161872 161492 -380 -0.2
.bss 78428 78428 0 0.0
.data 3296 3296 0 0.0
.rodata 90543 90731 188 0.2
.text 596516 596708 192 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672423 380 0.1
(read/write) 177484 177104 -380 -0.2
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86099 86287 188 0.2
.text 585464 585656 192 0.0
shell LP_CC2652R7 (read only) 667830 668206 376 0.1
(read/write) 186032 185656 -376 -0.2
.bss 83556 83556 0 0.0
.data 3376 3376 0 0.0
.rodata 86318 86502 184 0.2
.text 581196 581388 192 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587770 587914 144 0.0
.app_xip_area 464380 464524 144 0.0
.bss 65808 65808 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592026 592170 144 0.0
.app_xip_area 463316 463460 144 0.0
.bss 71120 71120 0 0.0
.data 768 768 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543586 543966 380 0.1
.app_xip_area 425252 425632 380 0.1
.bss 60800 60800 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973876 364 0.0
.bss 152252 152252 0 0.0
.data 2248 2248 0 0.0
.text 818992 819356 364 0.0
BRD4161A+rs911x (read/write) 1030736 1031128 392 0.0
.bss 186656 186656 0 0.0
.data 2092 2092 0 0.0
.text 841968 842360 392 0.0
BRD4187C (read/write) 1145476 1145876 400 0.0
.bss 138640 138640 0 0.0
.data 2596 2596 0 0.0
.text 979644 980044 400 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1157168 376 0.0
.bss 158208 158208 0 0.0
.data 2100 2100 0 0.0
.text 996460 996840 380 0.0
window-app BRD4187C (read/write) 1138912 1139312 400 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 971616 972016 400 0.0
k32w contact k32w0+release (read/write) 665944 666088 144 0.0
.bss 77048 77048 0 0.0
.data 2108 2108 0 0.0
.text 567676 567820 144 0.0
light k32w0+release (read/write) 641620 641812 192 0.0
.bss 74824 74824 0 0.0
.data 2064 2064 0 0.0
.text 562004 562196 192 0.0
lock k32w0+release (read/write) 632948 633092 144 0.0
.bss 75600 75600 0 0.0
.data 2080 2080 0 0.0
.text 552540 552684 144 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10429908 944 0.0
(read/write) 706321 706353 32 0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650608 650632 24 0.0
.dynamic 560 560 0 0.0
.got 13896 13896 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518004 518180 176 0.0
.text 8255412 8256164 752 0.0
thermostat-no-ble arm64 (read only) 2389468 2390428 960 0.0
(read/write) 143617 143633 16 0.0
.bss 55377 55377 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77232 77256 24 0.0
.dynamic 560 560 0 0.0
.got 5176 5176 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144244 144436 192 0.1
.text 2002336 2003088 752 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183451 368 0.0
bss 144441 144441 0 0.0
rodata 144220 144396 176 0.1
text 815516 815708 192 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1162123 356 0.0
bss 143668 143668 0 0.0
rodata 135792 135972 180 0.1
text 803412 803600 188 0.0
psoc6 all-clusters cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841968 841968 0 0.0
(read/write) 1744764 1745164 400 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1229374 1229390 16 0.0
.debug_aranges 111856 111856 0 0.0
.debug_frame 373484 373484 0 0.0
.debug_info 26830674 26831649 975 0.0
.debug_line 3671535 3672038 503 0.0
.debug_loc 3588341 3589149 808 0.0
.debug_ranges 339640 339712 72 0.0
.debug_str 3441170 3441214 44 0.0
.heap 841968 841968 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 569639 569639 0 0.0
.symtab 421184 421216 32 0.0
.text 1545000 1545400 400 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 0 0 0 0.0
(read only) 842704 842704 0 0.0
(read/write) 1687372 1687772 400 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1221173 1221189 16 0.0
.debug_aranges 111328 111328 0 0.0
.debug_frame 376564 376564 0 0.0
.debug_info 26567456 26568431 975 0.0
.debug_line 3692252 3692755 503 0.0
.debug_loc 3575978 3576786 808 0.0
.debug_ranges 338256 338328 72 0.0
.debug_str 3430183 3430227 44 0.0
.heap 842704 842704 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 533728 533728 0 0.0
.symtab 407616 407648 32 0.0
.text 1488344 1488744 400 0.0
.zero.table 8 8 0 0.0
light cy8ckit_062s2_43012 0 0 0 0.0
(read only) 850896 850896 0 0.0
(read/write) 1605900 1606292 392 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 179992 179992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1055284 1055300 16 0.0
.debug_aranges 103536 103536 0 0.0
.debug_frame 346896 346896 0 0.0
.debug_info 22031182 22032155 973 0.0
.debug_line 3262190 3262693 503 0.0
.debug_loc 3273940 3274748 808 0.0
.debug_ranges 303560 303632 72 0.0
.debug_str 3235715 3235759 44 0.0
.heap 850896 850896 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 470105 470105 0 0.0
.symtab 376064 376096 32 0.0
.text 1415064 1415456 392 0.0
.zero.table 8 8 0 0.0
lock cy8ckit_062s2_43012 0 0 0 0.0
(read only) 845880 845880 0 0.0
(read/write) 1639820 1640212 392 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184992 184992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1057410 1057426 16 0.0
.debug_aranges 103936 103936 0 0.0
.debug_frame 348788 348788 0 0.0
.debug_info 22269877 22270852 975 0.0
.debug_line 3260055 3260558 503 0.0
.debug_loc 3302533 3303341 808 0.0
.debug_ranges 305504 305576 72 0.0
.debug_str 3255229 3255273 44 0.0
.heap 845880 845880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 472512 472512 0 0.0
.symtab 377728 377760 32 0.0
.text 1443968 1444360 392 0.0
.zero.table 8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148656 376 0.0
.bss 110556 110556 0 0.0
.data 832 832 0 0.0
.text 595380 595756 376 0.1
lock-app qpg6105+debug (read/write) 1113336 1113720 384 0.0
.bss 106372 106372 0 0.0
.data 836 836 0 0.0
.text 560432 560816 384 0.1
telink light-switch-app tlsr9518adk80d (read/write) 789000 789376 376 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 552954 553144 190 0.0
lighting-app tlsr9518adk80d (read/write) 811112 811488 376 0.0
bss 73328 73328 0 0.0
noinit 43520 43520 0 0.0
text 571176 571366 190 0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819424 376 0.0
bss 74236 74236 0 0.0
noinit 43520 43520 0 0.0
text 577356 577548 192 0.0

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

PR #23062: Size comparison from 0bff5ad to 1029f85

Increases (37 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 0bff5ad 1029f85 change % change
bl602 lighting-app bl602 (read/write) 1389242 1389654 412 0.0
.text 1068834 1069062 228 0.0
bl602+rpc (read/write) 1434454 1434874 420 0.0
.text 1100182 1100410 228 0.0
bl702 lighting-app bl702 (read/write) 1188243 1188659 416 0.0
.debug_info 37904657 37905288 631 0.0
.debug_line 5256255 5256840 585 0.0
.debug_loc 3366594 3367112 518 0.0
.debug_ranges 359272 359368 96 0.0
.debug_str 3457767 3457811 44 0.0
.rodata 116552 116744 192 0.2
.text 956804 957032 228 0.0
bl702+rpc (read/write) 1284163 1284579 416 0.0
.debug_info 41811270 41811902 632 0.0
.debug_line 5630790 5631375 585 0.0
.debug_loc 3559254 3559772 518 0.0
.debug_ranges 381728 381824 96 0.0
.debug_str 3853667 3853711 44 0.0
.rodata 129944 130136 192 0.1
.text 1030506 1030736 230 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 677175 368 0.1
.rodata 89607 89791 184 0.2
.text 586888 587072 184 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641047 641423 376 0.1
.rodata 78743 78927 184 0.2
.text 561984 562176 192 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675867 376 0.1
.rodata 77131 77315 184 0.2
.text 597880 598072 192 0.0
lock-mtd LP_CC2652R7 (read only) 659239 659623 384 0.1
.rodata 102951 103135 184 0.2
.text 555808 556008 200 0.0
pump-app LP_CC2652R7 (read only) 687543 687923 380 0.1
.rodata 90543 90731 188 0.2
.text 596516 596708 192 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672423 380 0.1
.rodata 86099 86287 188 0.2
.text 585464 585656 192 0.0
shell LP_CC2652R7 (read only) 667830 668206 376 0.1
.rodata 86318 86502 184 0.2
.text 581196 581388 192 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587770 587914 144 0.0
.app_xip_area 464380 464524 144 0.0
lock cyw930739m2evb_01 (read/write) 592026 592170 144 0.0
.app_xip_area 463316 463460 144 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543586 543966 380 0.1
.app_xip_area 425252 425632 380 0.1
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973892 380 0.0
.text 818992 819372 380 0.0
BRD4161A+rs911x (read/write) 1030736 1031128 392 0.0
.text 841968 842360 392 0.0
BRD4187C (read/write) 1145476 1145876 400 0.0
.text 979644 980044 400 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1157168 376 0.0
.text 996460 996840 380 0.0
window-app BRD4187C (read/write) 1138912 1139312 400 0.0
.text 971616 972016 400 0.0
esp32 all-clusters-app c3devkit (read only) 1223172 1223346 174 0.0
(read/write) 1788126 1788302 176 0.0
.flash.rodata 257696 257872 176 0.1
.flash.text 1223172 1223346 174 0.0
m5stack (read only) 1233187 1233411 224 0.0
(read/write) 564020 564204 184 0.0
.flash.rodata 314744 314928 184 0.1
.flash.text 1227803 1228027 224 0.0
k32w contact k32w0+release (read/write) 665944 666088 144 0.0
.text 567676 567820 144 0.0
light k32w0+release (read/write) 641620 641812 192 0.0
.text 562004 562196 192 0.0
lock k32w0+release (read/write) 632948 633092 144 0.0
.text 552540 552684 144 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10429908 944 0.0
(read/write) 706321 706353 32 0.0
.data.rel.ro 650608 650632 24 0.0
.rodata 518004 518180 176 0.0
.text 8255412 8256164 752 0.0
thermostat-no-ble arm64 (read only) 2389468 2390428 960 0.0
(read/write) 143617 143633 16 0.0
.data.rel.ro 77232 77256 24 0.0
.rodata 144244 144436 192 0.1
.text 2002336 2003088 752 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183451 368 0.0
rodata 144220 144396 176 0.1
text 815516 815708 192 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1162123 356 0.0
rodata 135792 135972 180 0.1
text 803412 803600 188 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1744764 1745164 400 0.0
.debug_abbrev 1229374 1229390 16 0.0
.debug_info 26830674 26831650 976 0.0
.debug_line 3671535 3672038 503 0.0
.debug_loc 3588341 3589149 808 0.0
.debug_ranges 339640 339712 72 0.0
.debug_str 3441170 3441214 44 0.0
.symtab 421184 421216 32 0.0
.text 1545000 1545400 400 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read/write) 1687372 1687772 400 0.0
.debug_abbrev 1221173 1221189 16 0.0
.debug_info 26567456 26568432 976 0.0
.debug_line 3692252 3692755 503 0.0
.debug_loc 3575978 3576786 808 0.0
.debug_ranges 338256 338328 72 0.0
.debug_str 3430183 3430227 44 0.0
.symtab 407616 407648 32 0.0
.text 1488344 1488744 400 0.0
light cy8ckit_062s2_43012 (read/write) 1605900 1606292 392 0.0
.debug_abbrev 1055284 1055300 16 0.0
.debug_info 22031182 22032155 973 0.0
.debug_line 3262190 3262693 503 0.0
.debug_loc 3273940 3274748 808 0.0
.debug_ranges 303560 303632 72 0.0
.debug_str 3235715 3235759 44 0.0
.symtab 376064 376096 32 0.0
.text 1415064 1415456 392 0.0
lock cy8ckit_062s2_43012 (read/write) 1639820 1640212 392 0.0
.debug_abbrev 1057410 1057426 16 0.0
.debug_info 22269877 22270851 974 0.0
.debug_line 3260055 3260558 503 0.0
.debug_loc 3302533 3303341 808 0.0
.debug_ranges 305504 305576 72 0.0
.debug_str 3255229 3255273 44 0.0
.symtab 377728 377760 32 0.0
.text 1443968 1444360 392 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148648 368 0.0
.text 595380 595748 368 0.1
lock-app qpg6105+debug (read/write) 1113336 1113720 384 0.0
.text 560432 560816 384 0.1
telink light-switch-app tlsr9518adk80d (read/write) 789000 789376 376 0.0
text 552954 553144 190 0.0
lighting-app tlsr9518adk80d (read/write) 811112 811488 376 0.0
text 571176 571366 190 0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819424 376 0.0
text 577356 577550 194 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 0bff5ad 1029f85 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 174736 174368 -368 -0.2
lock-ftd LP_CC2652R7 (read/write) 173204 172828 -376 -0.2
lock-mtd LP_CC2652R7 (read/write) 185144 184760 -384 -0.2
pump-app LP_CC2652R7 (read/write) 161872 161492 -380 -0.2
pump-controller-app LP_CC2652R7 (read/write) 177484 177104 -380 -0.2
shell LP_CC2652R7 (read/write) 186032 185656 -376 -0.2
Full report (37 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, psoc6, qpg, telink)
platform target config section 0bff5ad 1029f85 change % change
bl602 lighting-app bl602 (read/write) 1389242 1389654 412 0.0
.bss 90729 90729 0 0.0
.data 9928 9928 0 0.0
.text 1068834 1069062 228 0.0
bl602+rpc (read/write) 1434454 1434874 420 0.0
.bss 98161 98161 0 0.0
.data 10312 10312 0 0.0
.text 1100182 1100410 228 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1188243 1188659 416 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67102 67102 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4272 4272 0 0.0
.debug_abbrev 1506865 1506865 0 0.0
.debug_aranges 133128 133128 0 0.0
.debug_frame 486580 486580 0 0.0
.debug_info 37904657 37905288 631 0.0
.debug_line 5256255 5256840 585 0.0
.debug_loc 3366594 3367112 518 0.0
.debug_ranges 359272 359368 96 0.0
.debug_str 3457767 3457811 44 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116552 116744 192 0.2
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565071 565071 0 0.0
.symtab 171664 171664 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
956804 957032 228 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1284163 1284579 416 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75150 75150 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4800 4800 0 0.0
.debug_abbrev 1644410 1644410 0 0.0
.debug_aranges 140632 140632 0 0.0
.debug_frame 511956 511956 0 0.0
.debug_info 41811270 41811902 632 0.0
.debug_line 5630790 5631375 585 0.0
.debug_loc 3559254 3559772 518 0.0
.debug_ranges 381728 381824 96 0.0
.debug_str 3853667 3853711 44 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 129944 130136 192 0.1
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 624244 624244 0 0.0
.symtab 189472 189472 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1030506 1030736 230 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 676807 677175 368 0.1
(read/write) 174736 174368 -368 -0.2
.bss 81236 81236 0 0.0
.data 3380 3380 0 0.0
.rodata 89607 89791 184 0.2
.text 586888 587072 184 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641047 641423 376 0.1
(read/write) 158004 158004 0 0.0
.bss 80508 80508 0 0.0
.data 3380 3380 0 0.0
.rodata 78743 78927 184 0.2
.text 561984 562176 192 0.0
lock-ftd LP_CC2652R7 (read only) 675491 675867 376 0.1
(read/write) 173204 172828 -376 -0.2
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77131 77315 184 0.2
.text 597880 598072 192 0.0
lock-mtd LP_CC2652R7 (read only) 659239 659623 384 0.1
(read/write) 185144 184760 -384 -0.2
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 102951 103135 184 0.2
.text 555808 556008 200 0.0
pump-app LP_CC2652R7 (read only) 687543 687923 380 0.1
(read/write) 161872 161492 -380 -0.2
.bss 78428 78428 0 0.0
.data 3296 3296 0 0.0
.rodata 90543 90731 188 0.2
.text 596516 596708 192 0.0
pump-controller-app LP_CC2652R7 (read only) 672043 672423 380 0.1
(read/write) 177484 177104 -380 -0.2
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86099 86287 188 0.2
.text 585464 585656 192 0.0
shell LP_CC2652R7 (read only) 667830 668206 376 0.1
(read/write) 186032 185656 -376 -0.2
.bss 83556 83556 0 0.0
.data 3376 3376 0 0.0
.rodata 86318 86502 184 0.2
.text 581196 581388 192 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587770 587914 144 0.0
.app_xip_area 464380 464524 144 0.0
.bss 65808 65808 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592026 592170 144 0.0
.app_xip_area 463316 463460 144 0.0
.bss 71120 71120 0 0.0
.data 768 768 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543586 543966 380 0.1
.app_xip_area 425252 425632 380 0.1
.bss 60800 60800 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 973512 973892 380 0.0
.bss 152252 152252 0 0.0
.data 2248 2248 0 0.0
.text 818992 819372 380 0.0
BRD4161A+rs911x (read/write) 1030736 1031128 392 0.0
.bss 186656 186656 0 0.0
.data 2092 2092 0 0.0
.text 841968 842360 392 0.0
BRD4187C (read/write) 1145476 1145876 400 0.0
.bss 138640 138640 0 0.0
.data 2596 2596 0 0.0
.text 979644 980044 400 0.0
lock-app BRD4161A+wf200 (read/write) 1156792 1157168 376 0.0
.bss 158208 158208 0 0.0
.data 2100 2100 0 0.0
.text 996460 996840 380 0.0
window-app BRD4187C (read/write) 1138912 1139312 400 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 971616 972016 400 0.0
esp32 all-clusters-app c3devkit (read only) 1223172 1223346 174 0.0
(read/write) 1788126 1788302 176 0.0
.dram0.bss 76944 76944 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 257696 257872 176 0.1
.flash.text 1223172 1223346 174 0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1233187 1233411 224 0.0
(read/write) 564020 564204 184 0.0
.dram0.bss 82312 82312 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 314744 314928 184 0.1
.flash.text 1227803 1228027 224 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 665944 666088 144 0.0
.bss 77048 77048 0 0.0
.data 2108 2108 0 0.0
.text 567676 567820 144 0.0
light k32w0+release (read/write) 641620 641812 192 0.0
.bss 74824 74824 0 0.0
.data 2064 2064 0 0.0
.text 562004 562196 192 0.0
lock k32w0+release (read/write) 632948 633092 144 0.0
.bss 75600 75600 0 0.0
.data 2080 2080 0 0.0
.text 552540 552684 144 0.0
linux chip-tool-ipv6only arm64 (read only) 10428964 10429908 944 0.0
(read/write) 706321 706353 32 0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650608 650632 24 0.0
.dynamic 560 560 0 0.0
.got 13896 13896 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518004 518180 176 0.0
.text 8255412 8256164 752 0.0
thermostat-no-ble arm64 (read only) 2389468 2390428 960 0.0
(read/write) 143617 143633 16 0.0
.bss 55377 55377 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77232 77256 24 0.0
.dynamic 560 560 0 0.0
.got 5176 5176 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144244 144436 192 0.1
.text 2002336 2003088 752 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1183083 1183451 368 0.0
bss 144441 144441 0 0.0
rodata 144220 144396 176 0.1
text 815516 815708 192 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1161767 1162123 356 0.0
bss 143668 143668 0 0.0
rodata 135792 135972 180 0.1
text 803412 803600 188 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841968 841968 0 0.0
(read/write) 1744764 1745164 400 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1229374 1229390 16 0.0
.debug_aranges 111856 111856 0 0.0
.debug_frame 373484 373484 0 0.0
.debug_info 26830674 26831650 976 0.0
.debug_line 3671535 3672038 503 0.0
.debug_loc 3588341 3589149 808 0.0
.debug_ranges 339640 339712 72 0.0
.debug_str 3441170 3441214 44 0.0
.heap 841968 841968 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 569639 569639 0 0.0
.symtab 421184 421216 32 0.0
.text 1545000 1545400 400 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842704 842704 0 0.0
(read/write) 1687372 1687772 400 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1221173 1221189 16 0.0
.debug_aranges 111328 111328 0 0.0
.debug_frame 376564 376564 0 0.0
.debug_info 26567456 26568432 976 0.0
.debug_line 3692252 3692755 503 0.0
.debug_loc 3575978 3576786 808 0.0
.debug_ranges 338256 338328 72 0.0
.debug_str 3430183 3430227 44 0.0
.heap 842704 842704 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 533728 533728 0 0.0
.symtab 407616 407648 32 0.0
.text 1488344 1488744 400 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850896 850896 0 0.0
(read/write) 1605900 1606292 392 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 179992 179992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1055284 1055300 16 0.0
.debug_aranges 103536 103536 0 0.0
.debug_frame 346896 346896 0 0.0
.debug_info 22031182 22032155 973 0.0
.debug_line 3262190 3262693 503 0.0
.debug_loc 3273940 3274748 808 0.0
.debug_ranges 303560 303632 72 0.0
.debug_str 3235715 3235759 44 0.0
.heap 850896 850896 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 470105 470105 0 0.0
.symtab 376064 376096 32 0.0
.text 1415064 1415456 392 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845880 845880 0 0.0
(read/write) 1639820 1640212 392 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184992 184992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1057410 1057426 16 0.0
.debug_aranges 103936 103936 0 0.0
.debug_frame 348788 348788 0 0.0
.debug_info 22269877 22270851 974 0.0
.debug_line 3260055 3260558 503 0.0
.debug_loc 3302533 3303341 808 0.0
.debug_ranges 305504 305576 72 0.0
.debug_str 3255229 3255273 44 0.0
.heap 845880 845880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 472512 472512 0 0.0
.symtab 377728 377760 32 0.0
.text 1443968 1444360 392 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148280 1148648 368 0.0
.bss 110556 110556 0 0.0
.data 832 832 0 0.0
.text 595380 595748 368 0.1
lock-app qpg6105+debug (read/write) 1113336 1113720 384 0.0
.bss 106372 106372 0 0.0
.data 836 836 0 0.0
.text 560432 560816 384 0.1
telink light-switch-app tlsr9518adk80d (read/write) 789000 789376 376 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 552954 553144 190 0.0
lighting-app tlsr9518adk80d (read/write) 811112 811488 376 0.0
bss 73328 73328 0 0.0
noinit 43520 43520 0 0.0
text 571176 571366 190 0.0
ota-requestor-app tlsr9518adk80d (read/write) 819048 819424 376 0.0
bss 74236 74236 0 0.0
noinit 43520 43520 0 0.0
text 577356 577550 194 0.0

Copy link

@wbschiller wbschiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@msandstedt msandstedt merged commit f6d585a into project-chip:master Oct 10, 2022
NL_TEST_ASSERT(inSuite, vector.cats.values[1] == outCats.values[1]);
NL_TEST_ASSERT(inSuite, vector.cats.values[2] == outCats.values[2]);

// Validate retreiveal by resumption ID.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"retrieval"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR here: #23110.

msandstedt added a commit to msandstedt/connectedhomeip that referenced this pull request Oct 11, 2022
Apply suggestions per bzbarsky-apple
andy31415 pushed a commit that referenced this pull request Oct 11, 2022
Apply suggestions per bzbarsky-apple
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Oct 12, 2022
msandstedt added a commit to msandstedt/connectedhomeip that referenced this pull request Oct 13, 2022
…3062)

Nodes that already exist in the DefaultSessionResumptionStorage index
are consuming additional entries in the index on save, and aren't
cleaned from the link and state tables first.  This has the following
consequences:

1. If session resumption storage is full, this causes unnecessary
   eviction of records for other nodes.
2. This pulls the index out of sync from the backing state table
   because duplicate entries in the index for a given node only
   map to a single node-id-keyed entry in the state table.
3. An entry in the link table is leaked on each occurrence, as the
   resumption-id-keyed link entry will be orphaned once its associated
   state table entry is overwritten.

A symptom of this can be seen in the DeleteAll(FabricIndex fabricIndex)
method, which will often log errors due to the index being out of sync
form the state table.

This commit fixes the problem by first deleting the link table entry
before saving a record for a node that already exists in the table.
Save is also simplified in this case by not rewriting the index, as
the node is already in the index.

To prevent future problems, unit test code has been added for
DefaultSessionResumptionStorage to verify that DeleteAll is completing
without errors and that no link or state table entries are leaked.

(cherry picked from commit f6d585a)
msandstedt added a commit to msandstedt/connectedhomeip that referenced this pull request Oct 13, 2022
)

Apply suggestions per bzbarsky-apple

(cherry picked from commit 2a1cf85)
tima-q pushed a commit to Qorvo/connectedhomeip that referenced this pull request Oct 13, 2022
…3062)

Nodes that already exist in the DefaultSessionResumptionStorage index
are consuming additional entries in the index on save, and aren't
cleaned from the link and state tables first.  This has the following
consequences:

1. If session resumption storage is full, this causes unnecessary
   eviction of records for other nodes.
2. This pulls the index out of sync from the backing state table
   because duplicate entries in the index for a given node only
   map to a single node-id-keyed entry in the state table.
3. An entry in the link table is leaked on each occurrence, as the 
   resumption-id-keyed link entry will be orphaned once its associated
   state table entry is overwritten.

A symptom of this can be seen in the DeleteAll(FabricIndex fabricIndex)
method, which will often log errors due to the index being out of sync
form the state table.

This commit fixes the problem by first deleting the link table entry
before saving a record for a node that already exists in the table.
Save is also simplified in this case by not rewriting the index, as
the node is already in the index.

To prevent future problems, unit test code has been added for 
DefaultSessionResumptionStorage to verify that DeleteAll is completing
without errors and that no link or state table entries are leaked.
dvdm-qorvo pushed a commit to Qorvo/connectedhomeip that referenced this pull request Oct 13, 2022
…3062)

Nodes that already exist in the DefaultSessionResumptionStorage index
are consuming additional entries in the index on save, and aren't
cleaned from the link and state tables first.  This has the following
consequences:

1. If session resumption storage is full, this causes unnecessary
   eviction of records for other nodes.
2. This pulls the index out of sync from the backing state table
   because duplicate entries in the index for a given node only
   map to a single node-id-keyed entry in the state table.
3. An entry in the link table is leaked on each occurrence, as the 
   resumption-id-keyed link entry will be orphaned once its associated
   state table entry is overwritten.

A symptom of this can be seen in the DeleteAll(FabricIndex fabricIndex)
method, which will often log errors due to the index being out of sync
form the state table.

This commit fixes the problem by first deleting the link table entry
before saving a record for a node that already exists in the table.
Save is also simplified in this case by not rewriting the index, as
the node is already in the index.

To prevent future problems, unit test code has been added for 
DefaultSessionResumptionStorage to verify that DeleteAll is completing
without errors and that no link or state table entries are leaked.
andy31415 pushed a commit that referenced this pull request Oct 13, 2022
* Fix in-place save for DefaultSessionResumptionStorage (#23062)

Nodes that already exist in the DefaultSessionResumptionStorage index
are consuming additional entries in the index on save, and aren't
cleaned from the link and state tables first.  This has the following
consequences:

1. If session resumption storage is full, this causes unnecessary
   eviction of records for other nodes.
2. This pulls the index out of sync from the backing state table
   because duplicate entries in the index for a given node only
   map to a single node-id-keyed entry in the state table.
3. An entry in the link table is leaked on each occurrence, as the
   resumption-id-keyed link entry will be orphaned once its associated
   state table entry is overwritten.

A symptom of this can be seen in the DeleteAll(FabricIndex fabricIndex)
method, which will often log errors due to the index being out of sync
form the state table.

This commit fixes the problem by first deleting the link table entry
before saving a record for a node that already exists in the table.
Save is also simplified in this case by not rewriting the index, as
the node is already in the index.

To prevent future problems, unit test code has been added for
DefaultSessionResumptionStorage to verify that DeleteAll is completing
without errors and that no link or state table entries are leaked.

(cherry picked from commit f6d585a)

* Minor style and comment fixes for #23062 (#23110)

Apply suggestions per bzbarsky-apple

(cherry picked from commit 2a1cf85)
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.

[BUG] DefaultSessionResumptionStorage::Save does not reuse index locations to save data for the same node
6 participants