Skip to content

Fix crash when a timed invoke happens for a large payload command. #38622

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

Conversation

bzbarsky-apple
Copy link
Contributor

Because we don't pass the exchange through command handling, treating it as out-of-band state instead, we have to maintain that state on all codepaths that can lead to command handling.

Also fixes timed writes, but those are not exercised right now.

Fixes #38580

Testing

Will be exercised by the tests being added in #38181

Because we don't pass the exchange through command handling, treating it as
out-of-band state instead, we have to maintain that state on all codepaths that
can lead to command handling.

Also fixes timed writes, but those are not exercised right now.

Fixes project-chip#38580
Copy link

github-actions bot commented Apr 26, 2025

PR #38622: Size comparison from 4cbce7f to 890ad5a

Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 4cbce7f7 890ad5a change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1100736 1100744 8 0.0
RAM 94866 94866 0 0.0
bl702 lighting-app bl702+eth FLASH 655402 655410 8 0.0
RAM 33533 33533 0 0.0
bl702+wifi FLASH 832652 832660 8 0.0
RAM 22257 22257 0 0.0
bl706+mfd+rpc+littlefs FLASH 1065176 1065184 8 0.0
RAM 32181 32181 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896064 896072 8 0.0
RAM 26920 26920 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 978852 978860 8 0.0
RAM 24668 24668 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 820316 820324 8 0.0
RAM 120304 120304 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 829600 829608 8 0.0
RAM 125424 125424 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 776328 776336 8 0.0
RAM 113772 113772 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 760628 760636 8 0.0
RAM 113988 113988 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 546978 546986 8 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 578562 578570 8 0.0
RAM 205440 205440 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 662285 662293 8 0.0
RAM 77276 77276 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 682137 682145 8 0.0
RAM 79916 79916 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 682137 682145 8 0.0
RAM 79916 79916 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 639069 639077 8 0.0
RAM 72344 72344 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 622357 622365 8 0.0
RAM 73524 73524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 641993 642001 8 0.0
RAM 76068 76068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 641993 642001 8 0.0
RAM 76068 76068 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 642149 642157 8 0.0
RAM 76548 76548 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 661857 661865 8 0.0
RAM 79092 79092 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 661857 661865 8 0.0
RAM 79092 79092 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 618561 618569 8 0.0
RAM 70636 70636 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 638421 638429 8 0.0
RAM 73276 73276 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 638421 638429 8 0.0
RAM 73276 73276 0 0.0
efr32 lock-app BRD4187C FLASH 943928 943928 0 0.0
RAM 132044 132044 0 0.0
BRD4338a FLASH 738344 738376 32 0.0
RAM 206960 206960 0 0.0
window-app BRD4187C FLASH 1036096 1036160 64 0.0
RAM 128084 128084 0 0.0
esp32 all-clusters-app c3devkit DRAM 103456 103456 0 0.0
FLASH 1804468 1804476 8 0.0
IRAM 83846 83846 0 0.0
m5stack DRAM 122028 122028 0 0.0
FLASH 1769782 1769806 24 0.0
IRAM 117043 117043 0 0.0
linux air-purifier-app debug unknown 4848 4848 0 0.0
FLASH 2768067 2768135 68 0.0
RAM 114616 114616 0 0.0
all-clusters-app debug unknown 5656 5656 0 0.0
FLASH 6309572 6309640 68 0.0
RAM 531672 531672 0 0.0
all-clusters-minimal-app debug unknown 5528 5528 0 0.0
FLASH 5433910 5433978 68 0.0
RAM 224728 224728 0 0.0
bridge-app debug unknown 5544 5544 0 0.0
FLASH 4730878 4730946 68 0.0
RAM 203112 203112 0 0.0
camera-app debug unknown 8856 8856 0 0.0
FLASH 6808683 6808747 64 0.0
RAM 225592 225592 0 0.0
camera-controller debug unknown 9240 9240 0 0.0
FLASH 14058363 14058443 80 0.0
RAM 649144 649144 0 0.0
chip-tool debug unknown 6256 6256 0 0.0
FLASH 14323575 14323643 68 0.0
RAM 636192 636192 0 0.0
chip-tool-ipv6only arm64 unknown 39640 39640 0 0.0
FLASH 12360208 12360256 48 0.0
RAM 682512 682512 0 0.0
fabric-admin debug unknown 5936 5936 0 0.0
FLASH 12435631 12435699 68 0.0
RAM 635552 635552 0 0.0
fabric-bridge-app debug unknown 4800 4800 0 0.0
FLASH 4558696 4558764 68 0.0
RAM 190256 190256 0 0.0
fabric-sync debug unknown 5056 5056 0 0.0
FLASH 5699365 5699429 64 0.0
RAM 485896 485896 0 0.0
lighting-app debug+rpc+ui unknown 6264 6264 0 0.0
FLASH 5628785 5628865 80 0.0
RAM 207240 207240 0 0.0
lock-app debug unknown 5496 5496 0 0.0
FLASH 4799378 4799446 68 0.0
RAM 194472 194472 0 0.0
ota-provider-app debug unknown 4840 4840 0 0.0
FLASH 4416296 4416364 68 0.0
RAM 183088 183088 0 0.0
ota-requestor-app debug unknown 4792 4792 0 0.0
FLASH 4548888 4548956 68 0.0
RAM 187560 187560 0 0.0
shell debug unknown 4272 4272 0 0.0
FLASH 3070028 3070092 64 0.0
RAM 147928 147928 0 0.0
thermostat-no-ble arm64 unknown 9600 9600 0 0.0
FLASH 4215792 4215840 48 0.0
RAM 231168 231168 0 0.0
tv-app debug unknown 5832 5832 0 0.0
FLASH 6049461 6049541 80 0.0
RAM 609448 609448 0 0.0
tv-casting-app debug unknown 5416 5416 0 0.0
FLASH 12491917 12491981 64 0.0
RAM 754392 754392 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 919720 919728 8 0.0
RAM 167515 167515 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 911804 911820 16 0.0
RAM 145759 145759 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 856320 856328 8 0.0
RAM 141267 141267 0 0.0
nxp contact k32w0+release FLASH 590680 590680 0 0.0
RAM 72852 72852 0 0.0
mcxw71+release FLASH 622728 622736 8 0.0
RAM 63188 63188 0 0.0
light k32w0+release FLASH 616500 616516 16 0.0
RAM 72148 72148 0 0.0
k32w1+release FLASH 706968 706976 8 0.0
RAM 72036 72036 0 0.0
lock mcxw71+release FLASH 771984 771992 8 0.0
RAM 67604 67604 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1665948 1665980 32 0.0
RAM 212408 212408 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1570228 1570276 48 0.0
RAM 208584 208584 0 0.0
light cy8ckit_062s2_43012 FLASH 1445260 1445308 48 0.0
RAM 197328 197328 0 0.0
lock cy8ckit_062s2_43012 FLASH 1474548 1474596 48 0.0
RAM 225024 225024 0 0.0
qpg lighting-app qpg6105+debug FLASH 667284 667292 8 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 625576 625584 8 0.0
RAM 99832 99832 0 0.0
stm32 light STM32WB5MM-DK FLASH 464472 464480 8 0.0
RAM 141504 141504 0 0.0
telink bridge-app tl7218x FLASH 698026 674916 -23110 -3.3
RAM 101904 90756 -11148 -10.9
light-app-ota-compress-lzma-factory-data tl3218x FLASH 779496 779488 -8 -0.0
RAM 50136 50136 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 769756 769748 -8 -0.0
RAM 40436 40436 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 786132 758222 -27910 -3.6
RAM 109324 97556 -11768 -10.8
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 707358 685256 -22102 -3.1
RAM 62636 51604 -11032 -17.6
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 743540 713706 -29834 -4.0
RAM 85824 73424 -12400 -14.4
light-switch-app-ota-shell-factory-data tl3218x_retention FLASH 711244 711236 -8 -0.0
RAM 37060 37060 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 605260 605726 466 0.1
RAM 148720 138656 -10064 -6.8
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820746 793228 -27518 -3.4
RAM 107584 96412 -11172 -10.4
tizen all-clusters-app arm unknown 5184 5184 0 0.0
FLASH 1809040 1809088 48 0.0
RAM 94576 94576 0 0.0
chip-tool-ubsan arm unknown 20244 20244 0 0.0
FLASH 20408422 20408534 112 0.0
RAM 8895060 8895100 40 0.0

Copy link
Contributor

@jamesharrow jamesharrow left a comment

Choose a reason for hiding this comment

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

Have validated the fix does fix the issue. Thanks!

@mergify mergify bot merged commit c3b6b76 into project-chip:master Apr 27, 2025
72 checks passed
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] TCP large message Session .HasValue() crashes in Energy Gateway App
3 participants