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 handling of OperationalDeviceProxy and CHIPCluster in Darwin framework #21504

Conversation

bzbarsky-apple
Copy link
Contributor

Darwin framework objects were holding on to OperationalDeviceProxy and CHIPCluster instances, but OperationalDeviceProxy can be destroyed randomly by anyone who cares to do it, and CHIPCluster is really designed as a stack-only object.

This PR makes the following changes:

  • MTRBaseDevice now either stores a DeviceProxy (for PASE only) or a node id
    (for CASE).

  • MTRBaseCluster instances now just store a DeviceProxy.

  • MTRCallbackBridge will handle getting an exchange manager and session before
    invoking the action block, unless the action block is runnable without any
    remote interaction (the "read from cache" case).

  • Most of the MTRDevice and MTRClusters APIs that used to sync-run things on the
    Matter queue now do it async when doing CASE. They were changed to copy their
    incoming arguments to avoid the caller mutating them after the call.

I believe this should fix #21430

Problem

Crashes, lifetime issues.

Change overview

See above.

Testing

Should pass all existing CI; no behavior changes in normal use, just making things saner for other work and improving error handling.

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

PR #21504: Size comparison from c902d88 to 2a5ea0f

Increases (3 builds for bl602, telink)
platform target config section c902d88 2a5ea0f change % change
bl602 lighting-app bl602 (read/write) 1382522 1382530 8 0.0
.text 1052636 1052640 4 0.0
bl602+rpc .text 1084304 1084308 4 0.0
telink light-switch-app tlsr9518adk80d text 569294 569296 2 0.0
Decreases (1 build for esp32)
platform target config section c902d88 2a5ea0f change % change
esp32 all-clusters-app c3devkit (read only) 1024314 1024310 -4 -0.0
.flash.text 1024314 1024310 -4 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section c902d88 2a5ea0f change % change
bl602 lighting-app bl602 (read/write) 1382522 1382530 8 0.0
.bss 117626 117626 0 0.0
.data 4480 4480 0 0.0
.text 1052636 1052640 4 0.0
bl602+rpc (read/write) 1427930 1427930 0 0.0
.bss 125066 125066 0 0.0
.data 4600 4600 0 0.0
.text 1084304 1084308 4 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 669899 669899 0 0.0
(read/write) 181484 181484 0 0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88467 88467 0 0.0
.text 581116 581116 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 635403 635403 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77691 77691 0 0.0
.text 557388 557388 0 0.0
lock-ftd LP_CC2652R7 (read only) 672871 672871 0 0.0
(read/write) 168696 168696 0 0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76535 76535 0 0.0
.text 595856 595856 0 0.0
lock-mtd LP_CC2652R7 (read only) 655427 655427 0 0.0
(read/write) 181828 181828 0 0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101531 101531 0 0.0
.text 553416 553416 0 0.0
pump-app LP_CC2652R7 (read only) 681367 681367 0 0.0
(read/write) 161008 161008 0 0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 88919 88919 0 0.0
.text 591964 591964 0 0.0
pump-controller-app LP_CC2652R7 (read only) 666943 666943 0 0.0
(read/write) 175568 175568 0 0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84743 84743 0 0.0
.text 581720 581720 0 0.0
shell LP_CC2652R7 (read only) 662606 662606 0 0.0
(read/write) 184296 184296 0 0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85446 85446 0 0.0
.text 576844 576844 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584054 584054 0 0.0
.app_xip_area 460864 460864 0 0.0
.bss 65632 65632 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590318 590318 0 0.0
.app_xip_area 462376 462376 0 0.0
.bss 70384 70384 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589762 589762 0 0.0
.app_xip_area 467380 467380 0 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1089040 1089040 0 0.0
.bss 133268 133268 0 0.0
.data 2064 2064 0 0.0
.text 953688 953688 0 0.0
BRD4161A+rpc (read/write) 1143332 1143332 0 0.0
.bss 149948 149948 0 0.0
.data 2276 2276 0 0.0
.text 991088 991088 0 0.0
BRD4161A+rs911x (read/write) 975008 975008 0 0.0
.bss 161744 161744 0 0.0
.data 2048 2048 0 0.0
.text 811196 811196 0 0.0
lock-app BRD4161A+wf200 (read/write) 1130472 1130472 0 0.0
.bss 144400 144400 0 0.0
.data 2056 2056 0 0.0
.text 983996 983996 0 0.0
window-app BRD4161A (read/write) 1082332 1082332 0 0.0
.bss 134748 134748 0 0.0
.data 2092 2092 0 0.0
.text 945468 945468 0 0.0
esp32 all-clusters-app c3devkit (read only) 1024314 1024310 -4 -0.0
(read/write) 1487042 1487042 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216672 216672 0 0.0
.flash.text 1024314 1024310 -4 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1077807 1077807 0 0.0
(read/write) 489064 489064 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247084 247084 0 0.0
.flash.text 1072423 1072423 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 643448 643448 0 0.0
.bss 69720 69720 0 0.0
.data 2044 2044 0 0.0
.text 568956 568956 0 0.0
lock k32w0+release (read/write) 701816 701816 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626852 626852 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9939852 9939852 0 0.0
(read/write) 690049 690049 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 635336 635336 0 0.0
.dynamic 560 560 0 0.0
.got 13592 13592 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 470892 470892 0 0.0
.text 7851476 7851476 0 0.0
thermostat-no-ble arm64 (read only) 2349996 2349996 0 0.0
(read/write) 141761 141761 0 0.0
.bss 55329 55329 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75976 75976 0 0.0
.dynamic 560 560 0 0.0
.got 5016 5016 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139316 139316 0 0.0
.text 1973168 1973168 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453288 2453288 0 0.0
.bss 214548 214548 0 0.0
.data 5872 5872 0 0.0
.text 1415932 1415932 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176491 1176491 0 0.0
bss 143224 143224 0 0.0
rodata 142620 142620 0 0.0
text 811800 811800 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156363 1156363 0 0.0
bss 142460 142460 0 0.0
rodata 134148 134148 0 0.0
text 800944 800944 0 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1689156 1689156 0 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1528952 1528952 0 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1633188 1633188 0 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1473704 1473704 0 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1553444 1553444 0 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1402280 1402280 0 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592100 1592100 0 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436440 1436440 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805440 805440 0 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569294 569296 2 0.0
lighting-app tlsr9518adk80d (read/write) 825880 825880 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 586182 586182 0 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the darwin-operational-proxy-sanity branch from 2a5ea0f to 2b77009 Compare August 2, 2022 00:40
@woody-apple woody-apple enabled auto-merge (squash) August 2, 2022 00:49
@github-actions
Copy link

github-actions bot commented Aug 2, 2022

PR #21504: Size comparison from 488c9b7 to 2b77009

Increases (4 builds for bl602, cc13x2_26x2, telink)
platform target config section 488c9b7 2b77009 change % change
bl602 lighting-app bl602 (read/write) 1382634 1382642 8 0.0
.text 1052748 1052752 4 0.0
cc13x2_26x2 lock-mtd LP_CC2652R7 (read/write) 181756 181764 8 0.0
shell LP_CC2652R7 (read only) 662670 662678 8 0.0
.text 576908 576916 8 0.0
telink lighting-app tlsr9518adk80d text 586290 586292 2 0.0
Decreases (3 builds for cc13x2_26x2, esp32)
platform target config section 488c9b7 2b77009 change % change
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 655499 655491 -8 -0.0
.text 553488 553480 -8 -0.0
shell LP_CC2652R7 (read/write) 184232 184224 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1024424 1024422 -2 -0.0
.flash.text 1024424 1024422 -2 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 488c9b7 2b77009 change % change
bl602 lighting-app bl602 (read/write) 1382634 1382642 8 0.0
.bss 117626 117626 0 0.0
.data 4480 4480 0 0.0
.text 1052748 1052752 4 0.0
bl602+rpc (read/write) 1428042 1428042 0 0.0
.bss 125066 125066 0 0.0
.data 4600 4600 0 0.0
.text 1084416 1084416 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 669971 669971 0 0.0
(read/write) 181412 181412 0 0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88467 88467 0 0.0
.text 581188 581188 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 635475 635475 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77691 77691 0 0.0
.text 557460 557460 0 0.0
lock-ftd LP_CC2652R7 (read only) 672943 672943 0 0.0
(read/write) 168624 168624 0 0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76535 76535 0 0.0
.text 595928 595928 0 0.0
lock-mtd LP_CC2652R7 (read only) 655499 655491 -8 -0.0
(read/write) 181756 181764 8 0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101531 101531 0 0.0
.text 553488 553480 -8 -0.0
pump-app LP_CC2652R7 (read only) 681439 681439 0 0.0
(read/write) 160936 160936 0 0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 88919 88919 0 0.0
.text 592036 592036 0 0.0
pump-controller-app LP_CC2652R7 (read only) 667015 667015 0 0.0
(read/write) 175496 175496 0 0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84743 84743 0 0.0
.text 581792 581792 0 0.0
shell LP_CC2652R7 (read only) 662670 662678 8 0.0
(read/write) 184232 184224 -8 -0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85446 85446 0 0.0
.text 576908 576916 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584126 584126 0 0.0
.app_xip_area 460936 460936 0 0.0
.bss 65632 65632 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590390 590390 0 0.0
.app_xip_area 462448 462448 0 0.0
.bss 70384 70384 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589834 589834 0 0.0
.app_xip_area 467452 467452 0 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1089120 1089120 0 0.0
.bss 133268 133268 0 0.0
.data 2064 2064 0 0.0
.text 953768 953768 0 0.0
window-app BRD4161A (read/write) 1082412 1082412 0 0.0
.bss 134748 134748 0 0.0
.data 2092 2092 0 0.0
.text 945548 945548 0 0.0
lighting-app BRD4161A+rpc (read/write) 1143412 1143412 0 0.0
.bss 149948 149948 0 0.0
.data 2276 2276 0 0.0
.text 991168 991168 0 0.0
BRD4161A+rs911x (read/write) 975088 975088 0 0.0
.bss 161744 161744 0 0.0
.data 2048 2048 0 0.0
.text 811276 811276 0 0.0
lock-app BRD4161A+wf200 (read/write) 1130536 1130536 0 0.0
.bss 144400 144400 0 0.0
.data 2056 2056 0 0.0
.text 984060 984060 0 0.0
esp32 all-clusters-app c3devkit (read only) 1024424 1024422 -2 -0.0
(read/write) 1487042 1487042 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216672 216672 0 0.0
.flash.text 1024424 1024422 -2 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1077903 1077903 0 0.0
(read/write) 489064 489064 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247084 247084 0 0.0
.flash.text 1072519 1072519 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 643528 643528 0 0.0
.bss 69720 69720 0 0.0
.data 2044 2044 0 0.0
.text 569036 569036 0 0.0
lock k32w0+release (read/write) 701896 701896 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626932 626932 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9940684 9940684 0 0.0
(read/write) 690049 690049 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 635336 635336 0 0.0
.dynamic 560 560 0 0.0
.got 13592 13592 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 470972 470972 0 0.0
.text 7852228 7852228 0 0.0
thermostat-no-ble arm64 (read only) 2350572 2350572 0 0.0
(read/write) 141761 141761 0 0.0
.bss 55329 55329 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75976 75976 0 0.0
.dynamic 560 560 0 0.0
.got 5016 5016 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139412 139412 0 0.0
.text 1973648 1973648 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453416 2453416 0 0.0
.bss 214548 214548 0 0.0
.data 5872 5872 0 0.0
.text 1416060 1416060 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176555 1176555 0 0.0
bss 143224 143224 0 0.0
rodata 142620 142620 0 0.0
text 811872 811872 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156443 1156443 0 0.0
bss 142460 142460 0 0.0
rodata 134148 134148 0 0.0
text 801020 801020 0 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1689236 1689236 0 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1529032 1529032 0 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1633268 1633268 0 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1473784 1473784 0 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1553524 1553524 0 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1402360 1402360 0 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592180 1592180 0 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436520 1436520 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805544 805544 0 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569404 569404 0 0.0
lighting-app tlsr9518adk80d (read/write) 825984 825984 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 586290 586292 2 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the darwin-operational-proxy-sanity branch from 2b77009 to 2b444fd Compare August 2, 2022 03:06
…ework.

Darwin framework objects were holding on to OperationalDeviceProxy and
CHIPCluster instances, but OperationalDeviceProxy can be destroyed randomly by
anyone who cares to do it, and CHIPCluster is really designed as a stack-only
object.

This PR makes the following changes:

* MTRBaseDevice now either stores a DeviceProxy (for PASE only) or a node id
  (for CASE).

* MTRBaseCluster instances now just store a DeviceProxy.

* MTRCallbackBridge will handle getting an exchange manager and session before
  invoking the action block, unless the action block is runnable without any
  remote interaction (the "read from cache" case).

* Most of the MTRDevice and MTRClusters APIs that used to sync-run things on the
  Matter queue now do it async when doing CASE.  They were changed to copy their
  incoming arguments to avoid the caller mutating them after the call.

I believe this should fix project-chip#21430
@bzbarsky-apple bzbarsky-apple force-pushed the darwin-operational-proxy-sanity branch from 2b444fd to 586a0bc Compare August 2, 2022 04:12
@github-actions
Copy link

github-actions bot commented Aug 2, 2022

PR #21504: Size comparison from 97134c5 to 586a0bc

Increases (3 builds for cc13x2_26x2, telink)
platform target config section 97134c5 586a0bc change % change
cc13x2_26x2 shell LP_CC2652R7 (read/write) 184224 184232 8 0.0
telink light-switch-app tlsr9518adk80d text 569418 569420 2 0.0
lighting-app tlsr9518adk80d text 586306 586308 2 0.0
Decreases (2 builds for cc13x2_26x2, esp32)
platform target config section 97134c5 586a0bc change % change
cc13x2_26x2 shell LP_CC2652R7 (read only) 662678 662670 -8 -0.0
.text 576916 576908 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1024448 1024446 -2 -0.0
.flash.text 1024448 1024446 -2 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 97134c5 586a0bc change % change
bl602 lighting-app bl602 (read/write) 1382658 1382658 0 0.0
.bss 117626 117626 0 0.0
.data 4480 4480 0 0.0
.text 1052768 1052768 0 0.0
bl602+rpc (read/write) 1428058 1428058 0 0.0
.bss 125066 125066 0 0.0
.data 4600 4600 0 0.0
.text 1084432 1084432 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 669979 669979 0 0.0
(read/write) 181404 181404 0 0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88467 88467 0 0.0
.text 581196 581196 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 635491 635491 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77691 77691 0 0.0
.text 557476 557476 0 0.0
lock-ftd LP_CC2652R7 (read only) 672959 672959 0 0.0
(read/write) 168608 168608 0 0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76535 76535 0 0.0
.text 595944 595944 0 0.0
lock-mtd LP_CC2652R7 (read only) 655507 655507 0 0.0
(read/write) 181748 181748 0 0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101531 101531 0 0.0
.text 553496 553496 0 0.0
pump-app LP_CC2652R7 (read only) 681447 681447 0 0.0
(read/write) 160928 160928 0 0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 88919 88919 0 0.0
.text 592044 592044 0 0.0
pump-controller-app LP_CC2652R7 (read only) 667023 667023 0 0.0
(read/write) 175488 175488 0 0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84743 84743 0 0.0
.text 581800 581800 0 0.0
shell LP_CC2652R7 (read only) 662678 662670 -8 -0.0
(read/write) 184224 184232 8 0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85446 85446 0 0.0
.text 576916 576908 -8 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584142 584142 0 0.0
.app_xip_area 460952 460952 0 0.0
.bss 65632 65632 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590614 590614 0 0.0
.app_xip_area 462640 462640 0 0.0
.bss 70416 70416 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589850 589850 0 0.0
.app_xip_area 467468 467468 0 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1089152 1089152 0 0.0
.bss 133268 133268 0 0.0
.data 2064 2064 0 0.0
.text 953800 953800 0 0.0
BRD4161A+rpc (read/write) 1143460 1143460 0 0.0
.bss 149948 149948 0 0.0
.data 2276 2276 0 0.0
.text 991216 991216 0 0.0
BRD4161A+rs911x (read/write) 975120 975120 0 0.0
.bss 161744 161744 0 0.0
.data 2048 2048 0 0.0
.text 811308 811308 0 0.0
lock-app BRD4161A+wf200 (read/write) 1130552 1130552 0 0.0
.bss 144400 144400 0 0.0
.data 2056 2056 0 0.0
.text 984076 984076 0 0.0
window-app BRD4161A (read/write) 1082460 1082460 0 0.0
.bss 134748 134748 0 0.0
.data 2092 2092 0 0.0
.text 945596 945596 0 0.0
esp32 all-clusters-app c3devkit (read only) 1024448 1024446 -2 -0.0
(read/write) 1487042 1487042 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216672 216672 0 0.0
.flash.text 1024448 1024446 -2 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1077927 1077927 0 0.0
(read/write) 489064 489064 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247084 247084 0 0.0
.flash.text 1072543 1072543 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 643528 643528 0 0.0
.bss 69720 69720 0 0.0
.data 2044 2044 0 0.0
.text 569036 569036 0 0.0
lock k32w0+release (read/write) 701896 701896 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626932 626932 0 0.0
linux all-clusters-app debug (read only) 3015057 3015057 0 0.0
(read/write) 155720 155720 0 0.0
.bss 61888 61888 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85384 85384 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 271915 271915 0 0.0
.text 2564258 2564258 0 0.0
all-clusters-minimal-app debug (read only) 2856873 2856873 0 0.0
(read/write) 147488 147488 0 0.0
.bss 61152 61152 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77992 77992 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 271947 271947 0 0.0
.text 2408674 2408674 0 0.0
bridge-app debug+rpc (read only) 2362201 2362201 0 0.0
(read/write) 127584 127584 0 0.0
.bss 50592 50592 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67544 67544 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 202728 202728 0 0.0
.text 1996466 1996466 0 0.0
chip-tool debug (read only) 10558633 10558633 0 0.0
(read/write) 646336 646336 0 0.0
.bss 24856 24856 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 611704 611704 0 0.0
.dynamic 608 608 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 539509 539509 0 0.0
.text 8523172 8523172 0 0.0
chip-tool-ipv6only arm64 (read only) 9960892 9960892 0 0.0
(read/write) 694017 694017 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 639264 639264 0 0.0
.dynamic 560 560 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 471180 471180 0 0.0
.text 7862884 7862884 0 0.0
lighting-app debug+rpc (read only) 2584673 2584673 0 0.0
(read/write) 130232 130232 0 0.0
.bss 49728 49728 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72456 72456 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 912 912 0 0.0
.rodata 218384 218384 0 0.0
.text 2195218 2195218 0 0.0
lock-app debug (read only) 2573337 2573337 0 0.0
(read/write) 125568 125568 0 0.0
.bss 48256 48256 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69592 69592 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 235920 235920 0 0.0
.text 2170402 2170402 0 0.0
ota-provider-app debug (read only) 2353265 2353265 0 0.0
(read/write) 119048 119048 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63416 63416 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 208920 208920 0 0.0
.text 1980466 1980466 0 0.0
ota-requestor-app debug (read only) 2473857 2473857 0 0.0
(read/write) 126440 126440 0 0.0
.bss 50176 50176 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 68072 68072 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 212448 212448 0 0.0
.text 2088914 2088914 0 0.0
shell debug (read only) 2586265 2586265 0 0.0
(read/write) 141872 141872 0 0.0
.bss 57800 57800 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77008 77008 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1024 1024 0 0.0
.rodata 232882 232882 0 0.0
.text 2195154 2195154 0 0.0
thermostat-no-ble arm64 (read only) 2350700 2350700 0 0.0
(read/write) 141761 141761 0 0.0
.bss 55329 55329 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75976 75976 0 0.0
.dynamic 560 560 0 0.0
.got 5016 5016 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139412 139412 0 0.0
.text 1973776 1973776 0 0.0
tv-app debug (read only) 3155865 3155865 0 0.0
(read/write) 257744 257744 0 0.0
.bss 167352 167352 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 79104 79104 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 1072 1072 0 0.0
.rodata 256392 256392 0 0.0
.text 2709874 2709874 0 0.0
tv-casting-app debug (read only) 5393105 5393105 0 0.0
(read/write) 158728 158728 0 0.0
.bss 51384 51384 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98504 98504 0 0.0
.dynamic 608 608 0 0.0
.got 4736 4736 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 339825 339825 0 0.0
.text 4785986 4785986 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453416 2453416 0 0.0
.bss 214548 214548 0 0.0
.data 5872 5872 0 0.0
.text 1416060 1416060 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176571 1176571 0 0.0
bss 143224 143224 0 0.0
rodata 142620 142620 0 0.0
text 811888 811888 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156459 1156459 0 0.0
bss 142460 142460 0 0.0
rodata 134148 134148 0 0.0
text 801036 801036 0 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1689268 1689268 0 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1529064 1529064 0 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1633300 1633300 0 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1473816 1473816 0 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1553556 1553556 0 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1402392 1402392 0 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592212 1592212 0 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436552 1436552 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805560 805560 0 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569418 569420 2 0.0
lighting-app tlsr9518adk80d (read/write) 826000 826000 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 586306 586308 2 0.0

@woody-apple woody-apple merged commit cbd90ca into project-chip:master Aug 2, 2022
github-actions bot pushed a commit that referenced this pull request Aug 2, 2022
…ework. (#21504)

Darwin framework objects were holding on to OperationalDeviceProxy and
CHIPCluster instances, but OperationalDeviceProxy can be destroyed randomly by
anyone who cares to do it, and CHIPCluster is really designed as a stack-only
object.

This PR makes the following changes:

* MTRBaseDevice now either stores a DeviceProxy (for PASE only) or a node id
  (for CASE).

* MTRBaseCluster instances now just store a DeviceProxy.

* MTRCallbackBridge will handle getting an exchange manager and session before
  invoking the action block, unless the action block is runnable without any
  remote interaction (the "read from cache" case).

* Most of the MTRDevice and MTRClusters APIs that used to sync-run things on the
  Matter queue now do it async when doing CASE.  They were changed to copy their
  incoming arguments to avoid the caller mutating them after the call.

I believe this should fix #21430
@bzbarsky-apple bzbarsky-apple deleted the darwin-operational-proxy-sanity branch August 2, 2022 11:32
woody-apple added a commit that referenced this pull request Aug 2, 2022
…ework. (#21504) (#21528)

Darwin framework objects were holding on to OperationalDeviceProxy and
CHIPCluster instances, but OperationalDeviceProxy can be destroyed randomly by
anyone who cares to do it, and CHIPCluster is really designed as a stack-only
object.

This PR makes the following changes:

* MTRBaseDevice now either stores a DeviceProxy (for PASE only) or a node id
  (for CASE).

* MTRBaseCluster instances now just store a DeviceProxy.

* MTRCallbackBridge will handle getting an exchange manager and session before
  invoking the action block, unless the action block is runnable without any
  remote interaction (the "read from cache" case).

* Most of the MTRDevice and MTRClusters APIs that used to sync-run things on the
  Matter queue now do it async when doing CASE.  They were changed to copy their
  incoming arguments to avoid the caller mutating them after the call.

I believe this should fix #21430

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…ework. (project-chip#21504)

Darwin framework objects were holding on to OperationalDeviceProxy and
CHIPCluster instances, but OperationalDeviceProxy can be destroyed randomly by
anyone who cares to do it, and CHIPCluster is really designed as a stack-only
object.

This PR makes the following changes:

* MTRBaseDevice now either stores a DeviceProxy (for PASE only) or a node id
  (for CASE).

* MTRBaseCluster instances now just store a DeviceProxy.

* MTRCallbackBridge will handle getting an exchange manager and session before
  invoking the action block, unless the action block is runnable without any
  remote interaction (the "read from cache" case).

* Most of the MTRDevice and MTRClusters APIs that used to sync-run things on the
  Matter queue now do it async when doing CASE.  They were changed to copy their
  incoming arguments to avoid the caller mutating them after the call.

I believe this should fix project-chip#21430
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.

[crash] Matter: __59-[MTRBaseClusterPowerSource initWithDevice:endpoint:queue:]_block_invoke
2 participants