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 missing endWork calls in MTRClusters. #23659

Conversation

bzbarsky-apple
Copy link
Contributor

We were missing endWork bits for command invokes when the command has a data (not status) response. This would end up permanently blocking the MTRDevice's work queue once such a command (e.g. UpdateFabricLabel) was issued.

The changes here are as follows:

  1. Rearrange the logic in MTRClusters-src.zapt so that the endWork happens
    regardless of whether hasSpecificResponse is true.
  2. Add a deprecation message to the timedInvokeTimeoutMs field in response
    command params, since that should never be used (ran into this when writing
    the tests for this PR).
  3. Set resubscribeIfLost to NO on various subscriptions in MTRDeviceTests, so if
    another test takes a while we don't fail due to the canceled subscriptions
    re-subscribing and over-fullfilling the subscription expectations.
  4. Add a test for a mix of passing and failing commands on MTRCluster instances,
    with some of the commands defined as getting status-only responses and some
    defined as getting data responses. This test fails without the endWork fix.

We were missing endWork bits for command invokes when the command has a data
(not status) response.  This would end up permanently blocking the MTRDevice's
work queue once such a command (e.g. UpdateFabricLabel) was issued.

The changes here are as follows:

1) Rearrange the logic in MTRClusters-src.zapt so that the endWork happens
   regardless of whether hasSpecificResponse is true.
2) Add a deprecation message to the timedInvokeTimeoutMs field in _response_
   command params, since that should never be used (ran into this when writing
   the tests for this PR).
3) Set resubscribeIfLost to NO on various subscriptions in MTRDeviceTests, so if
   another test takes a while we don't fail due to the canceled subscriptions
   re-subscribing and over-fullfilling the subscription expectations.
4) Add a test for a mix of passing and failing commands on MTRCluster instances,
   with some of the commands defined as getting status-only responses and some
   defined as getting data responses.  This test fails without the endWork fix.
@github-actions
Copy link

github-actions bot commented Nov 17, 2022

PR #23659: Size comparison from 80f7dcd to 203640c

Increases (7 builds for bl602, cc13x2_26x2, nrfconnect, psoc6, telink)
platform target config section 80f7dcd 203640c change % change
bl602 lighting-app bl602 .text 1059786 1059788 2 0.0
cc13x2_26x2 pump-controller-app LP_CC2652R7 (read only) 673411 673419 8 0.0
.text 586584 586592 8 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 817328 817332 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167659 1167675 16 0.0
text 805878 805882 4 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 27027690 27027691 1 0.0
telink all-clusters-app tlsr9518adk80d text 649088 649090 2 0.0
lighting-app tlsr9518adk80d (read/write) 875372 875380 8 0.0
text 624500 624502 2 0.0
Decreases (7 builds for bl602, bl702, cc13x2_26x2, esp32, psoc6, telink)
platform target config section 80f7dcd 203640c change % change
bl602 lighting-app bl602+rpc (read/write) 1421802 1421794 -8 -0.0
.text 1091282 1091280 -2 -0.0
bl702 lighting-app bl702 .debug_info 39163806 39163805 -1 -0.0
.text 956048 956046 -2 -0.0
cc13x2_26x2 pump-controller-app LP_CC2652R7 (read/write) 176524 176516 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1213516 1213514 -2 -0.0
.flash.text 1213516 1213514 -2 -0.0
psoc6 light cy8ckit_062s2_43012 .debug_info 22229530 22229529 -1 -0.0
telink all-clusters-minimal-app tlsr9518adk80d text 613076 613074 -2 -0.0
ota-requestor-app tlsr9518adk80d text 565918 565916 -2 -0.0
Full report (51 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 80f7dcd 203640c change % change
bl602 lighting-app bl602 (read/write) 1375978 1375978 0 0.0
.bss 90041 90041 0 0.0
.data 9984 9984 0 0.0
.text 1059786 1059788 2 0.0
bl602+rpc (read/write) 1421802 1421794 -8 -0.0
.bss 98081 98081 0 0.0
.data 10376 10376 0 0.0
.text 1091282 1091280 -2 -0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1195783 1195783 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67166 67166 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4048 4048 0 0.0
.debug_abbrev 1524128 1524128 0 0.0
.debug_aranges 132328 132328 0 0.0
.debug_frame 485344 485344 0 0.0
.debug_info 39163806 39163805 -1 -0.0
.debug_line 5273525 5273525 0 0.0
.debug_loc 3368511 3368511 0 0.0
.debug_ranges 360464 360464 0 0.0
.debug_str 3463616 3463616 0 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 116616 116616 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 566910 566910 0 0.0
.symtab 171888 171888 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
956048 956046 -2 -0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1283923 1283923 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75214 75214 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4576 4576 0 0.0
.debug_abbrev 1668158 1668158 0 0.0
.debug_aranges 140392 140392 0 0.0
.debug_frame 512548 512548 0 0.0
.debug_info 4343300 4343300 0 0.0
.debug_line 5668894 5668894 0 0.0
.debug_loc 3562746 3562746 0 0.0
.debug_ranges 383488 383488 0 0.0
.debug_str 3860931 3860931 0 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 130232 130232 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 627125 627125 0 0.0
.symtab 190000 190000 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1029746 1029746 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678459 678459 0 0.0
(read/write) 173076 173076 0 0.0
.bss 81228 81228 0 0.0
.data 3380 3380 0 0.0
.rodata 89851 89851 0 0.0
.text 588296 588296 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642755 642755 0 0.0
(read/write) 157996 157996 0 0.0
.bss 80500 80500 0 0.0
.data 3380 3380 0 0.0
.rodata 78987 78987 0 0.0
.text 563448 563448 0 0.0
lock-ftd LP_CC2652R7 (read only) 676599 676599 0 0.0
(read/write) 172504 172504 0 0.0
.bss 78884 78884 0 0.0
.data 3304 3304 0 0.0
.rodata 77271 77271 0 0.0
.text 598848 598848 0 0.0
lock-mtd LP_CC2652R7 (read only) 661203 661203 0 0.0
(read/write) 183156 183156 0 0.0
.bss 74140 74140 0 0.0
.data 3304 3304 0 0.0
.rodata 103355 103355 0 0.0
.text 557368 557368 0 0.0
pump-app LP_CC2652R7 (read only) 689135 689135 0 0.0
(read/write) 160704 160704 0 0.0
.bss 78852 78852 0 0.0
.data 3296 3296 0 0.0
.rodata 90799 90799 0 0.0
.text 597852 597852 0 0.0
pump-controller-app LP_CC2652R7 (read only) 673411 673419 8 0.0
(read/write) 176524 176516 -8 -0.0
.bss 78948 78948 0 0.0
.data 3292 3292 0 0.0
.rodata 86347 86347 0 0.0
.text 586584 586592 8 0.0
shell LP_CC2652R7 (read only) 669678 669678 0 0.0
(read/write) 184176 184176 0 0.0
.bss 83548 83548 0 0.0
.data 3376 3376 0 0.0
.rodata 86598 86598 0 0.0
.text 582764 582764 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587526 587526 0 0.0
.app_xip_area 463736 463736 0 0.0
.bss 66208 66208 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 591634 591634 0 0.0
.app_xip_area 462548 462548 0 0.0
.bss 71496 71496 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544010 544010 0 0.0
.app_xip_area 425740 425740 0 0.0
.bss 60736 60736 0 0.0
.data 684 684 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974580 974580 0 0.0
.bss 152260 152260 0 0.0
.data 2168 2168 0 0.0
.text 820132 820132 0 0.0
BRD4161A+rs911x (read/write) 1035368 1035368 0 0.0
.bss 186736 186736 0 0.0
.data 2012 2012 0 0.0
.text 846596 846596 0 0.0
BRD4187C (read/write) 1147176 1147176 0 0.0
.bss 138656 138656 0 0.0
.data 2516 2516 0 0.0
.text 981408 981408 0 0.0
lock-app BRD4161A+wf200 (read/write) 1160560 1160560 0 0.0
.bss 158264 158264 0 0.0
.data 2020 2020 0 0.0
.text 1000252 1000252 0 0.0
window-app BRD4187C (read/write) 1140396 1140396 0 0.0
.bss 140072 140072 0 0.0
.data 2540 2540 0 0.0
.text 973188 973188 0 0.0
esp32 all-clusters-app c3devkit (read only) 1213516 1213514 -2 -0.0
(read/write) 1786574 1786574 0 0.0
.dram0.bss 76680 76680 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 256400 256400 0 0.0
.flash.text 1213516 1213514 -2 -0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1224391 1224391 0 0.0
(read/write) 562540 562540 0 0.0
.dram0.bss 82056 82056 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 313520 313520 0 0.0
.flash.text 1219007 1219007 0 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 662084 662084 0 0.0
.bss 77112 77112 0 0.0
.data 2104 2104 0 0.0
.text 563756 563756 0 0.0
light k32w0+release (read/write) 672176 672176 0 0.0
.bss 74912 74912 0 0.0
.data 2060 2060 0 0.0
.text 592476 592476 0 0.0
lock k32w0+release (read/write) 633644 633644 0 0.0
.bss 75672 75672 0 0.0
.data 2080 2080 0 0.0
.text 553164 553164 0 0.0
linux all-clusters-app debug (read only) 3077625 3077625 0 0.0
(read/write) 158472 158472 0 0.0
.bss 62464 62464 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 87144 87144 0 0.0
.dynamic 608 608 0 0.0
.got 4768 4768 0 0.0
.init 27 27 0 0.0
.init_array 1184 1184 0 0.0
.rodata 281323 281323 0 0.0
.text 2611810 2611810 0 0.0
all-clusters-minimal-app debug (read only) 2903321 2903321 0 0.0
(read/write) 149872 149872 0 0.0
.bss 61664 61664 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 79512 79512 0 0.0
.dynamic 608 608 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 280811 280811 0 0.0
.text 2441058 2441058 0 0.0
bridge-app debug+rpc (read only) 2402241 2402241 0 0.0
(read/write) 129608 129608 0 0.0
.bss 51008 51008 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 68776 68776 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 210976 210976 0 0.0
.text 2023906 2023906 0 0.0
chip-tool debug (read only) 11071265 11071265 0 0.0
(read/write) 658464 658464 0 0.0
.bss 25912 25912 0 0.0
.data 2754 2754 0 0.0
.data.rel.ro 623200 623200 0 0.0
.dynamic 608 608 0 0.0
.got 5184 5184 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 592165 592165 0 0.0
.text 8955396 8955396 0 0.0
chip-tool-ipv6only arm64 (read only) 10424780 10424780 0 0.0
(read/write) 706529 706529 0 0.0
.bss 33905 33905 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650832 650832 0 0.0
.dynamic 560 560 0 0.0
.got 13928 13928 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518428 518428 0 0.0
.text 8250564 8250564 0 0.0
lighting-app debug+rpc (read only) 2633297 2633297 0 0.0
(read/write) 132456 132456 0 0.0
.bss 49984 49984 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 73992 73992 0 0.0
.dynamic 608 608 0 0.0
.got 4632 4632 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 227872 227872 0 0.0
.text 2228722 2228722 0 0.0
lock-app debug (read only) 2592521 2592521 0 0.0
(read/write) 127376 127376 0 0.0
.bss 48416 48416 0 0.0
.data 1904 1904 0 0.0
.data.rel.ro 70840 70840 0 0.0
.dynamic 608 608 0 0.0
.got 4664 4664 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 244168 244168 0 0.0
.text 2176642 2176642 0 0.0
ota-provider-app debug (read only) 2388689 2388689 0 0.0
(read/write) 120904 120904 0 0.0
.bss 47936 47936 0 0.0
.data 2128 2128 0 0.0
.data.rel.ro 64760 64760 0 0.0
.dynamic 608 608 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 216648 216648 0 0.0
.text 2003490 2003490 0 0.0
ota-requestor-app debug (read only) 2553953 2553953 0 0.0
(read/write) 129248 129248 0 0.0
.bss 50464 50464 0 0.0
.data 2496 2496 0 0.0
.data.rel.ro 70120 70120 0 0.0
.dynamic 608 608 0 0.0
.got 4672 4672 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 223728 223728 0 0.0
.text 2152578 2152578 0 0.0
shell debug (read only) 2614817 2614817 0 0.0
(read/write) 142968 142968 0 0.0
.bss 57864 57864 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78040 78040 0 0.0
.dynamic 608 608 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 239538 239538 0 0.0
.text 2215762 2215762 0 0.0
thermostat-no-ble arm64 (read only) 2384124 2384124 0 0.0
(read/write) 143665 143665 0 0.0
.bss 55329 55329 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77256 77256 0 0.0
.dynamic 560 560 0 0.0
.got 5192 5192 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144996 144996 0 0.0
.text 1995232 1995232 0 0.0
tv-app debug (read only) 3246977 3246977 0 0.0
(read/write) 261992 261992 0 0.0
.bss 170648 170648 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 80384 80384 0 0.0
.dynamic 608 608 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 268568 268568 0 0.0
.text 2784418 2784418 0 0.0
tv-casting-app debug (read only) 5573009 5573009 0 0.0
(read/write) 161880 161880 0 0.0
.bss 52120 52120 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 101216 101216 0 0.0
.dynamic 608 608 0 0.0
.got 4912 4912 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 355353 355353 0 0.0
.text 4941986 4941986 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452672 2452672 0 0.0
.bss 215012 215012 0 0.0
.data 5872 5872 0 0.0
.text 1415316 1415316 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1188243 1188243 0 0.0
bss 145285 145285 0 0.0
rodata 144552 144552 0 0.0
text 817328 817332 4 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167659 1167675 16 0.0
bss 144512 144512 0 0.0
rodata 136344 136344 0 0.0
text 805878 805882 4 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841968 841968 0 0.0
(read/write) 1746868 1746868 0 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 1235876 1235876 0 0.0
.debug_aranges 110728 110728 0 0.0
.debug_frame 371396 371396 0 0.0
.debug_info 27027690 27027691 1 0.0
.debug_line 3687746 3687746 0 0.0
.debug_loc 3606504 3606504 0 0.0
.debug_ranges 340032 340032 0 0.0
.debug_str 3432511 3432511 0 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 570636 570636 0 0.0
.symtab 421600 421600 0 0.0
.text 1547104 1547104 0 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) 1689404 1689404 0 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 1227719 1227719 0 0.0
.debug_aranges 110200 110200 0 0.0
.debug_frame 374476 374476 0 0.0
.debug_info 26764320 26764320 0 0.0
.debug_line 3708730 3708730 0 0.0
.debug_loc 3594110 3594110 0 0.0
.debug_ranges 338648 338648 0 0.0
.debug_str 3421531 3421531 0 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 534725 534725 0 0.0
.symtab 408032 408032 0 0.0
.text 1490376 1490376 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850888 850888 0 0.0
(read/write) 1607564 1607564 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180000 180000 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 1062180 1062180 0 0.0
.debug_aranges 102400 102400 0 0.0
.debug_frame 344788 344788 0 0.0
.debug_info 22229530 22229529 -1 -0.0
.debug_line 3277857 3277857 0 0.0
.debug_loc 3291595 3291595 0 0.0
.debug_ranges 303928 303928 0 0.0
.debug_str 3227066 3227066 0 0.0
.heap 850888 850888 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 471050 471050 0 0.0
.symtab 376400 376400 0 0.0
.text 1416720 1416720 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845896 845896 0 0.0
(read/write) 1641588 1641588 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184976 184976 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 1064155 1064155 0 0.0
.debug_aranges 102800 102800 0 0.0
.debug_frame 346664 346664 0 0.0
.debug_info 22463155 22463155 0 0.0
.debug_line 3274977 3274977 0 0.0
.debug_loc 3319448 3319448 0 0.0
.debug_ranges 305888 305888 0 0.0
.debug_str 3246423 3246423 0 0.0
.heap 845896 845896 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 473453 473453 0 0.0
.symtab 378096 378096 0 0.0
.text 1445752 1445752 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1151184 1151184 0 0.0
.bss 111116 111116 0 0.0
.data 848 848 0 0.0
.text 598284 598284 0 0.0
lock-app qpg6105+debug (read/write) 1116880 1116880 0 0.0
.bss 106564 106564 0 0.0
.data 836 836 0 0.0
.text 563976 563976 0 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 937800 937800 0 0.0
bss 81620 81620 0 0.0
noinit 43440 43440 0 0.0
text 649088 649090 2 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 875792 875792 0 0.0
bss 80844 80844 0 0.0
noinit 43440 43440 0 0.0
text 613076 613074 -2 -0.0
light-switch-app tlsr9518adk80d (read/write) 791148 791148 0 0.0
bss 72468 72468 0 0.0
noinit 43520 43520 0 0.0
text 554538 554538 0 0.0
lighting-app tlsr9518adk80d (read/write) 875372 875380 8 0.0
bss 82232 82232 0 0.0
noinit 43520 43520 0 0.0
text 624500 624502 2 0.0
ota-requestor-app tlsr9518adk80d (read/write) 805640 805640 0 0.0
bss 74040 74040 0 0.0
noinit 43520 43520 0 0.0
text 565918 565916 -2 -0.0

@bzbarsky-apple
Copy link
Contributor Author

Fast-tracking platform-specific change with platform owner review.

@bzbarsky-apple bzbarsky-apple merged commit c6272c6 into project-chip:master Nov 17, 2022
@bzbarsky-apple bzbarsky-apple deleted the fix-MTRDevice-command-serialization branch November 17, 2022 16:47
adbridge pushed a commit to ARM-software/connectedhomeip that referenced this pull request Nov 18, 2022
We were missing endWork bits for command invokes when the command has a data
(not status) response.  This would end up permanently blocking the MTRDevice's
work queue once such a command (e.g. UpdateFabricLabel) was issued.

The changes here are as follows:

1) Rearrange the logic in MTRClusters-src.zapt so that the endWork happens
   regardless of whether hasSpecificResponse is true.
2) Add a deprecation message to the timedInvokeTimeoutMs field in _response_
   command params, since that should never be used (ran into this when writing
   the tests for this PR).
3) Set resubscribeIfLost to NO on various subscriptions in MTRDeviceTests, so if
   another test takes a while we don't fail due to the canceled subscriptions
   re-subscribing and over-fullfilling the subscription expectations.
4) Add a test for a mix of passing and failing commands on MTRCluster instances,
   with some of the commands defined as getting status-only responses and some
   defined as getting data responses.  This test fails without the endWork fix.
adbridge pushed a commit to ARM-software/connectedhomeip that referenced this pull request Nov 18, 2022
We were missing endWork bits for command invokes when the command has a data
(not status) response.  This would end up permanently blocking the MTRDevice's
work queue once such a command (e.g. UpdateFabricLabel) was issued.

The changes here are as follows:

1) Rearrange the logic in MTRClusters-src.zapt so that the endWork happens
   regardless of whether hasSpecificResponse is true.
2) Add a deprecation message to the timedInvokeTimeoutMs field in _response_
   command params, since that should never be used (ran into this when writing
   the tests for this PR).
3) Set resubscribeIfLost to NO on various subscriptions in MTRDeviceTests, so if
   another test takes a while we don't fail due to the canceled subscriptions
   re-subscribing and over-fullfilling the subscription expectations.
4) Add a test for a mix of passing and failing commands on MTRCluster instances,
   with some of the commands defined as getting status-only responses and some
   defined as getting data responses.  This test fails without the endWork fix.
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.

4 participants