Skip to content

Fix: Null mContext crash when commissioning after background/foreground#43127

Merged
mergify[bot] merged 1 commit intoproject-chip:masterfrom
pgregorr-amazon:ios_background_foreground_2026_02_11
Feb 19, 2026
Merged

Fix: Null mContext crash when commissioning after background/foreground#43127
mergify[bot] merged 1 commit intoproject-chip:masterfrom
pgregorr-amazon:ios_background_foreground_2026_02_11

Conversation

@pgregorr-amazon
Copy link
Copy Markdown
Contributor

@pgregorr-amazon pgregorr-amazon commented Feb 12, 2026

Summary

Fix null mContext crash when commissioning after app background/foreground cycle.

After backgrounding and foregrounding (e.g., switching to Photos app, locking device for 30+ seconds), commissioning crashes with null pointer dereference on mContext. Root cause: CHIP_ERROR_DUPLICATE_KEY_ID during cluster re-registration blocks SetContext() from completing, leaving mContext null. When commission attempt accesses mContext, app crashes.

Solution:

  • Make ServerClusterInterfaceRegistry::Register() idempotent to allow safe re-registration
  • Make DefaultServerCluster::Shutdown() idempotent to match Register() pattern
  • Properly unregister clusters in CodeDrivenDataModelProvider::Shutdown()
  • SetContext() now succeeds after foreground, restoring mContext
  • Enhanced logging for lifecycle debugging
  • Fixed build error with unused variable in certain configurations
  • Added 2-second delay in test framework to prevent socket cleanup race condition

Architecture: Aligns registry state with cluster persistence - clusters remain registered across background/foreground cycles, only mContext cycles (cleared on background, restored on foreground).

Impact:

  • Resolves critical blocker for iOS Photos app integration
  • Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)
  • App now handles unlimited background/foreground cycles without crashes

Attached Documentation:

  • See 0_Repro_Steps.md for detailed reproduction steps
  • Logs before fix: Shows crash with CHIP_ERROR_DUPLICATE_KEY_ID and null mContext
  • Logs after fix: Shows successful re-registration and commissioning

Test Infrastructure Fix:

TC_TLSCERT_2_12 was failing due to socket cleanup timing. The idempotent shutdown optimization makes app termination so efficient that processes exit before the kernel completes TCP socket cleanup. This leaves ports actively bound (not in TIME_WAIT), causing "Address already in use" errors when the next test tries to bind 17 seconds later.

Investigation findings:

  • Attempted SO_REUSEADDR (only works for TIME_WAIT, not actively bound ports)
  • Root cause: Process exits faster than kernel socket cleanup completes
  • iOS production unaffected (graceful suspension, not SIGTERM termination)
  • Validated via iOS simulator testing (multiple rapid cycles work correctly)

Fix: Added 2-second delay after SIGTERM in test framework to allow kernel time to complete socket cleanup. This is test-infrastructure specific and doesn't affect production behavior.

Related issues

Fixes iOS Matter Casting app crash after backgrounding/foregrounding.

Testing

Unit Tests:

  • All 9 ServerClusterInterfaceRegistry tests pass
  • All 37 TestCodeDrivenDataModelProvider tests pass
  • Added new WarmStartAfterShutdown test validating background/foreground lifecycle
  • Fixed RegisterErrors test to verify idempotent behavior
  • Shutdown test now validates idempotent shutdown behavior

Manual Testing:

  • ✅ Basic background/foreground cycles work correctly
  • ✅ Extended lock (2+ minutes) - original crash scenario resolved
  • ✅ Photos app switch - original reported issue resolved
  • ✅ 20+ rapid background/foreground stress test - no crashes
  • ✅ Commission integrity preserved after backgrounding
  • ✅ All 17 clusters handle lifecycle correctly

Log Evidence:

[Foreground - SUCCESS]
✓ LazyRegisteredServerCluster::Create: Cluster already constructed (17×)
✓ Cluster already registered for X/0x0000_XXXX, skipping re-registration (17×)
✓ DefaultServerCluster::Startup() mContext=0xXXX (restored)
✗ NO "Failed to register cluster" errors
✗ NO crashes

Files Modified:

  • src/app/server-cluster/ServerClusterInterfaceRegistry.cpp
  • src/app/server-cluster/ServerClusterInterfaceRegistry.h
  • src/app/server-cluster/DefaultServerCluster.h
  • src/app/server-cluster/DefaultServerCluster.cpp
  • src/app/InteractionModelEngine.cpp
  • src/data-model-providers/codedriven/CodeDrivenDataModelProvider.cpp
  • src/app/server-cluster/tests/TestServerClusterInterfaceRegistry.cpp
  • src/data-model-providers/codedriven/tests/TestCodeDrivenDataModelProvider.cpp
  • src/app/clusters/general-commissioning-server/GeneralCommissioningCluster.cpp
  • examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp
  • examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCastingApp.mm

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    "When in Rome…"
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

0_Repro_Steps.md

1_iOS logs withOUT fix - Background Lock Unlock Foreground Connect.log.filterline.log

2_iOS logs WITH fix - Background Lock Unlock Foreground Connect.log.filterline.log

3_iOS Prod logs WITH fix - Background Lock Unlock Foreground Connect.log.filterline.log

@pgregorr-amazon pgregorr-amazon requested a review from a team as a code owner February 12, 2026 23:23
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 12, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

PR #43127: Size comparison from 07f6efb to d981aa4

Full report (1 build for stm32)
platform target config section 07f6efb d981aa4 change % change
stm32 light STM32WB5MM-DK FLASH 472204 472316 112 0.0
RAM 141208 141208 0 0.0

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a critical crash that occurs during commissioning after an app background/foreground cycle. The root cause was correctly identified as a null pointer dereference on mContext due to clusters failing to re-register.

The changes introduced are robust and well-thought-out:

  • The ServerClusterInterfaceRegistry::Register and LazyRegisteredServerCluster::Create methods are now idempotent, which correctly handles re-registration without causing CHIP_ERROR_DUPLICATE_KEY_ID errors.
  • The DefaultServerCluster::Startup method is also made idempotent, allowing clusters to be re-initialized without being fully destroyed, preserving important state like mDataVersion.
  • The shutdown logic in CodeDrivenDataModelProvider::Shutdown has been correctly modified to only clear cluster state (mContext) without unregistering the clusters, which is essential for the warm-start lifecycle.
  • The changes in the tv-casting app example demonstrate a more robust start/stop sequence for the application lifecycle.
  • A new unit test, WarmStartAfterShutdown, has been added to specifically validate the fix for the background/foreground scenario, and existing tests have been updated to reflect the new idempotent behavior.
  • Defensive null checks have been added in GeneralCommissioningCluster to prevent similar crashes in the future.

Overall, this is an excellent fix that addresses the issue at its core and improves the robustness of the application lifecycle management. The changes are consistent, well-commented, and well-tested.

@pgregorr-amazon pgregorr-amazon force-pushed the ios_background_foreground_2026_02_11 branch 2 times, most recently from f3ff9d5 to 8bdfa18 Compare February 13, 2026 01:05
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 13, 2026

PR #43127: Size comparison from 07f6efb to 8bdfa18

Full report (34 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 07f6efb 8bdfa18 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1107432 1107614 182 0.0
RAM 178650 178650 0 0.0
bl702 lighting-app bl702+eth FLASH 662436 662362 -74 -0.0
RAM 134665 134665 0 0.0
bl702+wifi FLASH 838152 838334 182 0.0
RAM 124189 124189 0 0.0
bl706+mfd+rpc+littlefs FLASH 1072500 1072682 182 0.0
RAM 117117 117117 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905054 905236 182 0.0
RAM 105724 105724 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 985504 985686 182 0.0
RAM 109604 109604 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 772416 773184 768 0.1
RAM 103200 103200 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 785224 786008 784 0.1
RAM 108480 108480 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 730312 731032 720 0.1
RAM 97236 97236 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 714832 715544 712 0.1
RAM 97436 97436 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555760 556584 824 0.1
RAM 204432 204432 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589948 590884 936 0.2
RAM 204720 204720 0 0.0
efr32 lock-app BRD4187C FLASH 968392 968520 128 0.0
RAM 125444 125444 0 0.0
BRD4338a FLASH 756908 757732 824 0.1
RAM 237696 237696 0 0.0
window-app BRD4187C FLASH 1066032 1066888 856 0.1
RAM 126668 126668 0 0.0
esp32 all-clusters-app c3devkit DRAM 98220 98220 0 0.0
FLASH 1588884 1588840 -44 -0.0
IRAM 93514 93514 0 0.0
nxp contact mcxw71+release FLASH 745776 746568 792 0.1
RAM 66896 66896 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1700908 1701940 1032 0.1
RAM 213804 213804 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602036 1602988 952 0.1
RAM 210692 210692 0 0.0
light cy8ckit_062s2_43012 FLASH 1462532 1463372 840 0.1
RAM 196864 196864 0 0.0
lock cy8ckit_062s2_43012 FLASH 1495924 1496756 832 0.1
RAM 224696 224696 0 0.0
qpg lighting-app qpg6200+debug FLASH 839564 839676 112 0.0
RAM 127740 127740 0 0.0
lock-app qpg6200+debug FLASH 778208 778336 128 0.0
RAM 118688 118688 0 0.0
realtek light-switch-app rtl8777g FLASH 704088 704880 792 0.1
RAM 113392 113392 0 0.0
lighting-app rtl8777g FLASH 745320 746072 752 0.1
RAM 114564 114564 0 0.0
stm32 light STM32WB5MM-DK FLASH 472204 472316 112 0.0
RAM 141208 141208 0 0.0
telink bridge-app tl7218x FLASH 714134 714118 -16 -0.0
RAM 93544 93544 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 799252 799232 -20 -0.0
RAM 42112 42112 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 790500 790480 -20 -0.0
RAM 96632 96632 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 719780 719750 -30 -0.0
RAM 54756 54756 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 755590 755560 -30 -0.0
RAM 73788 73788 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 724208 724178 -30 -0.0
RAM 33168 33168 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 611444 611424 -20 -0.0
RAM 118120 118120 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 823906 823890 -16 -0.0
RAM 95020 95020 0 0.0

@pgregorr-amazon pgregorr-amazon force-pushed the ios_background_foreground_2026_02_11 branch from 8bdfa18 to 4437009 Compare February 13, 2026 23:54
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 14, 2026

PR #43127: Size comparison from 58568d5 to 4437009

Full report (21 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, nxp, psoc6, realtek, stm32)
platform target config section 58568d5 4437009 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108314 228 0.0
RAM 178650 178650 0 0.0
bl702 lighting-app bl702+eth FLASH 663158 663130 -28 -0.0
RAM 134665 134665 0 0.0
bl702+wifi FLASH 838868 839096 228 0.0
RAM 124189 124189 0 0.0
bl706+mfd+rpc+littlefs FLASH 1073116 1073344 228 0.0
RAM 117117 117117 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 905960 228 0.0
RAM 105724 105724 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 986182 986410 228 0.0
RAM 109604 109604 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 773916 824 0.1
RAM 103200 103200 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786732 824 0.1
RAM 108480 108480 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 730948 731732 784 0.1
RAM 97236 97236 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716236 760 0.1
RAM 97436 97436 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557308 888 0.2
RAM 204432 204432 0 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591608 1000 0.2
RAM 204720 204720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955800 955356 -444 -0.0
RAM 162036 162036 0 0.0
nxp contact mcxw71+release FLASH 746448 747320 872 0.1
RAM 66896 66896 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701772 1702884 1112 0.1
RAM 213804 213804 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1603916 1032 0.1
RAM 210692 210692 0 0.0
light cy8ckit_062s2_43012 FLASH 1463380 1464300 920 0.1
RAM 196864 196864 0 0.0
lock cy8ckit_062s2_43012 FLASH 1496780 1497692 912 0.1
RAM 224696 224696 0 0.0
realtek light-switch-app rtl8777g FLASH 704816 705664 848 0.1
RAM 113392 113392 0 0.0
lighting-app rtl8777g FLASH 746072 746880 808 0.1
RAM 114564 114564 0 0.0
stm32 light STM32WB5MM-DK FLASH 472856 473024 168 0.0
RAM 141208 141208 0 0.0

@pgregorr-amazon pgregorr-amazon force-pushed the ios_background_foreground_2026_02_11 branch from 4437009 to 5f6da83 Compare February 14, 2026 00:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 14, 2026

PR #43127: Size comparison from 58568d5 to 5f6da83

Full report (22 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, psoc6, qpg, realtek, stm32)
platform target config section 58568d5 5f6da83 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108300 214 0.0
RAM 178650 178650 0 0.0
bl702 lighting-app bl702+eth FLASH 663158 663116 -42 -0.0
RAM 134665 134665 0 0.0
bl702+wifi FLASH 838868 839082 214 0.0
RAM 124189 124189 0 0.0
bl706+mfd+rpc+littlefs FLASH 1073116 1073330 214 0.0
RAM 117117 117117 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 905946 214 0.0
RAM 105724 105724 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 986182 986396 214 0.0
RAM 109604 109604 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 773916 824 0.1
RAM 103200 103200 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786732 824 0.1
RAM 108480 108480 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 730948 731732 784 0.1
RAM 97236 97236 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716236 760 0.1
RAM 97436 97436 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557308 888 0.2
RAM 204432 204432 0 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591608 1000 0.2
RAM 204720 204720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955800 955356 -444 -0.0
RAM 162036 162036 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701772 1702884 1112 0.1
RAM 213804 213804 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1603916 1032 0.1
RAM 210692 210692 0 0.0
light cy8ckit_062s2_43012 FLASH 1463380 1464300 920 0.1
RAM 196864 196864 0 0.0
lock cy8ckit_062s2_43012 FLASH 1496780 1497692 912 0.1
RAM 224696 224696 0 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840356 176 0.0
RAM 127740 127740 0 0.0
lock-app qpg6200+debug FLASH 778824 778984 160 0.0
RAM 118688 118688 0 0.0
realtek light-switch-app rtl8777g FLASH 704816 705664 848 0.1
RAM 113392 113392 0 0.0
lighting-app rtl8777g FLASH 746072 746880 808 0.1
RAM 114564 114564 0 0.0
stm32 light STM32WB5MM-DK FLASH 472856 473008 152 0.0
RAM 141208 141208 0 0.0

@pgregorr-amazon pgregorr-amazon force-pushed the ios_background_foreground_2026_02_11 branch from 5f6da83 to 3fc953f Compare February 14, 2026 01:18
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 14, 2026

PR #43127: Size comparison from 58568d5 to 3fc953f

Increases above 0.2%:

platform target config section 58568d5 3fc953f change % change
esp32 all-clusters-app c3devkit DRAM 98220 98420 200 0.2
telink light-switch-app-ota-factory-data tl3218x_retention RAM 33168 33260 92 0.3
Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 58568d5 3fc953f change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108324 238 0.0
RAM 178650 178706 56 0.0
bl702 lighting-app bl702+eth FLASH 663158 663400 242 0.0
RAM 134665 134713 48 0.0
bl702+wifi FLASH 838868 839106 238 0.0
RAM 124189 124253 64 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073360 244 0.0
RAM 117117 117181 64 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 905984 252 0.0
RAM 105724 105788 64 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986426 244 0.0
RAM 109604 109668 64 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 773972 880 0.1
RAM 103200 103280 80 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786796 888 0.1
RAM 108480 108552 72 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731772 824 0.1
RAM 97236 97284 48 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716300 824 0.1
RAM 97436 97476 40 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557340 920 0.2
RAM 204432 204480 48 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591664 1056 0.2
RAM 204720 204784 64 0.0
efr32 lock-app BRD4187C FLASH 969072 969264 192 0.0
RAM 125444 125508 64 0.1
BRD4338a FLASH 757716 758668 952 0.1
RAM 237696 237768 72 0.0
window-app BRD4187C FLASH 1066848 1067800 952 0.1
RAM 126668 126764 96 0.1
esp32 all-clusters-app c3devkit DRAM 98220 98420 200 0.2
FLASH 1589698 1589902 204 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955800 955512 -288 -0.0
RAM 162036 162224 188 0.1
nxp contact mcxw71+release FLASH 746448 747392 944 0.1
RAM 66896 66944 48 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701772 1703028 1256 0.1
RAM 213804 213988 184 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604012 1128 0.1
RAM 210692 210836 144 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1464332 952 0.1
RAM 196864 196928 64 0.0
lock cy8ckit_062s2_43012 FLASH 1496780 1497740 960 0.1
RAM 224696 224760 64 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840404 224 0.0
RAM 127740 127820 80 0.1
lock-app qpg6200+debug FLASH 778824 779048 224 0.0
RAM 118688 118752 64 0.1
realtek light-switch-app rtl8777g FLASH 704816 705720 904 0.1
RAM 113392 113480 88 0.1
lighting-app rtl8777g FLASH 746072 746944 872 0.1
RAM 114564 114628 64 0.1
stm32 light STM32WB5MM-DK FLASH 472856 473064 208 0.0
RAM 141208 141280 72 0.1
telink bridge-app tl7218x FLASH 714818 714956 138 0.0
RAM 93544 93624 80 0.1
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 835692 835808 116 0.0
RAM 42784 42848 64 0.1
light-app-ota-shell-factory-data tl7218x FLASH 826962 827078 116 0.0
RAM 97304 97368 64 0.1
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 720464 720576 112 0.0
RAM 54756 54848 92 0.2
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 783512 783624 112 0.0
RAM 74460 74552 92 0.1
light-switch-app-ota-factory-data tl3218x_retention FLASH 724888 725000 112 0.0
RAM 33168 33260 92 0.3
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612124 612240 116 0.0
RAM 118120 118184 64 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 824590 824710 120 0.0
RAM 95020 95084 64 0.1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 16, 2026

PR #43127: Size comparison from 7636760 to 1bbe14f

Increases above 0.2%:

platform target config section 7636760 1bbe14f change % change
esp32 all-clusters-app c3devkit DRAM 98220 98420 200 0.2
telink light-switch-app-ota-factory-data tl3218x_retention RAM 33168 33260 92 0.3
Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 7636760 1bbe14f change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108324 238 0.0
RAM 178650 178706 56 0.0
bl702 lighting-app bl702+eth FLASH 663158 663400 242 0.0
RAM 134665 134713 48 0.0
bl702+wifi FLASH 838868 839106 238 0.0
RAM 124189 124253 64 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073360 244 0.0
RAM 117117 117181 64 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 905984 252 0.0
RAM 105724 105788 64 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986426 244 0.0
RAM 109604 109668 64 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 773972 880 0.1
RAM 103200 103280 80 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786796 888 0.1
RAM 108480 108552 72 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731772 824 0.1
RAM 97236 97284 48 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716300 824 0.1
RAM 97436 97476 40 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557340 920 0.2
RAM 204432 204480 48 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591664 1056 0.2
RAM 204720 204784 64 0.0
efr32 lock-app BRD4187C FLASH 969072 969264 192 0.0
RAM 125444 125508 64 0.1
BRD4338a FLASH 757716 758668 952 0.1
RAM 237696 237768 72 0.0
window-app BRD4187C FLASH 1066848 1067800 952 0.1
RAM 126668 126764 96 0.1
esp32 all-clusters-app c3devkit DRAM 98220 98420 200 0.2
FLASH 1589706 1589910 204 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955812 955524 -288 -0.0
RAM 162037 162225 188 0.1
nxp contact mcxw71+release FLASH 746448 747392 944 0.1
RAM 66896 66944 48 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701780 1703044 1264 0.1
RAM 213804 213988 184 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604012 1128 0.1
RAM 210692 210836 144 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1464332 952 0.1
RAM 196864 196928 64 0.0
lock cy8ckit_062s2_43012 FLASH 1496780 1497740 960 0.1
RAM 224696 224760 64 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840404 224 0.0
RAM 127740 127820 80 0.1
lock-app qpg6200+debug FLASH 778824 779048 224 0.0
RAM 118688 118752 64 0.1
realtek light-switch-app rtl8777g FLASH 704816 705720 904 0.1
RAM 113392 113480 88 0.1
lighting-app rtl8777g FLASH 746072 746944 872 0.1
RAM 114564 114628 64 0.1
stm32 light STM32WB5MM-DK FLASH 472856 473064 208 0.0
RAM 141208 141280 72 0.1
telink bridge-app tl7218x FLASH 714818 714956 138 0.0
RAM 93544 93624 80 0.1
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 835692 835808 116 0.0
RAM 42784 42848 64 0.1
light-app-ota-shell-factory-data tl7218x FLASH 826962 827078 116 0.0
RAM 97304 97368 64 0.1
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 720464 720576 112 0.0
RAM 54756 54848 92 0.2
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 783512 783624 112 0.0
RAM 74460 74552 92 0.1
light-switch-app-ota-factory-data tl3218x_retention FLASH 724888 725000 112 0.0
RAM 33168 33260 92 0.3
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612124 612240 116 0.0
RAM 118120 118184 64 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 824590 824710 120 0.0
RAM 95020 95084 64 0.1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 17, 2026

PR #43127: Size comparison from 7636760 to 22a0a5a

Increases above 0.2%:

platform target config section 7636760 22a0a5ac change % change
telink light-switch-app-ota-factory-data tl3218x_retention RAM 33168 33260 92 0.3
Full report (31 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 7636760 22a0a5ac change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108324 238 0.0
RAM 178650 178706 56 0.0
bl702 lighting-app bl702+eth FLASH 663158 663400 242 0.0
RAM 134665 134713 48 0.0
bl702+wifi FLASH 838868 839106 238 0.0
RAM 124189 124253 64 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073360 244 0.0
RAM 117117 117181 64 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 905984 252 0.0
RAM 105724 105788 64 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986426 244 0.0
RAM 109604 109668 64 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 773972 880 0.1
RAM 103200 103280 80 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786796 888 0.1
RAM 108480 108552 72 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731772 824 0.1
RAM 97236 97284 48 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716300 824 0.1
RAM 97436 97476 40 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557340 920 0.2
RAM 204432 204480 48 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591664 1056 0.2
RAM 204720 204784 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955812 955524 -288 -0.0
RAM 162037 162225 188 0.1
nxp contact mcxw71+release FLASH 746448 747392 944 0.1
RAM 66896 66944 48 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701780 1703044 1264 0.1
RAM 213804 213988 184 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604012 1128 0.1
RAM 210692 210836 144 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1464332 952 0.1
RAM 196864 196928 64 0.0
lock cy8ckit_062s2_43012 FLASH 1496780 1497740 960 0.1
RAM 224696 224760 64 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840404 224 0.0
RAM 127740 127820 80 0.1
lock-app qpg6200+debug FLASH 778824 779048 224 0.0
RAM 118688 118752 64 0.1
realtek light-switch-app rtl8777g FLASH 704816 705720 904 0.1
RAM 113392 113480 88 0.1
lighting-app rtl8777g FLASH 746072 746944 872 0.1
RAM 114564 114628 64 0.1
stm32 light STM32WB5MM-DK FLASH 472856 473064 208 0.0
RAM 141208 141280 72 0.1
telink bridge-app tl7218x FLASH 714818 714956 138 0.0
RAM 93544 93624 80 0.1
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 835692 835808 116 0.0
RAM 42784 42848 64 0.1
light-app-ota-shell-factory-data tl7218x FLASH 826962 827078 116 0.0
RAM 97304 97368 64 0.1
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 720464 720576 112 0.0
RAM 54756 54848 92 0.2
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 783512 783624 112 0.0
RAM 74460 74552 92 0.1
light-switch-app-ota-factory-data tl3218x_retention FLASH 724888 725000 112 0.0
RAM 33168 33260 92 0.3
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612124 612240 116 0.0
RAM 118120 118184 64 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 824590 824710 120 0.0
RAM 95020 95084 64 0.1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 17, 2026

PR #43127: Size comparison from 7636760 to 133879d

Increases above 0.2%:

platform target config section 7636760 133879d change % change
esp32 all-clusters-app c3devkit DRAM 98220 98420 200 0.2
telink light-switch-app-ota-factory-data tl3218x_retention RAM 33168 33260 92 0.3
Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 7636760 133879d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108324 238 0.0
RAM 178650 178706 56 0.0
bl702 lighting-app bl702+eth FLASH 663158 663400 242 0.0
RAM 134665 134713 48 0.0
bl702+wifi FLASH 838868 839106 238 0.0
RAM 124189 124253 64 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073360 244 0.0
RAM 117117 117181 64 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 905984 252 0.0
RAM 105724 105788 64 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986426 244 0.0
RAM 109604 109668 64 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 773972 880 0.1
RAM 103200 103280 80 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786796 888 0.1
RAM 108480 108552 72 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731772 824 0.1
RAM 97236 97284 48 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716300 824 0.1
RAM 97436 97476 40 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557456 1036 0.2
RAM 204432 204480 48 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591780 1172 0.2
RAM 204720 204784 64 0.0
efr32 lock-app BRD4187C FLASH 969072 969264 192 0.0
RAM 125444 125508 64 0.1
BRD4338a FLASH 757716 758668 952 0.1
RAM 237696 237768 72 0.0
window-app BRD4187C FLASH 1066848 1067800 952 0.1
RAM 126668 126764 96 0.1
esp32 all-clusters-app c3devkit DRAM 98220 98420 200 0.2
FLASH 1589706 1589910 204 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955812 955524 -288 -0.0
RAM 162037 162225 188 0.1
nxp contact mcxw71+release FLASH 746448 747392 944 0.1
RAM 66896 66944 48 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701780 1703140 1360 0.1
RAM 213804 213988 184 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604108 1224 0.1
RAM 210692 210836 144 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1464436 1056 0.1
RAM 196864 196928 64 0.0
lock cy8ckit_062s2_43012 FLASH 1496780 1497836 1056 0.1
RAM 224696 224760 64 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840404 224 0.0
RAM 127740 127820 80 0.1
lock-app qpg6200+debug FLASH 778824 779048 224 0.0
RAM 118688 118752 64 0.1
realtek light-switch-app rtl8777g FLASH 704816 705720 904 0.1
RAM 113392 113480 88 0.1
lighting-app rtl8777g FLASH 746072 746944 872 0.1
RAM 114564 114628 64 0.1
stm32 light STM32WB5MM-DK FLASH 472856 473064 208 0.0
RAM 141208 141280 72 0.1
telink bridge-app tl7218x FLASH 714818 714956 138 0.0
RAM 93544 93624 80 0.1
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 835692 835808 116 0.0
RAM 42784 42848 64 0.1
light-app-ota-shell-factory-data tl7218x FLASH 826962 827078 116 0.0
RAM 97304 97368 64 0.1
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 720464 720576 112 0.0
RAM 54756 54848 92 0.2
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 783512 783624 112 0.0
RAM 74460 74552 92 0.1
light-switch-app-ota-factory-data tl3218x_retention FLASH 724888 725000 112 0.0
RAM 33168 33260 92 0.3
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612124 612240 116 0.0
RAM 118120 118184 64 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 824590 824710 120 0.0
RAM 95020 95084 64 0.1

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 18, 2026

PR #43127: Size comparison from 7636760 to c912e28

Increases above 0.2%:

platform target config section 7636760 c912e281 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 778332 5240 0.7
esp32 all-clusters-app c3devkit DRAM 98220 98468 248 0.3
psoc6 light cy8ckit_062s2_43012 FLASH 1463380 1469708 6328 0.4
realtek lighting-app rtl8777g FLASH 746072 751552 5480 0.7
stm32 light STM32WB5MM-DK FLASH 472856 477464 4608 1.0
Full report (27 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32)
platform target config section 7636760 c912e281 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108410 324 0.0
RAM 178650 178730 80 0.0
bl702 lighting-app bl702+eth FLASH 663158 663490 332 0.1
RAM 134665 134737 72 0.1
bl702+wifi FLASH 838868 839192 324 0.0
RAM 124189 124277 88 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073426 310 0.0
RAM 117117 117205 88 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 906048 316 0.0
RAM 105724 105812 88 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986492 310 0.0
RAM 109604 109692 88 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 778332 5240 0.7
RAM 103200 103352 152 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786880 972 0.1
RAM 108480 108568 88 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731900 952 0.1
RAM 97236 97308 72 0.1
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716404 928 0.1
RAM 97436 97508 72 0.1
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557544 1124 0.2
RAM 204432 204504 72 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591868 1260 0.2
RAM 204720 204808 88 0.0
efr32 lock-app BRD4187C FLASH 969072 969376 304 0.0
RAM 125444 125540 96 0.1
BRD4338a FLASH 757716 758644 928 0.1
RAM 237696 237784 88 0.0
window-app BRD4187C FLASH 1066848 1067792 944 0.1
RAM 126668 126764 96 0.1
esp32 all-clusters-app c3devkit DRAM 98220 98468 248 0.3
FLASH 1589706 1590330 624 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955812 955652 -160 -0.0
RAM 162037 162269 232 0.1
nxp contact mcxw71+release FLASH 746448 747368 920 0.1
RAM 66896 66960 64 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701780 1703196 1416 0.1
RAM 213804 214028 224 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604172 1288 0.1
RAM 210692 210876 184 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1469708 6328 0.4
RAM 196864 197008 144 0.1
lock cy8ckit_062s2_43012 FLASH 1496780 1497836 1056 0.1
RAM 224696 224784 88 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840524 344 0.0
RAM 127740 127836 96 0.1
lock-app qpg6200+debug FLASH 778824 779136 312 0.0
RAM 118688 118776 88 0.1
realtek light-switch-app rtl8777g FLASH 704816 705872 1056 0.1
RAM 113392 113528 136 0.1
lighting-app rtl8777g FLASH 746072 751552 5480 0.7
RAM 114564 114712 148 0.1
stm32 light STM32WB5MM-DK FLASH 472856 477464 4608 1.0
RAM 141208 141360 152 0.1

@github-actions github-actions Bot added the inet label Feb 18, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 18, 2026

PR #43127: Size comparison from 7636760 to d9699fc

Increases above 0.2%:

platform target config section 7636760 d9699fc change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 778332 5240 0.7
esp32 all-clusters-app c3devkit DRAM 98220 98468 248 0.3
psoc6 light cy8ckit_062s2_43012 FLASH 1463380 1469708 6328 0.4
realtek lighting-app rtl8777g FLASH 746072 751552 5480 0.7
stm32 light STM32WB5MM-DK FLASH 472856 477464 4608 1.0
Full report (27 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32)
platform target config section 7636760 d9699fc change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108410 324 0.0
RAM 178650 178730 80 0.0
bl702 lighting-app bl702+eth FLASH 663158 663490 332 0.1
RAM 134665 134737 72 0.1
bl702+wifi FLASH 838868 839192 324 0.0
RAM 124189 124277 88 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073426 310 0.0
RAM 117117 117205 88 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 906048 316 0.0
RAM 105724 105812 88 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986492 310 0.0
RAM 109604 109692 88 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 778332 5240 0.7
RAM 103200 103352 152 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786880 972 0.1
RAM 108480 108568 88 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731900 952 0.1
RAM 97236 97308 72 0.1
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716404 928 0.1
RAM 97436 97508 72 0.1
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557544 1124 0.2
RAM 204432 204504 72 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 591868 1260 0.2
RAM 204720 204808 88 0.0
efr32 lock-app BRD4187C FLASH 969072 969376 304 0.0
RAM 125444 125540 96 0.1
BRD4338a FLASH 757716 758644 928 0.1
RAM 237696 237784 88 0.0
window-app BRD4187C FLASH 1066848 1067792 944 0.1
RAM 126668 126764 96 0.1
esp32 all-clusters-app c3devkit DRAM 98220 98468 248 0.3
FLASH 1589706 1590330 624 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955812 955652 -160 -0.0
RAM 162037 162269 232 0.1
nxp contact mcxw71+release FLASH 746448 747368 920 0.1
RAM 66896 66960 64 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701780 1703196 1416 0.1
RAM 213804 214028 224 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604172 1288 0.1
RAM 210692 210876 184 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1469708 6328 0.4
RAM 196864 197008 144 0.1
lock cy8ckit_062s2_43012 FLASH 1496780 1497836 1056 0.1
RAM 224696 224784 88 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840524 344 0.0
RAM 127740 127836 96 0.1
lock-app qpg6200+debug FLASH 778824 779136 312 0.0
RAM 118688 118776 88 0.1
realtek light-switch-app rtl8777g FLASH 704816 705872 1056 0.1
RAM 113392 113528 136 0.1
lighting-app rtl8777g FLASH 746072 751552 5480 0.7
RAM 114564 114712 148 0.1
stm32 light STM32WB5MM-DK FLASH 472856 477464 4608 1.0
RAM 141208 141360 152 0.1

@github-actions github-actions Bot added the tests label Feb 18, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 18, 2026

PR #43127: Size comparison from 7636760 to 5acf3f6

Increases above 0.2%:

platform target config section 7636760 5acf3f6 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 778532 5440 0.7
cc32xx lock CC3235SF_LAUNCHXL FLASH 590608 592116 1508 0.3
esp32 all-clusters-app c3devkit DRAM 98220 98484 264 0.3
psoc6 light cy8ckit_062s2_43012 FLASH 1463380 1470052 6672 0.5
realtek lighting-app rtl8777g FLASH 746072 751752 5680 0.8
stm32 light STM32WB5MM-DK FLASH 472856 477664 4808 1.0
telink bridge-app tl7218x FLASH 714818 726630 11812 1.7
RAM 93544 95792 2248 2.4
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 835692 851490 15798 1.9
RAM 42784 44220 1436 3.4
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 720464 725190 4726 0.7
RAM 54756 55824 1068 2.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 783512 787816 4304 0.5
RAM 74460 75008 548 0.7
light-switch-app-ota-factory-data tl3218x_retention RAM 33168 33308 140 0.4
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612124 614084 1960 0.3
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 824590 841744 17154 2.1
RAM 95020 97312 2292 2.4
Full report (34 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 7636760 5acf3f6 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108086 1108388 302 0.0
RAM 178650 178738 88 0.0
bl702 lighting-app bl702+eth FLASH 663158 663468 310 0.0
RAM 134665 134737 72 0.1
bl702+wifi FLASH 838868 839170 302 0.0
RAM 124189 124277 88 0.1
bl706+mfd+rpc+littlefs FLASH 1073116 1073404 288 0.0
RAM 117117 117205 88 0.1
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905732 906026 294 0.0
RAM 105724 105828 104 0.1
lighting-app bl702l+mfd+littlefs FLASH 986182 986470 288 0.0
RAM 109604 109692 88 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 773092 778532 5440 0.7
RAM 103200 103352 152 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 785908 786880 972 0.1
RAM 108480 108576 96 0.1
pump-app LP_EM_CC1354P10_6 FLASH 730948 731892 944 0.1
RAM 97236 97316 80 0.1
pump-controller-app LP_EM_CC1354P10_6 FLASH 715476 716412 936 0.1
RAM 97436 97516 80 0.1
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556420 557792 1372 0.2
RAM 204432 204512 80 0.0
lock CC3235SF_LAUNCHXL FLASH 590608 592116 1508 0.3
RAM 204720 204808 88 0.0
efr32 lock-app BRD4187C FLASH 969072 969376 304 0.0
RAM 125444 125540 96 0.1
BRD4338a FLASH 757716 758660 944 0.1
RAM 237696 237784 88 0.0
window-app BRD4187C FLASH 1066848 1067824 976 0.1
RAM 126668 126764 96 0.1
esp32 all-clusters-app c3devkit DRAM 98220 98484 264 0.3
FLASH 1589706 1590462 756 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 955812 955776 -36 -0.0
RAM 162037 162273 236 0.1
nxp contact mcxw71+release FLASH 746448 747384 936 0.1
RAM 66896 66968 72 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701780 1703516 1736 0.1
RAM 213804 214028 224 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602884 1604412 1528 0.1
RAM 210692 210884 192 0.1
light cy8ckit_062s2_43012 FLASH 1463380 1470052 6672 0.5
RAM 196864 197008 144 0.1
lock cy8ckit_062s2_43012 FLASH 1496780 1498076 1296 0.1
RAM 224696 224784 88 0.0
qpg lighting-app qpg6200+debug FLASH 840180 840524 344 0.0
RAM 127740 127836 96 0.1
lock-app qpg6200+debug FLASH 778824 779152 328 0.0
RAM 118688 118784 96 0.1
realtek light-switch-app rtl8777g FLASH 704816 705872 1056 0.1
RAM 113392 113528 136 0.1
lighting-app rtl8777g FLASH 746072 751752 5680 0.8
RAM 114564 114720 156 0.1
stm32 light STM32WB5MM-DK FLASH 472856 477664 4808 1.0
RAM 141208 141368 160 0.1
telink bridge-app tl7218x FLASH 714818 726630 11812 1.7
RAM 93544 95792 2248 2.4
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 835692 851490 15798 1.9
RAM 42784 44220 1436 3.4
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 720464 725190 4726 0.7
RAM 54756 55824 1068 2.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 783512 787816 4304 0.5
RAM 74460 75008 548 0.7
light-switch-app-ota-factory-data tl3218x_retention FLASH 724888 725190 302 0.0
RAM 33168 33308 140 0.4
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612124 614084 1960 0.3
RAM 118120 118268 148 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 824590 841744 17154 2.1
RAM 95020 97312 2292 2.4

After backgrounding/foregrounding, commissioning crashes with null mContext.

Root cause:
- Background: ClearContext() sets mContext = null
- Foreground: Register() fails with CHIP_ERROR_DUPLICATE_KEY_ID
- SetContext() blocked, mContext stays null
- Commission attempt accesses null mContext → crash

Solution:
- Make Register() and Shutdown() idempotent for app lifecycle
- Unregister clusters in Shutdown() to clean state
- SetContext() now succeeds, restoring mContext
- Add 2-second delay in test framework after SIGTERM for socket cleanup

Testing: Validated on iOS examples/tv-casting-app app and all unit tests pass.

Test Fix: TC_TLSCERT_2_12 was failing because idempotent shutdown makes
cleanup so fast that kernel doesn't finish releasing TCP sockets before
next test starts. Added brief delay to allow proper socket cleanup.

Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)

Apply restyle formatting (whitespace & clang-format)
@pgregorr-amazon pgregorr-amazon force-pushed the ios_background_foreground_2026_02_11 branch from 5acf3f6 to b8423a7 Compare February 19, 2026 01:53
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 19, 2026

PR #43127: Size comparison from be18b91 to b8423a7

Increases above 0.2%:

platform target config section be18b91 b8423a7 change % change
esp32 all-clusters-app c3devkit DRAM 98268 98484 216 0.2
telink light-switch-app-ota-factory-data tl3218x_retention RAM 33216 33308 92 0.3
Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section be18b91 b8423a7 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1108150 1108388 238 0.0
RAM 178674 178738 64 0.0
bl702 lighting-app bl702+eth FLASH 663226 663468 242 0.0
RAM 134689 134737 48 0.0
bl702+wifi FLASH 838932 839170 238 0.0
RAM 124229 124277 48 0.0
bl706+mfd+rpc+littlefs FLASH 1073160 1073404 244 0.0
RAM 117157 117205 48 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 905774 906026 252 0.0
RAM 105748 105828 80 0.1
lighting-app bl702l+mfd+littlefs FLASH 986226 986470 244 0.0
RAM 109644 109692 48 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 777652 778532 880 0.1
RAM 103288 103352 64 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 786000 786880 880 0.1
RAM 108504 108576 72 0.1
pump-app LP_EM_CC1354P10_6 FLASH 731076 731892 816 0.1
RAM 97268 97316 48 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 715596 716412 816 0.1
RAM 97468 97516 48 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 556508 557428 920 0.2
RAM 204456 204512 56 0.0
lock CC3235SF_LAUNCHXL FLASH 590704 591752 1048 0.2
RAM 204744 204808 64 0.0
efr32 lock-app BRD4187C FLASH 969152 969376 224 0.0
RAM 125476 125540 64 0.1
BRD4338a FLASH 757724 758660 936 0.1
RAM 237712 237784 72 0.0
window-app BRD4187C FLASH 1066872 1067824 952 0.1
RAM 126700 126764 64 0.1
esp32 all-clusters-app c3devkit DRAM 98268 98484 216 0.2
FLASH 1590246 1590462 216 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 956056 955776 -280 -0.0
RAM 162085 162273 188 0.1
nxp contact mcxw71+release FLASH 746448 747384 936 0.1
RAM 66912 66968 56 0.1
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1701916 1703188 1272 0.1
RAM 213860 214028 168 0.1
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1602924 1604084 1160 0.1
RAM 210748 210884 136 0.1
light cy8ckit_062s2_43012 FLASH 1468764 1469716 952 0.1
RAM 196944 197008 64 0.0
lock cy8ckit_062s2_43012 FLASH 1496804 1497748 944 0.1
RAM 224720 224784 64 0.0
qpg lighting-app qpg6200+debug FLASH 840308 840524 216 0.0
RAM 127772 127836 64 0.1
lock-app qpg6200+debug FLASH 778904 779152 248 0.0
RAM 118720 118784 64 0.1
realtek light-switch-app rtl8777g FLASH 704952 705872 920 0.1
RAM 113440 113528 88 0.1
lighting-app rtl8777g FLASH 750848 751752 904 0.1
RAM 114648 114720 72 0.1
stm32 light STM32WB5MM-DK FLASH 477456 477664 208 0.0
RAM 141280 141368 88 0.1
telink bridge-app tl7218x FLASH 726494 726630 136 0.0
RAM 95712 95792 80 0.1
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851370 851490 120 0.0
RAM 44152 44220 68 0.2
tl7218x FLASH 842770 842890 120 0.0
RAM 99536 99604 68 0.1
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725070 725190 120 0.0
RAM 55732 55824 92 0.2
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 787696 787816 120 0.0
RAM 74916 75008 92 0.1
light-switch-app-ota-factory-data tl3218x_retention FLASH 725070 725190 120 0.0
RAM 33216 33308 92 0.3
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 613970 614084 114 0.0
RAM 118200 118268 68 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841620 841744 124 0.0
RAM 97244 97312 68 0.1

Copy link
Copy Markdown
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

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

Consensur review checkmark: authored and reviewed by media maintainers.

@mergify mergify Bot merged commit ead8174 into project-chip:master Feb 19, 2026
78 checks passed
pgregorr-amazon added a commit to pgregorr-amazon/connectedhomeip that referenced this pull request Feb 24, 2026
…nd (project-chip#43127)

After backgrounding/foregrounding, commissioning crashes with null mContext.

Root cause:
- Background: ClearContext() sets mContext = null
- Foreground: Register() fails with CHIP_ERROR_DUPLICATE_KEY_ID
- SetContext() blocked, mContext stays null
- Commission attempt accesses null mContext → crash

Solution:
- Make Register() and Shutdown() idempotent for app lifecycle
- Unregister clusters in Shutdown() to clean state
- SetContext() now succeeds, restoring mContext
- Add 2-second delay in test framework after SIGTERM for socket cleanup

Testing: Validated on iOS examples/tv-casting-app app and all unit tests pass.

Test Fix: TC_TLSCERT_2_12 was failing because idempotent shutdown makes
cleanup so fast that kernel doesn't finish releasing TCP sockets before
next test starts. Added brief delay to allow proper socket cleanup.

Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)

Apply restyle formatting (whitespace & clang-format)

(cherry picked from commit ead8174)
pgregorr-amazon added a commit to pgregorr-amazon/connectedhomeip that referenced this pull request Feb 24, 2026
…nd (project-chip#43127)

After backgrounding/foregrounding, commissioning crashes with null mContext.

Root cause:
- Background: ClearContext() sets mContext = null
- Foreground: Register() fails with CHIP_ERROR_DUPLICATE_KEY_ID
- SetContext() blocked, mContext stays null
- Commission attempt accesses null mContext → crash

Solution:
- Make Register() and Shutdown() idempotent for app lifecycle
- Unregister clusters in Shutdown() to clean state
- SetContext() now succeeds, restoring mContext
- Add 2-second delay in test framework after SIGTERM for socket cleanup

Testing: Validated on iOS examples/tv-casting-app app and all unit tests pass.

Test Fix: TC_TLSCERT_2_12 was failing because idempotent shutdown makes
cleanup so fast that kernel doesn't finish releasing TCP sockets before
next test starts. Added brief delay to allow proper socket cleanup.

Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)

Apply restyle formatting (whitespace & clang-format)

(cherry picked from commit ead8174)
pgregorr-amazon added a commit to pgregorr-amazon/connectedhomeip that referenced this pull request Feb 24, 2026
…nd (project-chip#43127)

After backgrounding/foregrounding, commissioning crashes with null mContext.

Root cause:
- Background: ClearContext() sets mContext = null
- Foreground: Register() fails with CHIP_ERROR_DUPLICATE_KEY_ID
- SetContext() blocked, mContext stays null
- Commission attempt accesses null mContext → crash

Solution:
- Make Register() and Shutdown() idempotent for app lifecycle
- Unregister clusters in Shutdown() to clean state
- SetContext() now succeeds, restoring mContext
- Add 2-second delay in test framework after SIGTERM for socket cleanup

Testing: Validated on iOS examples/tv-casting-app app and all unit tests pass.

Test Fix: TC_TLSCERT_2_12 was failing because idempotent shutdown makes
cleanup so fast that kernel doesn't finish releasing TCP sockets before
next test starts. Added brief delay to allow proper socket cleanup.

Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)

Apply restyle formatting (whitespace & clang-format)

(cherry picked from commit ead8174)
pgregorr-amazon added a commit to pgregorr-amazon/connectedhomeip that referenced this pull request Feb 24, 2026
…nd (project-chip#43127)

After backgrounding/foregrounding, commissioning crashes with null mContext.

Root cause:
- Background: ClearContext() sets mContext = null
- Foreground: Register() fails with CHIP_ERROR_DUPLICATE_KEY_ID
- SetContext() blocked, mContext stays null
- Commission attempt accesses null mContext → crash

Solution:
- Make Register() and Shutdown() idempotent for app lifecycle
- Unregister clusters in Shutdown() to clean state
- SetContext() now succeeds, restoring mContext
- Add 2-second delay in test framework after SIGTERM for socket cleanup

Testing: Validated on iOS examples/tv-casting-app app and all unit tests pass.

Test Fix: TC_TLSCERT_2_12 was failing because idempotent shutdown makes
cleanup so fast that kernel doesn't finish releasing TCP sockets before
next test starts. Added brief delay to allow proper socket cleanup.

Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)

Apply restyle formatting (whitespace & clang-format)

(cherry picked from commit ead8174)
andy31415 pushed a commit that referenced this pull request Feb 26, 2026
…nd (#43127) (#43299)

After backgrounding/foregrounding, commissioning crashes with null mContext.

Root cause:
- Background: ClearContext() sets mContext = null
- Foreground: Register() fails with CHIP_ERROR_DUPLICATE_KEY_ID
- SetContext() blocked, mContext stays null
- Commission attempt accesses null mContext → crash

Solution:
- Make Register() and Shutdown() idempotent for app lifecycle
- Unregister clusters in Shutdown() to clean state
- SetContext() now succeeds, restoring mContext
- Add 2-second delay in test framework after SIGTERM for socket cleanup

Testing: Validated on iOS examples/tv-casting-app app and all unit tests pass.

Test Fix: TC_TLSCERT_2_12 was failing because idempotent shutdown makes
cleanup so fast that kernel doesn't finish releasing TCP sockets before
next test starts. Added brief delay to allow proper socket cleanup.

Applies to all platforms with app lifecycle (iOS, Android, tvOS, etc.)

Apply restyle formatting (whitespace & clang-format)

(cherry picked from commit ead8174)
void DefaultServerCluster::Shutdown(ClusterShutdownType)
{
mContext = nullptr;
// Make shutdown idempotent - safe to call multiple times
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It was safe before though ... you can set mContext to nullptr multiple times. This seems like trying to preserve mContext non-null if mShutdown is called.

This feels off.

protected:
const ConcreteClusterPath mPath;
ServerClusterContext * mContext = nullptr;
// Tracks if shutdown has been called to make it idempotent
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment does not make things clear.

Copy link
Copy Markdown
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

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

@pgregorr-amazon I thought I originally reviewed changes to casting apps, but now I see changes to clusters and DefaultServerCluster which I am not clear about. it seems to not enforce Startup/Shutdown symmetry which feels off.

{
VerifyOrReturnError(mContext == nullptr, CHIP_ERROR_ALREADY_INITIALIZED);
// Reset shutdown state to allow restart after shutdown
mIsShutdown = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this not equivalent to using/checking mContext being null or not?

We should probably focus on mDataVersion updates as the differentiating factor.

At the same time, why do we allow startup called while startup was already called? The original API contract was that startup/shutdown are paired and documentation below seems to say the same.

Span<const ConcreteClusterPath> paths = entry.serverClusterInterface->GetPaths();
VerifyOrReturnError(!paths.empty(), CHIP_ERROR_INVALID_ARGUMENT);

// Check early if this cluster is already registered (idempotent case)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I had missed this change in the original review ... the intent for registration was to disallow double-registration.

// Double-checking for duplicates makes the checks O(n^2) on the total number of registered
// items. We preserve this however we may want to make this optional at some point in time.
VerifyOrReturnError(Get(path) == nullptr, CHIP_ERROR_DUPLICATE_KEY_ID);
// A different cluster is already registered for this path
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems equivalent to the previous code that did VerifyOrReturnError ... could we have made the delta smaller?

// Handle idempotent Create() - if already constructed, this is a no-op.
// The cluster remains registered and functional. This supports the Stop() → Start() lifecycle
// where clusters are shutdown but remain constructed.
if (IsConstructed())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We do not actually wanted this .... sorry for the review, my original assumption was that we only changed tv casting code.

andy31415 added a commit to andy31415/connectedhomeip that referenced this pull request Mar 3, 2026
andy31415 added a commit that referenced this pull request Mar 4, 2026
Sarthak-Shaha pushed a commit to Sarthak-Shaha/connectedhomeip_silabs that referenced this pull request Mar 5, 2026
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