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 boot crash in all-clusters-app on esp32 #11079

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

#10907 added some
identify bits on Linux only but changed the core cluster impl to
assume that those bits are always there.

This change stops assuming that identify is actually configured on
every endpoint that supports it, since nothing enforces that.

Problem

Crash on startup.

Change overview

Add the needed null-check.

Testing

Booted m5stack with all-clusters-app, made sure it boots properly.

@andy31415
Copy link
Contributor

fast track: trivial change

@github-actions
Copy link

github-actions bot commented Oct 27, 2021

PR #11079: Size comparison from 92d530a to a6d9932

Increases (1 build for linux)
platform target config section 92d530a a6d9932 change % change
linux all-clusters-app debug (read only) 1642353 1642369 16 0.0
.text 1373794 1373810 16 0.0
Full report (20 builds for efr32, k32w, linux, p6, qpg, telink)
platform target config section 92d530a a6d9932 change % change
efr32 lighting-app BRD4161A (read only) 737064 737064 0 0.0
(read/write) 115444 115444 0 0.0
.bss 113692 113692 0 0.0
.data 1752 1752 0 0.0
.text 737056 737056 0 0.0
BRD4161A+rpc (read only) 724492 724492 0 0.0
(read/write) 132048 132048 0 0.0
.bss 130196 130196 0 0.0
.data 1852 1852 0 0.0
.text 724484 724484 0 0.0
lock-app BRD4161A (read only) 716328 716328 0 0.0
(read/write) 113260 113260 0 0.0
.bss 111548 111548 0 0.0
.data 1712 1712 0 0.0
.text 716320 716320 0 0.0
window-app BRD4161A (read only) 717248 717248 0 0.0
(read/write) 113588 113588 0 0.0
.bss 111868 111868 0 0.0
.data 1716 1716 0 0.0
.text 717240 717240 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 701024 701024 0 0.0
.bss 78712 78712 0 0.0
.data 1900 1900 0 0.0
.text 614612 614612 0 0.0
lock-app k32w061+debug (read/write) 592940 592940 0 0.0
.bss 69188 69188 0 0.0
.data 1864 1864 0 0.0
.text 516088 516088 0 0.0
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
linux all-clusters-app debug (read only) 1642353 1642369 16 0.0
(read/write) 118624 118624 0 0.0
.bss 51344 51344 0 0.0
.data 978 978 0 0.0
.data.rel.ro 61056 61056 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 136725 136725 0 0.0
.text 1373794 1373810 16 0.0
bridge-app debug+rpc (read only) 1277661 1277661 0 0.0
(read/write) 85096 85096 0 0.0
.bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27272 27272 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 110620 110620 0 0.0
.text 1071701 1071701 0 0.0
chip-tool debug (read only) 4267925 4267925 0 0.0
(read/write) 122112 122112 0 0.0
.bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 97424 97424 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 424 424 0 0.0
.rodata 213968 213968 0 0.0
.text 3791301 3791301 0 0.0
lighting-app debug+rpc (read only) 1530377 1530377 0 0.0
(read/write) 101520 101520 0 0.0
.bss 41176 41176 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 53968 53968 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 127793 127793 0 0.0
.text 1270562 1270562 0 0.0
ota-provider-app debug (read only) 1237969 1237969 0 0.0
(read/write) 67776 67776 0 0.0
.bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110920 110920 0 0.0
.text 1031090 1031090 0 0.0
ota-requestor-app debug (read only) 1300289 1300289 0 0.0
(read/write) 76520 76520 0 0.0
.bss 45216 45216 0 0.0
.data 816 816 0 0.0
.data.rel.ro 25352 25352 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 127744 127744 0 0.0
.text 1074946 1074946 0 0.0
shell debug (read only) 780953 780953 0 0.0
(read/write) 57376 57376 0 0.0
.bss 16136 16136 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36496 36496 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 76463 76463 0 0.0
.text 603362 603362 0 0.0
tv-app debug (read only) 1757849 1757849 0 0.0
(read/write) 289112 289112 0 0.0
.bss 223248 223248 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 58192 58192 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 152888 152888 0 0.0
.text 1463250 1463250 0 0.0
p6 lock-app default (read/write) 2169176 2169176 0 0.0
.bss 67184 67184 0 0.0
.data 2416 2416 0 0.0
.heap 963744 963744 0 0.0
.text 1127440 1127440 0 0.0
qpg lighting-app qpg6100+debug (read only) 491208 491208 0 0.0
(read/write) 114144 114144 0 0.0
.bss 52416 52416 0 0.0
.data 1000 1000 0 0.0
.text 485888 485888 0 0.0
lock-app qpg6100+debug (read only) 467532 467532 0 0.0
(read/write) 114140 114140 0 0.0
.bss 51360 51360 0 0.0
.data 956 956 0 0.0
.text 462212 462212 0 0.0
persistent-storage-app qpg6100+debug (read only) 155244 155244 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149924 149924 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 664566 664566 0 0.0
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 458168 458168 0 0.0

@bzbarsky-apple
Copy link
Contributor Author

/rebase

project-chip#10907 added some
identify bits on Linux only but changed the core cluster impl to
assume that those bits are always there.

This change stops assuming that identify is actually configured on
every endpoint that supports it, since nothing enforces that.
@woody-apple woody-apple force-pushed the fix-esp32-all-clusters-app branch from a6d9932 to 239e345 Compare October 27, 2021 20:48
@github-actions
Copy link

github-actions bot commented Oct 27, 2021

PR #11079: Size comparison from a04e4a0 to 239e345

Increases (1 build for esp32)
platform target config section a04e4a0 239e345 change % change
esp32 all-clusters-app c3devkit (read only) 875866 875874 8 0.0
.flash.text 875866 875874 8 0.0
Decreases (1 build for esp32)
platform target config section a04e4a0 239e345 change % change
esp32 all-clusters-app m5stack (read only) 907087 907003 -84 -0.0
.flash.text 907087 907003 -84 -0.0
Full report (29 builds for efr32, esp32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section a04e4a0 239e345 change % change
efr32 lighting-app BRD4161A (read only) 736916 736916 0 0.0
(read/write) 115428 115428 0 0.0
.bss 113676 113676 0 0.0
.data 1752 1752 0 0.0
.text 736908 736908 0 0.0
BRD4161A+rpc (read only) 724344 724344 0 0.0
(read/write) 132036 132036 0 0.0
.bss 130180 130180 0 0.0
.data 1852 1852 0 0.0
.text 724336 724336 0 0.0
lock-app BRD4161A (read only) 716212 716212 0 0.0
(read/write) 113244 113244 0 0.0
.bss 111532 111532 0 0.0
.data 1712 1712 0 0.0
.text 716204 716204 0 0.0
window-app BRD4161A (read only) 717116 717116 0 0.0
(read/write) 113568 113568 0 0.0
.bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 717108 717108 0 0.0
esp32 all-clusters-app c3devkit (read only) 875866 875874 8 0.0
(read/write) 1308624 1308624 0 0.0
.dram0.bss 59248 59248 0 0.0
.dram0.data 16448 16448 0 0.0
.flash.rodata 199696 199696 0 0.0
.flash.text 875866 875874 8 0.0
.iram0.text 57554 57554 0 0.0
m5stack (read only) 907087 907003 -84 -0.0
(read/write) 428412 428412 0 0.0
.dram0.bss 61744 61744 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 208420 208420 0 0.0
.flash.text 907087 907003 -84 -0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 700852 700852 0 0.0
.bss 78688 78688 0 0.0
.data 1900 1900 0 0.0
.text 614464 614464 0 0.0
lock-app k32w061+debug (read/write) 592808 592808 0 0.0
.bss 69172 69172 0 0.0
.data 1864 1864 0 0.0
.text 515972 515972 0 0.0
shell k32w061+debug (read/write) 425252 425252 0 0.0
.bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359620 359620 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2290480 2290480 0 0.0
.bss 180620 180620 0 0.0
.data 5192 5192 0 0.0
.heap 850632 850632 0 0.0
.text 1253080 1253080 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2274816 2274816 0 0.0
.bss 172820 172820 0 0.0
.data 5568 5568 0 0.0
.heap 858056 858056 0 0.0
.text 1237416 1237416 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2252536 2252536 0 0.0
.bss 171724 171724 0 0.0
.data 5552 5552 0 0.0
.heap 859168 859168 0 0.0
.text 1215136 1215136 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048984 2048984 0 0.0
.bss 156208 156208 0 0.0
.data 4968 4968 0 0.0
.heap 875272 875272 0 0.0
.text 1011584 1011584 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 862739 862739 0 0.0
bss 112132 112132 0 0.0
rodata 97484 97484 0 0.0
text 577496 577496 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 823579 823579 0 0.0
bss 108372 108372 0 0.0
rodata 88260 88260 0 0.0
text 550688 550688 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 787730 787730 0 0.0
bss 113504 113504 0 0.0
rodata 92724 92724 0 0.0
text 506964 506964 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 839411 839411 0 0.0
bss 111168 111168 0 0.0
rodata 93836 93836 0 0.0
text 558980 558980 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 764710 764710 0 0.0
bss 112576 112576 0 0.0
rodata 89144 89144 0 0.0
text 488540 488540 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497339 497339 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844115 844115 0 0.0
bss 111304 111304 0 0.0
rodata 95084 95084 0 0.0
text 562188 562188 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 839387 839387 0 0.0
bss 111200 111200 0 0.0
rodata 93860 93860 0 0.0
text 558820 558820 0 0.0
shell nrf52840dk_nrf52840 (read/write) 776435 776435 0 0.0
bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520232 520232 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691490 691490 0 0.0
bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440844 440844 0 0.0
p6 lock-app default (read/write) 2169056 2169056 0 0.0
.bss 67168 67168 0 0.0
.data 2416 2416 0 0.0
.heap 963760 963760 0 0.0
.text 1127320 1127320 0 0.0
qpg lighting-app qpg6100+debug (read only) 491060 491060 0 0.0
(read/write) 114144 114144 0 0.0
.bss 52400 52400 0 0.0
.data 1000 1000 0 0.0
.text 485740 485740 0 0.0
lock-app qpg6100+debug (read only) 467400 467400 0 0.0
(read/write) 114140 114140 0 0.0
.bss 51352 51352 0 0.0
.data 956 956 0 0.0
.text 462080 462080 0 0.0
persistent-storage-app qpg6100+debug (read only) 155244 155244 0 0.0
(read/write) 114140 114140 0 0.0
.bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149924 149924 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 664350 664350 0 0.0
bss 69944 69944 0 0.0
noinit 33216 33216 0 0.0
text 457966 457966 0 0.0

@andy31415 andy31415 merged commit cb5818f into project-chip:master Oct 27, 2021
@bzbarsky-apple bzbarsky-apple deleted the fix-esp32-all-clusters-app branch October 27, 2021 21:36
JasonLiuZhuoCheng pushed a commit to JasonLiuZhuoCheng/connectedhomeip that referenced this pull request Oct 28, 2021
project-chip#10907 added some
identify bits on Linux only but changed the core cluster impl to
assume that those bits are always there.

This change stops assuming that identify is actually configured on
every endpoint that supports it, since nothing enforces that.
carol-apple pushed a commit to carol-apple/connectedhomeip that referenced this pull request Oct 28, 2021
project-chip#10907 added some
identify bits on Linux only but changed the core cluster impl to
assume that those bits are always there.

This change stops assuming that identify is actually configured on
every endpoint that supports it, since nothing enforces that.
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
project-chip#10907 added some
identify bits on Linux only but changed the core cluster impl to
assume that those bits are always there.

This change stops assuming that identify is actually configured on
every endpoint that supports it, since nothing enforces that.
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