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

Log error on bad packets instead of silent return #20126

Merged
merged 3 commits into from
Jul 16, 2022

Conversation

andy31415
Copy link
Contributor

Problem

Silent return on CHIP_ERROR makes it hard to debug any unexpected errors.

Change overview

Also log error instead of just silently returning from the message processing loop.

Testing

Sent an invalid BTP message, saw the event log on an EFR32 device.

@github-actions
Copy link

github-actions bot commented Jun 29, 2022

PR #20126: Size comparison from f03b9ae to ffc2211

Increases (40 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section f03b9ae ffc22112 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 665203 665259 56 0.0
.rodata 88091 88131 40 0.0
.text 576796 576812 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 653963 654027 64 0.0
.rodata 91571 91611 40 0.0
.text 562076 562100 24 0.0
lock-ftd LP_CC2652R7 (read only) 667775 667823 48 0.0
.rodata 76191 76223 32 0.0
.text 591104 591120 16 0.0
lock-mtd LP_CC2652R7 (read only) 617191 617247 56 0.0
.rodata 76071 76111 40 0.1
.text 540632 540648 16 0.0
pump-app LP_CC2652R7 (read only) 677239 677295 56 0.0
.rodata 88423 88463 40 0.0
.text 588332 588348 16 0.0
pump-controller-app LP_CC2652R7 (read only) 663079 663127 48 0.0
.rodata 84271 84303 32 0.0
.text 578328 578344 16 0.0
shell LP_CC2652R7 (read only) 657646 657694 48 0.0
.rodata 84838 84870 32 0.0
.text 572492 572508 16 0.0
cyw30739 lock cyw930739m2evb_01 (read/write) 580214 580222 8 0.0
.app_xip_area 458800 458808 8 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 581734 581782 48 0.0
.app_xip_area 461360 461408 48 0.0
efr32 lighting-app BRD4161A (read/write) 1080060 1080116 56 0.0
.text 944996 945052 56 0.0
BRD4161A+rpc (read/write) 1134356 1134404 48 0.0
.text 982400 982448 48 0.0
BRD4161A+rs911x (read/write) 942524 942572 48 0.0
.text 801744 801792 48 0.0
lock-app BRD4161A+wf200 (read/write) 1119568 1119616 48 0.0
.text 978344 978392 48 0.0
window-app BRD4161A (read/write) 1065324 1065396 72 0.0
.text 930148 930220 72 0.0
esp32 all-clusters-app c3devkit (read only) 1018484 1018504 20 0.0
(read/write) 1484882 1484922 40 0.0
.flash.rodata 214784 214824 40 0.0
.flash.text 1018484 1018504 20 0.0
m5stack (read only) 1072575 1072595 20 0.0
(read/write) 486984 487024 40 0.0
.flash.rodata 245244 245284 40 0.0
.flash.text 1067191 1067211 20 0.0
k32w light k32w061+release (read/write) 658040 658056 16 0.0
.text 580732 580748 16 0.0
lock k32w061+release (read/write) 684508 684564 56 0.0
.text 606724 606780 56 0.0
linux all-clusters-app debug (read only) 2954225 2954353 128 0.0
.rodata 263133 263165 32 0.0
.text 2513954 2514050 96 0.0
all-clusters-minimal-app debug (read only) 2808321 2808465 144 0.0
.rodata 264797 264829 32 0.0
.text 2368562 2368674 112 0.0
bridge-app debug+rpc (read only) 2311737 2311881 144 0.0
.rodata 197696 197728 32 0.0
.text 1952354 1952466 112 0.0
chip-tool debug (read only) 10161405 10161549 144 0.0
.rodata 509317 509349 32 0.0
.text 8252261 8252373 112 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9893316 9893396 80 0.0
.rodata 472548 472580 32 0.0
.text 7890196 7890244 48 0.0
lighting-app debug+rpc (read only) 2547641 2547769 128 0.0
.rodata 213576 213608 32 0.0
.text 2164146 2164242 96 0.0
lock-app debug (read only) 2509489 2509617 128 0.0
.rodata 228200 228232 32 0.0
.text 2116194 2116290 96 0.0
ota-provider-app debug (read only) 2318625 2318753 128 0.0
.rodata 203288 203320 32 0.0
.text 1952610 1952706 96 0.0
ota-requestor-app debug (read only) 2435809 2435953 144 0.0
.rodata 207328 207360 32 0.0
.text 2057378 2057490 112 0.0
shell debug (read only) 2543857 2543985 128 0.0
.rodata 227218 227250 32 0.0
.text 2160322 2160418 96 0.0
thermostat-no-ble arm64 (read only) 2591604 2591668 64 0.0
.rodata 165236 165268 32 0.0
.text 2186624 2186656 32 0.0
tv-app debug (read only) 3097481 3097625 144 0.0
.rodata 248832 248864 32 0.0
.text 2660818 2660930 112 0.0
tv-casting-app debug (read only) 5555385 5555529 144 0.0
.rodata 343113 343145 32 0.0
.text 4935394 4935506 112 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2447080 2447112 32 0.0
.text 1409724 1409756 32 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1172915 1172983 68 0.0
rodata 141348 141384 36 0.0
text 809776 809796 20 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1153783 1153835 52 0.0
rodata 133280 133316 36 0.0
text 799480 799500 20 0.0
p6 all-clusters-app default (read/write) 2562640 2562696 56 0.0
.text 1520904 1520960 56 0.0
all-clusters-minimal-app default (read/write) 2508504 2508560 56 0.0
.text 1466768 1466824 56 0.0
light-app default (read/write) 2439016 2439080 64 0.0
.text 1397280 1397344 64 0.0
lock-app default (read/write) 2465312 2465368 56 0.0
.text 1423576 1423632 56 0.0
telink light-switch-app tlsr9518adk80d (read/write) 796292 796352 60 0.0
text 564814 564836 22 0.0
lighting-app tlsr9518adk80d (read/write) 816152 816212 60 0.0
text 581168 581188 20 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section f03b9ae ffc22112 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 186020 185964 -56 -0.0
all-clusters-minimal-app LP_CC2652R7 (read/write) 196556 196492 -64 -0.0
lock-ftd LP_CC2652R7 (read/write) 173592 173544 -48 -0.0
pump-app LP_CC2652R7 (read/write) 164976 164920 -56 -0.0
pump-controller-app LP_CC2652R7 (read/write) 179256 179208 -48 -0.0
shell LP_CC2652R7 (read/write) 189080 189032 -48 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section f03b9ae ffc22112 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 665203 665259 56 0.0
(read/write) 186020 185964 -56 -0.0
.bss 74116 74116 0 0.0
.data 3356 3356 0 0.0
.rodata 88091 88131 40 0.0
.text 576796 576812 16 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 653963 654027 64 0.0
(read/write) 196556 196492 -64 -0.0
.bss 73412 73412 0 0.0
.data 3356 3356 0 0.0
.rodata 91571 91611 40 0.0
.text 562076 562100 24 0.0
lock-ftd LP_CC2652R7 (read only) 667775 667823 48 0.0
(read/write) 173592 173544 -48 -0.0
.bss 71148 71148 0 0.0
.data 3280 3280 0 0.0
.rodata 76191 76223 32 0.0
.text 591104 591120 16 0.0
lock-mtd LP_CC2652R7 (read only) 617191 617247 56 0.0
(read/write) 144264 144264 0 0.0
.bss 66868 66868 0 0.0
.data 3280 3280 0 0.0
.rodata 76071 76111 40 0.1
.text 540632 540648 16 0.0
pump-app LP_CC2652R7 (read only) 677239 677295 56 0.0
(read/write) 164976 164920 -56 -0.0
.bss 71228 71228 0 0.0
.data 3280 3280 0 0.0
.rodata 88423 88463 40 0.0
.text 588332 588348 16 0.0
pump-controller-app LP_CC2652R7 (read only) 663079 663127 48 0.0
(read/write) 179256 179208 -48 -0.0
.bss 71348 71348 0 0.0
.data 3276 3276 0 0.0
.rodata 84271 84303 32 0.0
.text 578328 578344 16 0.0
shell LP_CC2652R7 (read only) 657646 657694 48 0.0
(read/write) 189080 189032 -48 -0.0
.bss 76420 76420 0 0.0
.data 3360 3360 0 0.0
.rodata 84838 84870 32 0.0
.text 572492 572508 16 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 578654 578654 0 0.0
.app_xip_area 457432 457432 0 0.0
.bss 64184 64184 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 580214 580222 8 0.0
.app_xip_area 458800 458808 8 0.0
.bss 64376 64376 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 581734 581782 48 0.0
.app_xip_area 461360 461408 48 0.0
.bss 63392 63392 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1080060 1080116 56 0.0
.bss 132996 132996 0 0.0
.data 2048 2048 0 0.0
.text 944996 945052 56 0.0
BRD4161A+rpc (read/write) 1134356 1134404 48 0.0
.bss 149676 149676 0 0.0
.data 2260 2260 0 0.0
.text 982400 982448 48 0.0
BRD4161A+rs911x (read/write) 942524 942572 48 0.0
.bss 138712 138712 0 0.0
.data 2048 2048 0 0.0
.text 801744 801792 48 0.0
lock-app BRD4161A+wf200 (read/write) 1119568 1119616 48 0.0
.bss 139144 139144 0 0.0
.data 2060 2060 0 0.0
.text 978344 978392 48 0.0
window-app BRD4161A (read/write) 1065324 1065396 72 0.0
.bss 133076 133076 0 0.0
.data 2076 2076 0 0.0
.text 930148 930220 72 0.0
esp32 all-clusters-app c3devkit (read only) 1018484 1018504 20 0.0
(read/write) 1484882 1484922 40 0.0
.dram0.bss 70080 70080 0 0.0
.dram0.data 14592 14592 0 0.0
.flash.rodata 214784 214824 40 0.0
.flash.text 1018484 1018504 20 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1072575 1072595 20 0.0
(read/write) 486984 487024 40 0.0
.dram0.bss 75600 75600 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 245244 245284 40 0.0
.flash.text 1067191 1067211 20 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 658040 658056 16 0.0
.bss 69516 69516 0 0.0
.data 1992 1992 0 0.0
.text 580732 580748 16 0.0
lock k32w061+release (read/write) 684508 684564 56 0.0
.bss 69980 69980 0 0.0
.data 2004 2004 0 0.0
.text 606724 606780 56 0.0
linux all-clusters-app debug (read only) 2954225 2954353 128 0.0
(read/write) 154744 154744 0 0.0
.bss 61536 61536 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84952 84952 0 0.0
.dynamic 608 608 0 0.0
.got 4536 4536 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 263133 263165 32 0.0
.text 2513954 2514050 96 0.0
all-clusters-minimal-app debug (read only) 2808321 2808465 144 0.0
(read/write) 146648 146648 0 0.0
.bss 60864 60864 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77592 77592 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1040 1040 0 0.0
.rodata 264797 264829 32 0.0
.text 2368562 2368674 112 0.0
bridge-app debug+rpc (read only) 2311737 2311881 144 0.0
(read/write) 125472 125472 0 0.0
.bss 48928 48928 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 66968 66968 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 197696 197728 32 0.0
.text 1952354 1952466 112 0.0
chip-tool debug (read only) 10161405 10161549 144 0.0
(read/write) 607016 607016 0 0.0
.bss 24384 24384 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 575248 575248 0 0.0
.dynamic 624 624 0 0.0
.got 5016 5016 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 509317 509349 32 0.0
.text 8252261 8252373 112 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9893316 9893396 80 0.0
(read/write) 671793 671793 0 0.0
.bss 42609 42609 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 610816 610816 0 0.0
.dynamic 528 528 0 0.0
.got 13408 13408 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 472548 472580 32 0.0
.text 7890196 7890244 48 0.0
lighting-app debug+rpc (read only) 2547641 2547769 128 0.0
(read/write) 129496 129496 0 0.0
.bss 49440 49440 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72104 72104 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 213576 213608 32 0.0
.text 2164146 2164242 96 0.0
lock-app debug (read only) 2509489 2509617 128 0.0
(read/write) 124472 124472 0 0.0
.bss 47840 47840 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69080 69080 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 228200 228232 32 0.0
.text 2116194 2116290 96 0.0
ota-provider-app debug (read only) 2318625 2318753 128 0.0
(read/write) 118312 118312 0 0.0
.bss 47488 47488 0 0.0
.data 1944 1944 0 0.0
.data.rel.ro 63080 63080 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 203288 203320 32 0.0
.text 1952610 1952706 96 0.0
ota-requestor-app debug (read only) 2435809 2435953 144 0.0
(read/write) 125216 125216 0 0.0
.bss 49856 49856 0 0.0
.data 2232 2232 0 0.0
.data.rel.ro 67272 67272 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 207328 207360 32 0.0
.text 2057378 2057490 112 0.0
shell debug (read only) 2543857 2543985 128 0.0
(read/write) 141032 141032 0 0.0
.bss 57448 57448 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76672 76672 0 0.0
.dynamic 608 608 0 0.0
.got 4096 4096 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 227218 227250 32 0.0
.text 2160322 2160418 96 0.0
thermostat-no-ble arm64 (read only) 2591604 2591668 64 0.0
(read/write) 158273 158273 0 0.0
.bss 65249 65249 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83232 83232 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165236 165268 32 0.0
.text 2186624 2186656 32 0.0
tv-app debug (read only) 3097481 3097625 144 0.0
(read/write) 255880 255880 0 0.0
.bss 165224 165224 0 0.0
.data 4848 4848 0 0.0
.data.rel.ro 79360 79360 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 248832 248864 32 0.0
.text 2660818 2660930 112 0.0
tv-casting-app debug (read only) 5555385 5555529 144 0.0
(read/write) 161680 161680 0 0.0
.bss 50248 50248 0 0.0
.data 2416 2416 0 0.0
.data.rel.ro 102792 102792 0 0.0
.dynamic 608 608 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 343113 343145 32 0.0
.text 4935394 4935506 112 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2447080 2447112 32 0.0
.bss 213940 213940 0 0.0
.data 5872 5872 0 0.0
.text 1409724 1409756 32 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1172915 1172983 68 0.0
bss 142884 142884 0 0.0
rodata 141348 141384 36 0.0
text 809776 809796 20 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1153783 1153835 52 0.0
bss 142120 142120 0 0.0
rodata 133280 133316 36 0.0
text 799480 799500 20 0.0
p6 all-clusters-app default (read/write) 2562640 2562696 56 0.0
.bss 149120 149120 0 0.0
.data 2776 2776 0 0.0
.text 1520904 1520960 56 0.0
all-clusters-minimal-app default (read/write) 2508504 2508560 56 0.0
.bss 148400 148400 0 0.0
.data 2776 2776 0 0.0
.text 1466768 1466824 56 0.0
light-app default (read/write) 2439016 2439080 64 0.0
.bss 140456 140456 0 0.0
.data 2592 2592 0 0.0
.text 1397280 1397344 64 0.0
lock-app default (read/write) 2465312 2465368 56 0.0
.bss 140304 140304 0 0.0
.data 2600 2600 0 0.0
.text 1423576 1423632 56 0.0
telink light-switch-app tlsr9518adk80d (read/write) 796292 796352 60 0.0
bss 70560 70560 0 0.0
noinit 40416 40416 0 0.0
text 564814 564836 22 0.0
lighting-app tlsr9518adk80d (read/write) 816152 816212 60 0.0
bss 71404 71404 0 0.0
noinit 40416 40416 0 0.0
text 581168 581188 20 0.0

@stale
Copy link

stale bot commented Jul 8, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Jul 8, 2022
@woody-apple woody-apple merged commit 4b1f365 into project-chip:master Jul 16, 2022
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.

5 participants