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

[OTA] Tear down CASE session during a timeout error #15939

Merged

Conversation

carol-apple
Copy link
Contributor

Problem

Once the Requestor establishes a CASE session with the Provider, it just assumes that session is good forever. Upon receiving a timeout error from the provider, nothing is being done to rectify this scenario.

Fixes: #15599

Change overview

  • When a timeout error is received from CASE session establishment attempt, tear down the session
  • Make sure the OperationalDeviceProxy also marks the session as expired

Testing

  • Verify that a successful OTA transfer occurs using Linux requestor/provider apps
  • Terminate the ota-provider-app and relaunch
  • Make another attempt at QueryImage (either via announce-ota-provider command or the periodic query timer expiring)
  • Verify that error received and tear down occurs
  • Make another attempt at QueryImage (either via announce-ota-provider command or the periodic query timer expiring)
  • Verify that this time, CASE session is established and OTA transfer occurs successfully

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

PR #15939: Size comparison from c0373bb to 4b8c85d

Increases (25 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section c0373bb 4b8c85d change % change
cyw30739 light cyw930739m2evb_01 (read/write) 601874 601890 16 0.0
.app_xip_area 506408 506424 16 0.0
lock cyw930739m2evb_01 (read/write) 559794 559810 16 0.0
.app_xip_area 465864 465880 16 0.0
ota-requestor cyw930739m2evb_01 (read/write) 581990 582294 304 0.1
.app_xip_area 478380 478684 304 0.1
efr32 lighting-app BRD4161A (read only) 920996 921268 272 0.0
.text 920988 921260 272 0.0
BRD4161A+rpc (read only) 949832 950096 264 0.0
.text 949824 950088 264 0.0
lock-app BRD4161A+wf200 (read only) 988916 988932 16 0.0
.text 988908 988924 16 0.0
esp32 all-clusters-app c3devkit (read only) 957470 957498 28 0.0
.flash.text 957470 957498 28 0.0
m5stack (read only) 1012379 1012387 8 0.0
.flash.text 1006995 1007003 8 0.0
k32w light k32w061+release (read/write) 694776 695040 264 0.0
.text 609308 609572 264 0.0
lock k32w061+release (read/write) 696364 696380 16 0.0
.text 610920 610936 16 0.0
linux all-clusters-app debug (read only) 2427089 2427217 128 0.0
.rodata 205445 205509 64 0.0
.text 2058514 2058578 64 0.0
bridge-app debug+rpc (read only) 1732085 1732149 64 0.0
.text 1474293 1474357 64 0.0
chip-tool debug (read only) 9760885 9760949 64 0.0
.text 8510405 8510469 64 0.0
chip-tool-ipv6only arm64 (read only) 9432644 9432676 32 0.0
.text 7941796 7941828 32 0.0
door-lock-app debug (read only) 1946441 1946505 64 0.0
.text 1624034 1624098 64 0.0
lighting-app debug+rpc (read only) 2078497 2078641 144 0.0
.rodata 165788 165852 64 0.0
.text 1756930 1757010 80 0.0
ota-provider-app debug (read only) 1879297 1879361 64 0.0
.text 1569570 1569634 64 0.0
ota-requestor-app debug (read only) 1901329 1902129 800 0.0
.rodata 154124 154188 64 0.0
.text 1596978 1597714 736 0.0
shell debug (read only) 2393873 2394001 128 0.0
.rodata 205394 205458 64 0.0
.text 2031570 2031634 64 0.0
thermostat-no-ble arm64 (read only) 2174980 2175012 32 0.0
.text 1823408 1823440 32 0.0
tv-app debug (read only) 2618905 2619033 128 0.0
.text 2245138 2245266 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2350788 2350852 64 0.0
.text 1313388 1313452 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1151739 1152003 264 0.0
rodata 144276 144332 56 0.0
text 785484 785684 200 0.0
p6 light-app default (read/write) 2397600 2397616 16 0.0
.text 1355864 1355880 16 0.0
telink lighting-app tlsr9518adk80d (read/write) 888846 888878 32 0.0
text 628238 628266 28 0.0
Full report (28 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section c0373bb 4b8c85d change % change
cyw30739 light cyw930739m2evb_01 (read/write) 601874 601890 16 0.0
.app_xip_area 506408 506424 16 0.0
.bss 78148 78148 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 559794 559810 16 0.0
.app_xip_area 465864 465880 16 0.0
.bss 76652 76652 0 0.0
.data 624 624 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 581990 582294 304 0.1
.app_xip_area 478380 478684 304 0.1
.bss 85980 85980 0 0.0
.data 592 592 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 920996 921268 272 0.0
(read/write) 128848 128848 0 0.0
.bss 126768 126768 0 0.0
.data 2080 2080 0 0.0
.text 920988 921260 272 0.0
BRD4161A+rpc (read only) 949832 950096 264 0.0
(read/write) 144808 144808 0 0.0
.bss 142544 142544 0 0.0
.data 2260 2260 0 0.0
.text 949824 950088 264 0.0
lock-app BRD4161A+wf200 (read only) 988916 988932 16 0.0
(read/write) 120368 120368 0 0.0
.bss 118436 118436 0 0.0
.data 1932 1932 0 0.0
.text 988908 988924 16 0.0
window-app BRD4161A (read only) 854008 854008 0 0.0
(read/write) 126840 126840 0 0.0
.bss 124912 124912 0 0.0
.data 1924 1924 0 0.0
.text 854000 854000 0 0.0
esp32 all-clusters-app c3devkit (read only) 957470 957498 28 0.0
(read/write) 1393586 1393586 0 0.0
.dram0.bss 63432 63432 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 197000 197000 0 0.0
.flash.text 957470 957498 28 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1012379 1012387 8 0.0
(read/write) 460692 460692 0 0.0
.dram0.bss 68960 68960 0 0.0
.dram0.data 34080 34080 0 0.0
.flash.rodata 225816 225816 0 0.0
.flash.text 1006995 1007003 8 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 694776 695040 264 0.0
.bss 77704 77704 0 0.0
.data 1964 1964 0 0.0
.text 609308 609572 264 0.0
lock k32w061+release (read/write) 696364 696380 16 0.0
.bss 77672 77672 0 0.0
.data 1972 1972 0 0.0
.text 610920 610936 16 0.0
linux all-clusters-app debug (read only) 2427089 2427217 128 0.0
(read/write) 145760 145760 0 0.0
.bss 60128 60128 0 0.0
.data 1392 1392 0 0.0
.data.rel.ro 78504 78504 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 205445 205509 64 0.0
.text 2058514 2058578 64 0.0
bridge-app debug+rpc (read only) 1732085 1732149 64 0.0
(read/write) 92720 92720 0 0.0
.bss 47432 47432 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 38144 38144 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 141652 141652 0 0.0
.text 1474293 1474357 64 0.0
chip-tool debug (read only) 9760885 9760949 64 0.0
(read/write) 338776 338776 0 0.0
.bss 25544 25544 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 306048 306048 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 510804 510804 0 0.0
.text 8510405 8510469 64 0.0
chip-tool-ipv6only arm64 (read only) 9432644 9432676 32 0.0
(read/write) 454433 454433 0 0.0
.bss 43841 43841 0 0.0
.data 1200 1200 0 0.0
.data.rel.ro 351216 351216 0 0.0
.dynamic 560 560 0 0.0
.got 54376 54376 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 486604 486604 0 0.0
.text 7941796 7941828 32 0.0
door-lock-app debug (read only) 1946441 1946505 64 0.0
(read/write) 119136 119136 0 0.0
.bss 50432 50432 0 0.0
.data 1056 1056 0 0.0
.data.rel.ro 62264 62264 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 173596 173596 0 0.0
.text 1624034 1624098 64 0.0
lighting-app debug+rpc (read only) 2078497 2078641 144 0.0
(read/write) 124536 124536 0 0.0
.bss 51296 51296 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 66184 66184 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 165788 165852 64 0.0
.text 1756930 1757010 80 0.0
ota-provider-app debug (read only) 1879297 1879361 64 0.0
(read/write) 114768 114768 0 0.0
.bss 50240 50240 0 0.0
.data 1352 1352 0 0.0
.data.rel.ro 57544 57544 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 158835 158835 0 0.0
.text 1569570 1569634 64 0.0
ota-requestor-app debug (read only) 1901329 1902129 800 0.0
(read/write) 117512 117512 0 0.0
.bss 51296 51296 0 0.0
.data 1512 1512 0 0.0
.data.rel.ro 59256 59256 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 154124 154188 64 0.0
.text 1596978 1597714 736 0.0
shell debug (read only) 2393873 2394001 128 0.0
(read/write) 149976 149976 0 0.0
.bss 70216 70216 0 0.0
.data 864 864 0 0.0
.data.rel.ro 73232 73232 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 205394 205458 64 0.0
.text 2031570 2031634 64 0.0
thermostat-no-ble arm64 (read only) 2174980 2175012 32 0.0
(read/write) 148609 148609 0 0.0
.bss 65201 65201 0 0.0
.data 1080 1080 0 0.0
.data.rel.ro 75136 75136 0 0.0
.dynamic 560 560 0 0.0
.got 4224 4224 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 132948 132948 0 0.0
.text 1823408 1823440 32 0.0
tv-app debug (read only) 2618905 2619033 128 0.0
(read/write) 250872 250872 0 0.0
.bss 167936 167936 0 0.0
.data 3200 3200 0 0.0
.data.rel.ro 73704 73704 0 0.0
.dynamic 592 592 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 199485 199485 0 0.0
.text 2245138 2245266 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2350788 2350852 64 0.0
.bss 186084 186084 0 0.0
.data 5800 5800 0 0.0
.text 1313388 1313452 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1151739 1152003 264 0.0
bss 146792 146792 0 0.0
rodata 144276 144332 56 0.0
text 785484 785684 200 0.0
p6 all-clusters-app default (read/write) 2494152 2494152 0 0.0
.bss 119504 119504 0 0.0
.data 2696 2696 0 0.0
.text 1452416 1452416 0 0.0
light-app default (read/write) 2397600 2397616 16 0.0
.bss 112976 112976 0 0.0
.data 2544 2544 0 0.0
.text 1355864 1355880 16 0.0
lock-app default (read/write) 2361032 2361032 0 0.0
.bss 112720 112720 0 0.0
.data 2504 2504 0 0.0
.text 1319296 1319296 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 888846 888878 32 0.0
bss 86928 86928 0 0.0
noinit 37160 37160 0 0.0
text 628238 628266 28 0.0

@carol-apple carol-apple force-pushed the ota_requestor_case_reestablish branch from 4b8c85d to f3a16b9 Compare March 8, 2022 22:27
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

PR #15939: Size comparison from a69fde3 to f3a16b9

Increases (9 builds for cyw30739, efr32, k32w, linux, nrfconnect)
platform target config section a69fde3 f3a16b9 change % change
cyw30739 ota-requestor cyw930739m2evb_01 (read/write) 582190 582486 296 0.1
.app_xip_area 478564 478860 296 0.1
efr32 lighting-app BRD4161A (read only) 921344 921616 272 0.0
.text 921336 921608 272 0.0
BRD4161A+rpc (read only) 950180 950444 264 0.0
.text 950172 950436 264 0.0
k32w light k32w061+release (read/write) 695256 695488 232 0.0
.text 609764 609996 232 0.0
linux all-clusters-app debug (read only) 2428721 2428785 64 0.0
.rodata 205541 205605 64 0.0
lighting-app debug+rpc (read only) 2080025 2080089 64 0.0
.rodata 165820 165884 64 0.0
ota-requestor-app debug (read only) 1902617 1903353 736 0.0
.rodata 154220 154284 64 0.0
.text 1598338 1599010 672 0.0
shell debug (read only) 2394833 2394897 64 0.0
.rodata 205458 205522 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152335 1152587 252 0.0
rodata 144328 144388 60 0.0
text 785912 786096 184 0.0
Full report (26 builds for cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section a69fde3 f3a16b9 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 602090 602090 0 0.0
.app_xip_area 506608 506608 0 0.0
.bss 78172 78172 0 0.0
.data 652 652 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 559998 559998 0 0.0
.app_xip_area 466052 466052 0 0.0
.bss 76676 76676 0 0.0
.data 616 616 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 582190 582486 296 0.1
.app_xip_area 478564 478860 296 0.1
.bss 86004 86004 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 921344 921616 272 0.0
(read/write) 128872 128872 0 0.0
.bss 126800 126800 0 0.0
.data 2072 2072 0 0.0
.text 921336 921608 272 0.0
BRD4161A+rpc (read only) 950180 950444 264 0.0
(read/write) 144828 144828 0 0.0
.bss 142576 142576 0 0.0
.data 2252 2252 0 0.0
.text 950172 950436 264 0.0
window-app BRD4161A (read only) 854380 854380 0 0.0
(read/write) 126852 126852 0 0.0
.bss 124936 124936 0 0.0
.data 1916 1916 0 0.0
.text 854372 854372 0 0.0
esp32 all-clusters-app c3devkit (read only) 957942 957942 0 0.0
(read/write) 1393674 1393674 0 0.0
.dram0.bss 63480 63480 0 0.0
.dram0.data 14220 14220 0 0.0
.flash.rodata 197056 197056 0 0.0
.flash.text 957942 957942 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1012743 1012743 0 0.0
(read/write) 460772 460772 0 0.0
.dram0.bss 69000 69000 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 225872 225872 0 0.0
.flash.text 1007359 1007359 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 695256 695488 232 0.0
.bss 77736 77736 0 0.0
.data 1956 1956 0 0.0
.text 609764 609996 232 0.0
lock k32w061+release (read/write) 696860 696860 0 0.0
.bss 77704 77704 0 0.0
.data 1964 1964 0 0.0
.text 611392 611392 0 0.0
linux all-clusters-app debug (read only) 2428721 2428785 64 0.0
(read/write) 145712 145712 0 0.0
.bss 60192 60192 0 0.0
.data 1360 1360 0 0.0
.data.rel.ro 78424 78424 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 205541 205605 64 0.0
.text 2060194 2060194 0 0.0
bridge-app debug+rpc (read only) 1733421 1733421 0 0.0
(read/write) 92656 92656 0 0.0
.bss 47496 47496 0 0.0
.data 2016 2016 0 0.0
.data.rel.ro 38064 38064 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 141748 141748 0 0.0
.text 1475701 1475701 0 0.0
chip-tool debug (read only) 9762741 9762741 0 0.0
(read/write) 338616 338616 0 0.0
.bss 25512 25512 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 305928 305928 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 510868 510868 0 0.0
.text 8512389 8512389 0 0.0
chip-tool-ipv6only arm64 (read only) 9434788 9434788 0 0.0
(read/write) 454337 454337 0 0.0
.bss 43825 43825 0 0.0
.data 1200 1200 0 0.0
.data.rel.ro 351136 351136 0 0.0
.dynamic 560 560 0 0.0
.got 54376 54376 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 486588 486588 0 0.0
.text 7944148 7944148 0 0.0
door-lock-app debug (read only) 1947745 1947745 0 0.0
(read/write) 119136 119136 0 0.0
.bss 50496 50496 0 0.0
.data 1056 1056 0 0.0
.data.rel.ro 62184 62184 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 173660 173660 0 0.0
.text 1625442 1625442 0 0.0
lighting-app debug+rpc (read only) 2080025 2080089 64 0.0
(read/write) 124456 124456 0 0.0
.bss 51296 51296 0 0.0
.data 1536 1536 0 0.0
.data.rel.ro 66104 66104 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 165820 165884 64 0.0
.text 1758546 1758546 0 0.0
ota-provider-app debug (read only) 1880601 1880601 0 0.0
(read/write) 114736 114736 0 0.0
.bss 50304 50304 0 0.0
.data 1320 1320 0 0.0
.data.rel.ro 57464 57464 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 158899 158899 0 0.0
.text 1570978 1570978 0 0.0
ota-requestor-app debug (read only) 1902617 1903353 736 0.0
(read/write) 117448 117448 0 0.0
.bss 51360 51360 0 0.0
.data 1480 1480 0 0.0
.data.rel.ro 59176 59176 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 154220 154284 64 0.0
.text 1598338 1599010 672 0.0
shell debug (read only) 2394833 2394897 64 0.0
(read/write) 149928 149928 0 0.0
.bss 70312 70312 0 0.0
.data 864 864 0 0.0
.data.rel.ro 73064 73064 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 205458 205522 64 0.0
.text 2032802 2032802 0 0.0
thermostat-no-ble arm64 (read only) 2176500 2176500 0 0.0
(read/write) 148673 148673 0 0.0
.bss 65281 65281 0 0.0
.data 1048 1048 0 0.0
.data.rel.ro 75136 75136 0 0.0
.dynamic 560 560 0 0.0
.got 4240 4240 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 133012 133012 0 0.0
.text 1824912 1824912 0 0.0
tv-app debug (read only) 2620537 2620537 0 0.0
(read/write) 250840 250840 0 0.0
.bss 168000 168000 0 0.0
.data 3168 3168 0 0.0
.data.rel.ro 73624 73624 0 0.0
.dynamic 592 592 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 199453 199453 0 0.0
.text 2246994 2246994 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1152335 1152587 252 0.0
bss 146832 146832 0 0.0
rodata 144328 144388 60 0.0
text 785912 786096 184 0.0
p6 all-clusters-app default (read/write) 2494568 2494568 0 0.0
.bss 119544 119544 0 0.0
.data 2680 2680 0 0.0
.text 1452832 1452832 0 0.0
light-app default (read/write) 2398000 2398000 0 0.0
.bss 113008 113008 0 0.0
.data 2536 2536 0 0.0
.text 1356264 1356264 0 0.0
lock-app default (read/write) 2361432 2361432 0 0.0
.bss 112752 112752 0 0.0
.data 2496 2496 0 0.0
.text 1319696 1319696 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 889534 889534 0 0.0
bss 86968 86968 0 0.0
noinit 37160 37160 0 0.0
text 628840 628840 0 0.0

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.

Failed to restart OTA Transfer after aborting midway
5 participants