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

RPC: Fix locks in the RPC services #16720

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

rgoliver
Copy link

Problem

RPC services not locking the chip stack when reading and writing attributes, which is causing RPCs to fail assert.

Change overview

Add locks to the RPC services.

Testing

Using the chip-console on m5stack, verified the RPC services now work.

- Add RAII lock for RPCs which use the ember API to read and write
  attributes.
@github-actions
Copy link

github-actions bot commented Mar 28, 2022

PR #16720: Size comparison from 125e73c to 261af0a

Increases (3 builds for efr32, linux, mbed)
platform target config section 125e73c 261af0a change % change
efr32 lighting-app BRD4161A+rpc (read only) 955416 955624 208 0.0
.text 955408 955616 208 0.0
linux lighting-app debug+rpc (read only) 2191489 2191889 400 0.0
.text 1856962 1857362 400 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2355644 2355708 64 0.0
.text 1318244 1318308 64 0.0
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 125e73c 261af0a change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605426 605426 0 0.0
.app_xip_area 512356 512356 0 0.0
.bss 75816 75816 0 0.0
.data 604 604 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 563238 563238 0 0.0
.app_xip_area 471696 471696 0 0.0
.bss 74320 74320 0 0.0
.data 568 568 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575498 575498 0 0.0
.app_xip_area 474308 474308 0 0.0
.bss 83648 83648 0 0.0
.data 508 508 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 926600 926600 0 0.0
(read/write) 128952 128952 0 0.0
.bss 126952 126952 0 0.0
.data 1996 1996 0 0.0
.text 926592 926592 0 0.0
BRD4161A+rpc (read only) 955416 955624 208 0.0
(read/write) 144904 144904 0 0.0
.bss 142728 142728 0 0.0
.data 2176 2176 0 0.0
.text 955408 955616 208 0.0
window-app BRD4161A (read only) 856004 856004 0 0.0
(read/write) 126912 126912 0 0.0
.bss 125040 125040 0 0.0
.data 1872 1872 0 0.0
.text 855996 855996 0 0.0
esp32 all-clusters-app c3devkit (read only) 966714 966714 0 0.0
(read/write) 1394810 1394810 0 0.0
.dram0.bss 62240 62240 0 0.0
.dram0.data 14204 14204 0 0.0
.flash.rodata 199456 199456 0 0.0
.flash.text 966714 966714 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1023131 1023131 0 0.0
(read/write) 462572 462572 0 0.0
.dram0.bss 67768 67768 0 0.0
.dram0.data 34024 34024 0 0.0
.flash.rodata 228944 228944 0 0.0
.flash.text 1017747 1017747 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 704272 704272 0 0.0
.bss 77808 77808 0 0.0
.data 1876 1876 0 0.0
.text 618788 618788 0 0.0
lock k32w061+release (read/write) 703364 703364 0 0.0
.bss 77784 77784 0 0.0
.data 1916 1916 0 0.0
.text 617864 617864 0 0.0
linux all-clusters-app debug (read only) 2525993 2525993 0 0.0
(read/write) 143352 143352 0 0.0
.bss 57408 57408 0 0.0
.data 1280 1280 0 0.0
.data.rel.ro 78920 78920 0 0.0
.dynamic 592 592 0 0.0
.got 4184 4184 0 0.0
.init 27 27 0 0.0
.init_array 944 944 0 0.0
.rodata 216549 216549 0 0.0
.text 2145618 2145618 0 0.0
bridge-app debug+rpc (read only) 1765325 1765325 0 0.0
(read/write) 89520 89520 0 0.0
.bss 44520 44520 0 0.0
.data 1984 1984 0 0.0
.data.rel.ro 37936 37936 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 144684 144684 0 0.0
.text 1505285 1505285 0 0.0
chip-tool debug (read only) 10183973 10183973 0 0.0
(read/write) 355656 355656 0 0.0
.bss 22464 22464 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 326008 326008 0 0.0
.dynamic 608 608 0 0.0
.got 4824 4824 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 518805 518805 0 0.0
.text 8880629 8880629 0 0.0
chip-tool-ipv6only arm64 (read only) 9815548 9815548 0 0.0
(read/write) 473697 473697 0 0.0
.bss 40737 40737 0 0.0
.data 1144 1144 0 0.0
.data.rel.ro 372656 372656 0 0.0
.dynamic 560 560 0 0.0
.got 55352 55352 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 494212 494212 0 0.0
.text 8268164 8268164 0 0.0
door-lock-app debug (read only) 2017153 2017153 0 0.0
(read/write) 116896 116896 0 0.0
.bss 47648 47648 0 0.0
.data 992 992 0 0.0
.data.rel.ro 62840 62840 0 0.0
.dynamic 592 592 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 181276 181276 0 0.0
.text 1686066 1686066 0 0.0
lighting-app debug+rpc (read only) 2191489 2191889 400 0.0
(read/write) 123888 123888 0 0.0
.bss 48928 48928 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 67928 67928 0 0.0
.dynamic 608 608 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 744 744 0 0.0
.rodata 175356 175356 0 0.0
.text 1856962 1857362 400 0.0
ota-provider-app debug (read only) 1957977 1957977 0 0.0
(read/write) 112688 112688 0 0.0
.bss 47584 47584 0 0.0
.data 1256 1256 0 0.0
.data.rel.ro 58184 58184 0 0.0
.dynamic 608 608 0 0.0
.got 4384 4384 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 167115 167115 0 0.0
.text 1638994 1638994 0 0.0
ota-requestor-app debug (read only) 1985569 1985569 0 0.0
(read/write) 115912 115912 0 0.0
.bss 48512 48512 0 0.0
.data 1480 1480 0 0.0
.data.rel.ro 60440 60440 0 0.0
.dynamic 592 592 0 0.0
.got 4192 4192 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 163236 163236 0 0.0
.text 1669458 1669458 0 0.0
shell debug (read only) 2441625 2441625 0 0.0
(read/write) 147368 147368 0 0.0
.bss 67304 67304 0 0.0
.data 800 800 0 0.0
.data.rel.ro 73568 73568 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 210034 210034 0 0.0
.text 2074642 2074642 0 0.0
thermostat-no-ble arm64 (read only) 2275156 2275156 0 0.0
(read/write) 148369 148369 0 0.0
.bss 62817 62817 0 0.0
.data 1040 1040 0 0.0
.data.rel.ro 77000 77000 0 0.0
.dynamic 560 560 0 0.0
.got 4504 4504 0 0.0
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 140036 140036 0 0.0
.text 1911760 1911760 0 0.0
tv-app debug (read only) 2688417 2688417 0 0.0
(read/write) 247520 247520 0 0.0
.bss 164288 164288 0 0.0
.data 3136 3136 0 0.0
.data.rel.ro 74048 74048 0 0.0
.dynamic 592 592 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 206059 206059 0 0.0
.text 2307730 2307730 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2355644 2355708 64 0.0
.bss 184860 184860 0 0.0
.data 5760 5760 0 0.0
.text 1318244 1318308 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1143379 1143379 0 0.0
bss 142892 142892 0 0.0
rodata 142364 142364 0 0.0
text 783240 783240 0 0.0
p6 all-clusters-app default (read/write) 2498384 2498384 0 0.0
.bss 118280 118280 0 0.0
.data 2640 2640 0 0.0
.text 1456648 1456648 0 0.0
light-app default (read/write) 2400816 2400816 0 0.0
.bss 111752 111752 0 0.0
.data 2496 2496 0 0.0
.text 1359080 1359080 0 0.0
lock-app default (read/write) 2364352 2364352 0 0.0
.bss 111496 111496 0 0.0
.data 2456 2456 0 0.0
.text 1322616 1322616 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 898750 898750 0 0.0
bss 87596 87596 0 0.0
noinit 37160 37160 0 0.0
text 635626 635626 0 0.0

@Damian-Nordic Damian-Nordic merged commit d6fcbd9 into project-chip:master Mar 29, 2022
rochaferraz pushed a commit to rochaferraz/connectedhomeip that referenced this pull request Mar 31, 2022
- Add RAII lock for RPCs which use the ember API to read and write
  attributes.
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
- Add RAII lock for RPCs which use the ember API to read and write
  attributes.
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.

3 participants