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

MdnsAvahi: do not fail when instance is reinited #18670

Merged
merged 2 commits into from
May 30, 2022

Conversation

bluebin14
Copy link
Contributor

Problem

Seen with TE9 image in several configurations, chip-tool was exiting because MdnsAvahi::Init was called twice, making it impossible to use.

Change overview

Do not fail when instance is reinited, instead call Shutdown() first. If Init is only called once then the change is a no-op..

Testing

  • tested extensively during TE9 on Raspi (Linux) platform using chip-tool and chip-ota-provider-app
  • other platforms are not affected
  • non MdnsAvahi builds are not affected

@github-actions
Copy link

github-actions bot commented May 20, 2022

PR #18670: Size comparison from d346617 to ba4dc91

Full report (32 builds for cc13x2_26x2, cyw30739, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section d346617 ba4dc91 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 666483 666483 0 0.0
(read/write) 184204 184204 0 0.0
.bss 73668 73668 0 0.0
.data 3404 3404 0 0.0
.rodata 99611 99611 0 0.0
.text 566644 566644 0 0.0
lock-ftd LP_CC2652R7 (read only) 676315 676315 0 0.0
(read/write) 166340 166340 0 0.0
.bss 72692 72692 0 0.0
.data 3236 3236 0 0.0
.rodata 94379 94379 0 0.0
.text 581452 581452 0 0.0
lock-mtd LP_CC2652R7 (read only) 625139 625139 0 0.0
(read/write) 145524 145524 0 0.0
.bss 68428 68428 0 0.0
.data 3236 3236 0 0.0
.rodata 94267 94267 0 0.0
.text 530380 530380 0 0.0
pump-app LP_CC2652R7 (read only) 659595 659595 0 0.0
(read/write) 184340 184340 0 0.0
.bss 72948 72948 0 0.0
.data 3268 3268 0 0.0
.rodata 79371 79371 0 0.0
.text 579744 579744 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654083 654083 0 0.0
(read/write) 189660 189660 0 0.0
.bss 73012 73012 0 0.0
.data 3232 3232 0 0.0
.rodata 83475 83475 0 0.0
.text 570128 570128 0 0.0
shell LP_CC2652R7 (read only) 659562 659562 0 0.0
(read/write) 186684 186684 0 0.0
.bss 76028 76028 0 0.0
.data 3408 3408 0 0.0
.rodata 96578 96578 0 0.0
.text 562760 562760 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 624306 624306 0 0.0
.app_xip_area 527920 527920 0 0.0
.bss 79028 79028 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 627126 627126 0 0.0
.app_xip_area 532196 532196 0 0.0
.bss 77604 77604 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571030 571030 0 0.0
.app_xip_area 466384 466384 0 0.0
.bss 87024 87024 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
esp32 all-clusters-app c3devkit (read only) 1000454 1000454 0 0.0
(read/write) 1477442 1477442 0 0.0
.dram0.bss 68232 68232 0 0.0
.dram0.data 14632 14632 0 0.0
.flash.rodata 209136 209136 0 0.0
.flash.text 1000454 1000454 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1055815 1055815 0 0.0
(read/write) 479452 479452 0 0.0
.dram0.bss 73752 73752 0 0.0
.dram0.data 34200 34200 0 0.0
.flash.rodata 239504 239504 0 0.0
.flash.text 1050431 1050431 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 682204 682204 0 0.0
.bss 80224 80224 0 0.0
.data 2016 2016 0 0.0
.text 598260 598260 0 0.0
lock k32w061+release (read/write) 728352 728352 0 0.0
.bss 80656 80656 0 0.0
.data 1976 1976 0 0.0
.text 644016 644016 0 0.0
linux all-clusters-app debug (read only) 2749601 2749601 0 0.0
(read/write) 176032 176032 0 0.0
.bss 85152 85152 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 82648 82648 0 0.0
.dynamic 608 608 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 1016 1016 0 0.0
.rodata 240221 240221 0 0.0
.text 2335090 2335090 0 0.0
bridge-app debug+rpc (read only) 2033289 2033289 0 0.0
(read/write) 147736 147736 0 0.0
.bss 72864 72864 0 0.0
.data 3936 3936 0 0.0
.data.rel.ro 65352 65352 0 0.0
.dynamic 592 592 0 0.0
.got 4272 4272 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 168553 168553 0 0.0
.text 1707714 1707714 0 0.0
chip-tool debug (read only) 9448125 9448125 0 0.0
(read/write) 579160 579160 0 0.0
.bss 23936 23936 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 547768 547768 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 656 656 0 0.0
.rodata 481149 481149 0 0.0
.text 7640165 7640165 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9196052 9196052 0 0.0
(read/write) 645297 645297 0 0.0
.bss 42225 42225 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 583048 583048 0 0.0
.dynamic 560 560 0 0.0
.got 14984 14984 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 446036 446036 0 0.0
.text 7288116 7288116 0 0.0
lighting-app debug+rpc (read only) 2325081 2325081 0 0.0
(read/write) 153152 153152 0 0.0
.bss 74656 74656 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 70696 70696 0 0.0
.dynamic 608 608 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 187561 187561 0 0.0
.text 1971266 1971266 0 0.0
lock-app debug (read only) 2238577 2238577 0 0.0
(read/write) 147864 147864 0 0.0
.bss 73344 73344 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 67256 67256 0 0.0
.dynamic 592 592 0 0.0
.got 4336 4336 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 198201 198201 0 0.0
.text 1880514 1880514 0 0.0
ota-provider-app debug (read only) 2063721 2063721 0 0.0
(read/write) 140912 140912 0 0.0
.bss 72800 72800 0 0.0
.data 1768 1768 0 0.0
.data.rel.ro 60552 60552 0 0.0
.dynamic 608 608 0 0.0
.got 4504 4504 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 179296 179296 0 0.0
.text 1725954 1725954 0 0.0
ota-requestor-app debug (read only) 2092737 2092737 0 0.0
(read/write) 143752 143752 0 0.0
.bss 73472 73472 0 0.0
.data 1992 1992 0 0.0
.data.rel.ro 62648 62648 0 0.0
.dynamic 592 592 0 0.0
.got 4344 4344 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 175360 175360 0 0.0
.text 1757442 1757442 0 0.0
shell debug (read only) 2565425 2565425 0 0.0
(read/write) 199800 199800 0 0.0
.bss 115816 115816 0 0.0
.data 1376 1376 0 0.0
.data.rel.ro 76848 76848 0 0.0
.dynamic 608 608 0 0.0
.got 4192 4192 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 221266 221266 0 0.0
.text 2183250 2183250 0 0.0
thermostat-no-ble arm64 (read only) 2354116 2354116 0 0.0
(read/write) 176321 176321 0 0.0
.bss 87617 87617 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79384 79384 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 147332 147332 0 0.0
.text 1977904 1977904 0 0.0
tv-app debug (read only) 2854129 2854129 0 0.0
(read/write) 278816 278816 0 0.0
.bss 190776 190776 0 0.0
.data 4672 4672 0 0.0
.data.rel.ro 77096 77096 0 0.0
.dynamic 592 592 0 0.0
.got 4720 4720 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 220593 220593 0 0.0
.text 2451458 2451458 0 0.0
tv-casting-app debug (read only) 5421665 5421665 0 0.0
(read/write) 225056 225056 0 0.0
.bss 78360 78360 0 0.0
.data 2368 2368 0 0.0
.data.rel.ro 138096 138096 0 0.0
.dynamic 608 608 0 0.0
.got 4728 4728 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 339105 339105 0 0.0
.text 4723186 4723186 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2418432 2418432 0 0.0
.bss 202668 202668 0 0.0
.data 5872 5872 0 0.0
.text 1381076 1381076 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180075 1180075 0 0.0
bss 138400 138400 0 0.0
rodata 152340 152340 0 0.0
text 810484 810484 0 0.0
p6 all-clusters-app default (read/write) 2537888 2537888 0 0.0
.bss 136200 136200 0 0.0
.data 2808 2808 0 0.0
.text 1496152 1496152 0 0.0
light-app default (read/write) 2424104 2424104 0 0.0
.bss 129488 129488 0 0.0
.data 2608 2608 0 0.0
.text 1382368 1382368 0 0.0
lock-app default (read/write) 2434792 2434792 0 0.0
.bss 129304 129304 0 0.0
.data 2568 2568 0 0.0
.text 1393056 1393056 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 781564 781564 0 0.0
bss 70616 70616 0 0.0
noinit 40416 40416 0 0.0
text 552934 552934 0 0.0
lighting-app tlsr9518adk80d (read/write) 801644 801644 0 0.0
bss 70872 70872 0 0.0
noinit 40416 40416 0 0.0
text 569700 569700 0 0.0

Copy link
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.

Disagree that "current implementation never fails" is sufficient of a reason to skip error handling.

@andy31415 andy31415 merged commit 5b89229 into project-chip:master May 30, 2022
@bluebin14 bluebin14 deleted the fix-mdns branch May 30, 2022 17:00
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