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: drop poll timer to avoid crash after TransferFacilitator object destruction #34538

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

j0tunn
Copy link
Contributor

@j0tunn j0tunn commented Jul 26, 2024

We should drop timer on destruction or process will crash trying to access mTransfer property of destroyed object.

Copy link

Review changes with SemanticDiff.

Copy link

github-actions bot commented Jul 26, 2024

PR #34538: Size comparison from 95bf668 to fe4c7fc

Full report (11 builds for cc32xx, mbed, nrfconnect, qpg, stm32, tizen)
platform target config section 95bf668 fe4c7fc change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606670 606670 0 0.0
RAM 204564 204564 0 0.0
lock CC3235SF_LAUNCHXL FLASH 652210 652210 0 0.0
RAM 204836 204836 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503444 1503444 0 0.0
RAM 226720 226720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 897228 897228 0 0.0
RAM 141608 141608 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 962828 962828 0 0.0
RAM 140712 140712 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 832644 832644 0 0.0
RAM 140464 140464 0 0.0
qpg lighting-app qpg6105+debug FLASH 653084 653084 0 0.0
RAM 104680 104680 0 0.0
lock-app qpg6105+debug FLASH 612288 612288 0 0.0
RAM 99320 99320 0 0.0
stm32 light STM32WB5MM-DK FLASH 475408 475408 0 0.0
RAM 144300 144300 0 0.0
tizen all-clusters-app arm unknown 1588 1588 0 0.0
FLASH 1669024 1669024 0 0.0
RAM 48924 48924 0 0.0
chip-tool-ubsan arm unknown 2388 2388 0 0.0
FLASH 16381654 16381830 176 0.0
RAM 7190408 7190576 168 0.0

@j0tunn j0tunn force-pushed the fix/bdx.sender.crash branch from fe4c7fc to 78d0bcf Compare July 26, 2024 15:47
Copy link

github-actions bot commented Jul 26, 2024

PR #34538: Size comparison from 95bf668 to 78d0bcf

Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 95bf668 78d0bcf change % change
bl602 lighting-app bl602 FLASH 1274146 1274146 0 0.0
RAM 95424 95424 0 0.0
bl602+mfd FLASH 1288404 1288404 0 0.0
RAM 95568 95568 0 0.0
bl602+rpc FLASH 1313114 1313114 0 0.0
RAM 103848 103848 0 0.0
bl702 lighting-app bl702 FLASH 1095040 1095040 0 0.0
RAM 15245 15245 0 0.0
bl702+mfd FLASH 1105734 1105734 0 0.0
RAM 15397 15397 0 0.0
bl702+rpc FLASH 1185106 1185106 0 0.0
RAM 24245 24245 0 0.0
bl706-eth FLASH 878084 878084 0 0.0
RAM 27348 27348 0 0.0
bl706-wifi FLASH 1130780 1130780 0 0.0
RAM 14681 14681 0 0.0
bl702l lighting-app bl702l FLASH 1081938 1081938 0 0.0
RAM 21800 21800 0 0.0
bl702l+mfd FLASH 1093200 1093200 0 0.0
RAM 21960 21960 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 800212 800212 0 0.0
RAM 109276 109276 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 816684 816684 0 0.0
RAM 117020 117020 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 808652 808652 0 0.0
RAM 111308 111308 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 762416 762416 0 0.0
RAM 105448 105448 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 747068 747068 0 0.0
RAM 105632 105632 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606670 606670 0 0.0
RAM 204564 204564 0 0.0
lock CC3235SF_LAUNCHXL FLASH 652210 652210 0 0.0
RAM 204836 204836 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 669281 669281 0 0.0
RAM 77740 77740 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 689141 689141 0 0.0
RAM 80380 80380 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 689141 689141 0 0.0
RAM 80380 80380 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 646077 646077 0 0.0
RAM 72808 72808 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609737 609737 0 0.0
RAM 70884 70884 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629365 629365 0 0.0
RAM 73428 73428 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629365 629365 0 0.0
RAM 73428 73428 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625433 625433 0 0.0
RAM 73900 73900 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 645141 645141 0 0.0
RAM 76444 76444 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 645141 645141 0 0.0
RAM 76444 76444 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 593661 593661 0 0.0
RAM 67852 67852 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 613513 613513 0 0.0
RAM 70492 70492 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 613513 613513 0 0.0
RAM 70492 70492 0 0.0
efr32 lighting-app BRD4187C FLASH 927248 927240 -8 -0.0
RAM 134568 134568 0 0.0
lock-app BRD4338a FLASH 734684 734676 -8 -0.0
RAM 208004 208004 0 0.0
window-app BRD4187C FLASH 1014772 1014772 0 0.0
RAM 126648 126648 0 0.0
esp32 all-clusters-app c3devkit DRAM 91020 91020 0 0.0
FLASH 1482368 1482368 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 117500 117500 0 0.0
FLASH 1551631 1551631 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4632 4632 0 0.0
FLASH 2710575 2710575 0 0.0
RAM 125200 125200 0 0.0
all-clusters-app debug unknown 5416 5416 0 0.0
FLASH 5902302 5902298 -4 -0.0
RAM 499576 499576 0 0.0
all-clusters-minimal-app debug unknown 5312 5312 0 0.0
FLASH 5306932 5306932 0 0.0
RAM 235920 235920 0 0.0
bridge-app debug unknown 5296 5296 0 0.0
FLASH 4707492 4707492 0 0.0
RAM 213664 213664 0 0.0
chip-tool debug unknown 5784 5784 0 0.0
FLASH 12336908 12336936 28 0.0
RAM 553458 553458 0 0.0
chip-tool-ipv6only arm64 unknown 20192 20192 0 0.0
FLASH 11035932 11035980 48 0.0
RAM 603176 603176 0 0.0
fabric-admin debug unknown 5672 5672 0 0.0
FLASH 11343039 11343035 -4 -0.0
RAM 550298 550298 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4463202 4463202 0 0.0
RAM 199248 199248 0 0.0
lighting-app debug+rpc+ui unknown 5968 5968 0 0.0
FLASH 5631521 5631521 0 0.0
RAM 224464 224464 0 0.0
lock-app debug unknown 5232 5232 0 0.0
FLASH 4757958 4757958 0 0.0
RAM 200704 200704 0 0.0
ota-provider-app debug unknown 4608 4608 0 0.0
FLASH 4402420 4402352 -68 -0.0
RAM 194880 194880 0 0.0
ota-requestor-app debug unknown 4544 4544 0 0.0
FLASH 4540568 4540568 0 0.0
RAM 199416 199416 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 2991613 2991613 0 0.0
RAM 154056 154056 0 0.0
thermostat-no-ble arm64 unknown 9208 9208 0 0.0
FLASH 4259844 4259844 0 0.0
RAM 236360 236360 0 0.0
tv-app debug unknown 5504 5504 0 0.0
FLASH 5983421 5983405 -16 -0.0
RAM 578144 578144 0 0.0
tv-casting-app debug unknown 5168 5168 0 0.0
FLASH 10549501 10549501 0 0.0
RAM 638984 638984 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503444 1503444 0 0.0
RAM 226720 226720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 897228 897228 0 0.0
RAM 141608 141608 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 962828 962828 0 0.0
RAM 140712 140712 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 832644 832644 0 0.0
RAM 140464 140464 0 0.0
nxp contact k32w0+release FLASH 576100 576100 0 0.0
RAM 70104 70104 0 0.0
k32w1+release FLASH 591808 591792 -16 -0.0
RAM 74144 74144 0 0.0
light k32w0+release FLASH 611696 611696 0 0.0
RAM 69608 69608 0 0.0
k32w1+release FLASH 676528 676528 0 0.0
RAM 82912 82912 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1622948 1622948 0 0.0
RAM 209776 209776 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1533444 1533444 0 0.0
RAM 206584 206584 0 0.0
light cy8ckit_062s2_43012 FLASH 1460468 1460468 0 0.0
RAM 199848 199848 0 0.0
lock cy8ckit_062s2_43012 FLASH 1459668 1459668 0 0.0
RAM 224328 224328 0 0.0
qpg lighting-app qpg6105+debug FLASH 653084 653084 0 0.0
RAM 104680 104680 0 0.0
lock-app qpg6105+debug FLASH 612288 612288 0 0.0
RAM 99320 99320 0 0.0
stm32 light STM32WB5MM-DK FLASH 475408 475408 0 0.0
RAM 144300 144300 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 633182 633182 0 0.0
RAM 50576 50576 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 667410 667410 0 0.0
RAM 148536 148536 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 780420 780420 0 0.0
RAM 113300 113300 0 0.0
bridge-app tlsr9258a FLASH 677462 677462 0 0.0
RAM 95384 95384 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 634766 634766 0 0.0
RAM 50620 50620 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 720638 720638 0 0.0
RAM 77196 77196 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615474 615474 0 0.0
RAM 144724 144724 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 803278 803278 0 0.0
RAM 103128 103128 0 0.0
lock-app-dfu tlsr9528a FLASH 666594 666594 0 0.0
RAM 69900 69900 0 0.0
ota-requestor-app tlsr9258a FLASH 695498 695498 0 0.0
RAM 95068 95068 0 0.0
pump-app-usb tlsr9518adk80d FLASH 629838 629838 0 0.0
RAM 59556 59556 0 0.0
pump-controller-app tlsr9518adk80d FLASH 607440 607440 0 0.0
RAM 56800 56800 0 0.0
shell tlsr9518adk80d FLASH 466520 466520 0 0.0
RAM 72488 72488 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 641384 641384 0 0.0
RAM 52248 52248 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 651262 651262 0 0.0
RAM 60436 60436 0 0.0
thermostat tlsr9518adk80d FLASH 626148 626148 0 0.0
RAM 57124 57124 0 0.0
window-covering tlsr9118bdk40d FLASH 519532 519532 0 0.0
RAM 97856 97856 0 0.0
tizen all-clusters-app arm unknown 1588 1588 0 0.0
FLASH 1669024 1669024 0 0.0
RAM 48924 48924 0 0.0
chip-tool-ubsan arm unknown 2388 2388 0 0.0
FLASH 16381654 16381894 240 0.0
RAM 7190408 7190608 200 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

It's really broken that when we reset the transfer that does not shut off the poll.... I guess this works around that brokenness, but the real fix would be to not have that happen.

@j0tunn
Copy link
Contributor Author

j0tunn commented Jul 30, 2024

It's really broken that when we reset the transfer that does not shut off the poll.... I guess this works around that brokenness, but the real fix would be to not have that happen.

In fact ResetTransfer does shut off the polling... But it does it in graceful manner: set the mStopPolling flag, wait until the next poll trigger, and then shut off the polling. It works fine for the single bdx sender object, which supposed to be instantly reused.

What I do here is more like forced reset. For the scenario where we use bdx sender object for the single session and than throw it away. For the multiple parallel ota sessions.

@bzbarsky-apple
Copy link
Contributor

In fact ResetTransfer does shut off the polling..

Not in a way that's useful for "this object is going away" purposes. The fact that it polls again after you tell it to stop everything is so broken....

@j0tunn j0tunn force-pushed the fix/bdx.sender.crash branch from 9347117 to b2ebced Compare August 1, 2024 08:23
Copy link

github-actions bot commented Aug 1, 2024

PR #34538: Size comparison from c7f5f65 to b2ebced

Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section c7f5f65 b2ebced change % change
bl602 lighting-app bl602 FLASH 1277128 1277128 0 0.0
RAM 95888 95888 0 0.0
bl602+mfd FLASH 1291386 1291386 0 0.0
RAM 96040 96040 0 0.0
bl602+rpc FLASH 1316096 1316096 0 0.0
RAM 104312 104312 0 0.0
bl702 lighting-app bl702 FLASH 1098280 1098280 0 0.0
RAM 15241 15241 0 0.0
bl702+mfd FLASH 1108974 1108974 0 0.0
RAM 15385 15385 0 0.0
bl702+rpc FLASH 1188346 1188346 0 0.0
RAM 24237 24237 0 0.0
bl706-eth FLASH 881314 881314 0 0.0
RAM 27344 27344 0 0.0
bl706-wifi FLASH 1134412 1134412 0 0.0
RAM 14677 14677 0 0.0
bl702l lighting-app bl702l FLASH 1085434 1085434 0 0.0
RAM 21796 21796 0 0.0
bl702l+mfd FLASH 1096440 1096440 0 0.0
RAM 21948 21948 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 802368 802368 0 0.0
RAM 117620 117620 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 817044 817044 0 0.0
RAM 125220 125220 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 809040 809040 0 0.0
RAM 119500 119500 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 762804 762804 0 0.0
RAM 113640 113640 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 747456 747456 0 0.0
RAM 113832 113832 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 610142 610142 0 0.0
RAM 205380 205380 0 0.0
lock CC3235SF_LAUNCHXL FLASH 652622 652622 0 0.0
RAM 205620 205620 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 671425 671425 0 0.0
RAM 78348 78348 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 691285 691285 0 0.0
RAM 80980 80980 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 691285 691285 0 0.0
RAM 80980 80980 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 648213 648213 0 0.0
RAM 73416 73416 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 610065 610065 0 0.0
RAM 71340 71340 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629701 629701 0 0.0
RAM 73892 73892 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629701 629701 0 0.0
RAM 73892 73892 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625777 625777 0 0.0
RAM 74356 74356 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 645485 645485 0 0.0
RAM 76908 76908 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 645485 645485 0 0.0
RAM 76908 76908 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 599533 599533 0 0.0
RAM 68372 68372 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 619393 619393 0 0.0
RAM 71004 71004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 619393 619393 0 0.0
RAM 71004 71004 0 0.0
efr32 lighting-app BRD4187C FLASH 929456 929456 0 0.0
RAM 135148 135148 0 0.0
lock-app BRD4338a FLASH 735108 735108 0 0.0
RAM 208436 208436 0 0.0
window-app BRD4187C FLASH 1015188 1015188 0 0.0
RAM 127084 127084 0 0.0
esp32 all-clusters-app c3devkit DRAM 91708 91708 0 0.0
FLASH 1494346 1494346 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 118188 118188 0 0.0
FLASH 1563183 1563183 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4632 4632 0 0.0
FLASH 2734851 2734851 0 0.0
RAM 128272 128272 0 0.0
all-clusters-app debug unknown 5416 5416 0 0.0
FLASH 6016436 6016476 40 0.0
RAM 509808 509808 0 0.0
all-clusters-minimal-app debug unknown 5312 5312 0 0.0
FLASH 5355850 5355850 0 0.0
RAM 239936 239936 0 0.0
bridge-app debug unknown 5296 5296 0 0.0
FLASH 4715534 4715534 0 0.0
RAM 216960 216960 0 0.0
chip-tool debug unknown 5832 5832 0 0.0
FLASH 12485290 12485262 -28 -0.0
RAM 558298 558298 0 0.0
chip-tool-ipv6only arm64 unknown 20352 20360 8 0.0
FLASH 11164972 11165068 96 0.0
RAM 608232 608232 0 0.0
fabric-admin debug unknown 5672 5672 0 0.0
FLASH 11463497 11463469 -28 -0.0
RAM 555034 555034 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4471618 4471618 0 0.0
RAM 202128 202128 0 0.0
lighting-app debug+rpc+ui unknown 5968 5968 0 0.0
FLASH 5649665 5649665 0 0.0
RAM 228048 228048 0 0.0
lock-app debug unknown 5232 5232 0 0.0
FLASH 4766354 4766354 0 0.0
RAM 203616 203616 0 0.0
ota-provider-app debug unknown 4608 4608 0 0.0
FLASH 4410772 4410666 -106 -0.0
RAM 197760 197760 0 0.0
ota-requestor-app debug unknown 4544 4544 0 0.0
FLASH 4548886 4548886 0 0.0
RAM 202296 202296 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 3055069 3055069 0 0.0
RAM 158856 158856 0 0.0
thermostat-no-ble arm64 unknown 9352 9352 0 0.0
FLASH 4347972 4347972 0 0.0
RAM 242128 242128 0 0.0
tv-app debug unknown 5504 5504 0 0.0
FLASH 5993317 5993301 -16 -0.0
RAM 583488 583488 0 0.0
tv-casting-app debug unknown 5176 5176 0 0.0
FLASH 10689805 10689805 0 0.0
RAM 645544 645544 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503780 1503780 0 0.0
RAM 227296 227296 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 906524 906524 0 0.0
RAM 142221 142221 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 879524 879524 0 0.0
RAM 140360 140360 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 838280 838280 0 0.0
RAM 141062 141062 0 0.0
nxp contact k32w0+release FLASH 576412 576412 0 0.0
RAM 70416 70416 0 0.0
k32w1+release FLASH 592136 592168 32 0.0
RAM 74456 74448 -8 -0.0
light k32w0+release FLASH 612056 612056 0 0.0
RAM 69920 69920 0 0.0
k32w1+release FLASH 676968 676968 0 0.0
RAM 83232 83232 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1635716 1635716 0 0.0
RAM 210904 210904 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1540908 1540908 0 0.0
RAM 207664 207664 0 0.0
light cy8ckit_062s2_43012 FLASH 1463124 1463124 0 0.0
RAM 200776 200776 0 0.0
lock cy8ckit_062s2_43012 FLASH 1460148 1460148 0 0.0
RAM 225120 225120 0 0.0
qpg lighting-app qpg6105+debug FLASH 655124 655124 0 0.0
RAM 105148 105148 0 0.0
lock-app qpg6105+debug FLASH 612560 612560 0 0.0
RAM 99632 99632 0 0.0
stm32 light STM32WB5MM-DK FLASH 477496 477496 0 0.0
RAM 144756 144756 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 619336 619336 0 0.0
RAM 50936 50936 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 678126 678126 0 0.0
RAM 149552 149552 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 771360 771360 0 0.0
RAM 110732 110732 0 0.0
bridge-app tlsr9258a FLASH 677950 677950 0 0.0
RAM 91624 91624 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 620928 620928 0 0.0
RAM 50980 50980 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 706792 706792 0 0.0
RAM 74316 74316 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 619716 619716 0 0.0
RAM 145580 145580 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 805802 805802 0 0.0
RAM 99504 99504 0 0.0
lock-app-dfu tlsr9528a FLASH 652706 652706 0 0.0
RAM 67012 67012 0 0.0
ota-requestor-app tlsr9258a FLASH 695984 695984 0 0.0
RAM 91308 91308 0 0.0
pump-app-usb tlsr9518adk80d FLASH 630284 630284 0 0.0
RAM 55756 55756 0 0.0
pump-controller-app tlsr9518adk80d FLASH 607884 607884 0 0.0
RAM 53000 53000 0 0.0
shell tlsr9518adk80d FLASH 466810 466810 0 0.0
RAM 68660 68660 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 627696 627696 0 0.0
RAM 52696 52696 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 651706 651706 0 0.0
RAM 56636 56636 0 0.0
thermostat tlsr9518adk80d FLASH 631472 631472 0 0.0
RAM 53376 53376 0 0.0
window-covering tlsr9118bdk40d FLASH 521846 521846 0 0.0
RAM 98536 98536 0 0.0
tizen all-clusters-app arm unknown 1588 1588 0 0.0
FLASH 1701428 1701428 0 0.0
RAM 51812 51812 0 0.0
chip-tool-ubsan arm unknown 2404 2404 0 0.0
FLASH 16607826 16607690 -136 -0.0
RAM 7297180 7297156 -24 -0.0

@j0tunn
Copy link
Contributor Author

j0tunn commented Aug 1, 2024

In fact ResetTransfer does shut off the polling..

Not in a way that's useful for "this object is going away" purposes. The fact that it polls again after you tell it to stop everything is so broken....

Take a look now. I've replaced all logic based on mStopPolling with direct actions.

@j0tunn j0tunn force-pushed the fix/bdx.sender.crash branch 2 times, most recently from e51a663 to 6768d39 Compare August 8, 2024 12:54
@j0tunn j0tunn force-pushed the fix/bdx.sender.crash branch from 6768d39 to 693dd38 Compare August 8, 2024 13:02
Copy link

github-actions bot commented Aug 8, 2024

PR #34538: Size comparison from ed59857 to 693dd38

Full report (84 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section ed59857 693dd38 change % change
bl602 lighting-app bl602 FLASH 1278058 1278058 0 0.0
RAM 95912 95912 0 0.0
bl602+mfd FLASH 1292314 1292314 0 0.0
RAM 96064 96064 0 0.0
bl602+rpc FLASH 1317274 1317274 0 0.0
RAM 104336 104336 0 0.0
bl702 lighting-app bl702 FLASH 1099206 1099206 0 0.0
RAM 15249 15249 0 0.0
bl702+mfd FLASH 1110154 1110154 0 0.0
RAM 15393 15393 0 0.0
bl702+rpc FLASH 1189528 1189528 0 0.0
RAM 24245 24245 0 0.0
bl706-eth FLASH 882240 882240 0 0.0
RAM 27352 27352 0 0.0
bl706-wifi FLASH 1135410 1135410 0 0.0
RAM 14685 14685 0 0.0
bl702l lighting-app bl702l FLASH 1086360 1086360 0 0.0
RAM 21804 21804 0 0.0
bl702l+mfd FLASH 1097620 1097620 0 0.0
RAM 21956 21956 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 802972 802972 0 0.0
RAM 117628 117628 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 818800 818800 0 0.0
RAM 125220 125220 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 811156 811156 0 0.0
RAM 119500 119500 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 763328 763328 0 0.0
RAM 113648 113648 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 747812 747812 0 0.0
RAM 113840 113840 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 612202 612202 0 0.0
RAM 205388 205388 0 0.0
lock CC3235SF_LAUNCHXL FLASH 654802 654802 0 0.0
RAM 205620 205620 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 672097 672097 0 0.0
RAM 78348 78348 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 691949 691949 0 0.0
RAM 80980 80980 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 691949 691949 0 0.0
RAM 80980 80980 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 648893 648893 0 0.0
RAM 73416 73416 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 610537 610537 0 0.0
RAM 71340 71340 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 630173 630173 0 0.0
RAM 73892 73892 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 630173 630173 0 0.0
RAM 73892 73892 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 628009 628009 0 0.0
RAM 74356 74356 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 647725 647725 0 0.0
RAM 76908 76908 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 647725 647725 0 0.0
RAM 76908 76908 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 601261 601261 0 0.0
RAM 68372 68372 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 621121 621121 0 0.0
RAM 71004 71004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 621121 621121 0 0.0
RAM 71004 71004 0 0.0
efr32 lighting-app BRD4187C FLASH 930024 930016 -8 -0.0
RAM 135144 135144 0 0.0
lock-app BRD4338a FLASH 737148 737140 -8 -0.0
RAM 208440 208440 0 0.0
window-app BRD4187C FLASH 1015508 1015508 0 0.0
RAM 127084 127084 0 0.0
esp32 all-clusters-app c3devkit DRAM 94160 94160 0 0.0
FLASH 1533032 1533032 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115088 115088 0 0.0
FLASH 1542830 1542830 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4624 4624 0 0.0
FLASH 2752651 2752651 0 0.0
RAM 128232 128232 0 0.0
all-clusters-app debug unknown 5408 5408 0 0.0
FLASH 6033702 6033590 -112 -0.0
RAM 509576 509576 0 0.0
all-clusters-minimal-app debug unknown 5304 5304 0 0.0
FLASH 5373792 5373792 0 0.0
RAM 239896 239896 0 0.0
bridge-app debug unknown 5288 5288 0 0.0
FLASH 4727732 4727732 0 0.0
RAM 216952 216952 0 0.0
chip-tool debug unknown 5832 5832 0 0.0
FLASH 12488498 12488376 -122 -0.0
RAM 557426 557426 0 0.0
chip-tool-ipv6only arm64 unknown 20312 20312 0 0.0
FLASH 11167804 11167788 -16 -0.0
RAM 607408 607408 0 0.0
fabric-admin debug unknown 5672 5672 0 0.0
FLASH 11472941 11472819 -122 -0.0
RAM 554162 554162 0 0.0
fabric-bridge-app debug unknown 4520 4520 0 0.0
FLASH 4521870 4521870 0 0.0
RAM 202648 202648 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5662289 5662289 0 0.0
RAM 228008 228008 0 0.0
lock-app debug unknown 5224 5224 0 0.0
FLASH 4782512 4782512 0 0.0
RAM 203736 203736 0 0.0
ota-provider-app debug unknown 4600 4600 0 0.0
FLASH 4422520 4422320 -200 -0.0
RAM 197720 197720 0 0.0
ota-requestor-app debug unknown 4536 4536 0 0.0
FLASH 4561138 4561138 0 0.0
RAM 202256 202256 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 3074493 3074493 0 0.0
RAM 159008 159008 0 0.0
thermostat-no-ble arm64 unknown 9352 9352 0 0.0
FLASH 4360740 4360740 0 0.0
RAM 242240 242240 0 0.0
tv-app debug unknown 5496 5496 0 0.0
FLASH 6005733 6005605 -128 -0.0
RAM 583032 583032 0 0.0
tv-casting-app debug unknown 5168 5168 0 0.0
FLASH 10692525 10692525 0 0.0
RAM 644520 644520 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 908576 908576 0 0.0
RAM 142239 142239 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 880596 880596 0 0.0
RAM 140378 140378 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 840168 840168 0 0.0
RAM 141058 141058 0 0.0
nxp contact k32w0+release FLASH 577196 577196 0 0.0
RAM 70468 70468 0 0.0
k32w1+release FLASH 592496 592464 -32 -0.0
RAM 74456 74448 -8 -0.0
light k32w0+release FLASH 612640 612640 0 0.0
RAM 69940 69940 0 0.0
k32w1+release FLASH 677472 677472 0 0.0
RAM 83232 83232 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1637572 1637572 0 0.0
RAM 210912 210912 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1543004 1543004 0 0.0
RAM 207656 207656 0 0.0
light cy8ckit_062s2_43012 FLASH 1463540 1463540 0 0.0
RAM 200776 200776 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462188 1462188 0 0.0
RAM 225112 225112 0 0.0
qpg lighting-app qpg6105+debug FLASH 655716 655716 0 0.0
RAM 105152 105152 0 0.0
lock-app qpg6105+debug FLASH 613072 613072 0 0.0
RAM 99636 99636 0 0.0
stm32 light STM32WB5MM-DK FLASH 478120 478120 0 0.0
RAM 144764 144764 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 619928 619928 0 0.0
RAM 50940 50940 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 680272 680272 0 0.0
RAM 149576 149576 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 773274 773274 0 0.0
RAM 110736 110736 0 0.0
bridge-app tlsr9258a FLASH 678616 678616 0 0.0
RAM 91636 91636 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621524 621524 0 0.0
RAM 50980 50980 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707406 707406 0 0.0
RAM 74320 74320 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 620450 620450 0 0.0
RAM 145580 145580 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 806536 806536 0 0.0
RAM 99504 99504 0 0.0
lock-app-dfu tlsr9528a FLASH 654396 654396 0 0.0
RAM 67016 67016 0 0.0
ota-requestor-app tlsr9258a FLASH 696632 696632 0 0.0
RAM 91320 91320 0 0.0
pump-app-usb tlsr9518adk80d FLASH 630912 630912 0 0.0
RAM 55760 55760 0 0.0
pump-controller-app tlsr9518adk80d FLASH 608422 608422 0 0.0
RAM 53004 53004 0 0.0
shell tlsr9518adk80d FLASH 466810 466810 0 0.0
RAM 68660 68660 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628296 628296 0 0.0
RAM 52700 52700 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652292 652292 0 0.0
RAM 56640 56640 0 0.0
thermostat tlsr9518adk80d FLASH 633300 633300 0 0.0
RAM 53384 53384 0 0.0
window-covering tlsr9118bdk40d FLASH 522456 522456 0 0.0
RAM 98540 98540 0 0.0
tizen all-clusters-app arm unknown 4796 4796 0 0.0
FLASH 1695932 1695932 0 0.0
RAM 89172 89172 0 0.0
chip-tool-ubsan arm unknown 10236 10236 0 0.0
FLASH 17308510 17308126 -384 -0.0
RAM 7562468 7562344 -124 -0.0

@j0tunn j0tunn requested a review from bzbarsky-apple August 23, 2024 08:23
@nivi-apple
Copy link
Contributor

@j0tunn Change looks ok. What testing have you done for this? Based on the history of the stop polling boolean last time someone removed the stopPolling this issue was seen #23573. It would be good to test the use case mentioned in the issue description.

@j0tunn
Copy link
Contributor Author

j0tunn commented Sep 7, 2024

@j0tunn Change looks ok. What testing have you done for this? Based on the history of the stop polling boolean last time someone removed the stopPolling this issue was seen #23573. It would be good to test the use case mentioned in the issue description.

This patch is in our application about two months. And it was tested by our QA team. But honestly we are using BdxOtaSender object only once. And for each update session we create new one. So we can support parallel OTA sessions.

The bug you are talking about just would be impossible after this change. This bug occurs because of the state (mStopPolling). I'm removing the state here at all. So PrepareForTransfer/InitiateTransfer starts polling, and ResetTransfer stops the polling immediately. Thats it. No state, no influence from the previous sessions

@mergify mergify bot merged commit ac289ed into project-chip:master Sep 11, 2024
68 checks passed
espressif-bot pushed a commit to espressif/esp-matter that referenced this pull request Nov 19, 2024
- components/esp_matter_ota_provider: remove undefined mStopPolling member variable
  This is inspired from project-chip/connectedhomeip#34538
- examples/zap_light: remove the unused occupancy sensor dir from SRC_DIRS
- Remove the esp_diag_data_store dependency from components/esp-matter
yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this pull request Dec 12, 2024
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