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 DiscoveryImplPlatform::Shutdown so restart works correctly. #18542

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Until the changes in #18442 DiscoveryImplPlatform::Shutdown was a
no-op on most platforms, so the fact that you could not re-init after
that call did not matter, because nothing had actually been shut down.
Now that we are actually shutting down mResolverProxy, we need to make
sure a future call to Init() will correctly re-initialize things
instead of just bailing out.

Problem

Can't re-init platform mdns after shutdown.

Change overview

Flag ourselves as not initialized any more once we have shut down.

Testing

Made sure that CHIPTool on iOS works again after this (was broken before, because it could not do anything with mdns after restarting the Matter stack).

Until the changes in project-chip#18442 DiscoveryImplPlatform::Shutdown was a
no-op on most platforms, so the fact that you could not re-init after
that call did not matter, because nothing had actually been shut down.
Now that we are actually shutting down mResolverProxy, we need to make
sure a future call to Init() will correctly re-initialize things
instead of just bailing out.
@github-actions
Copy link

github-actions bot commented May 18, 2022

PR #18542: Size comparison from a777a80 to 28f61eb

Increases (14 builds for cc13x2_26x2, cyw30739, efr32, k32w, nrfconnect, telink)
platform target config section a777a80 28f61eb change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 692359 692367 8 0.0
.text 588056 588064 8 0.0
lock-ftd LP_CC2652R7 (read only) 677071 677079 8 0.0
.text 581620 581628 8 0.0
pump-app LP_CC2652R7 (read only) 660571 660579 8 0.0
.text 579624 579632 8 0.0
pump-controller-app LP_CC2652R7 (read only) 653739 653747 8 0.0
.text 569688 569696 8 0.0
shell LP_CC2652R7 (read only) 686722 686730 8 0.0
.text 584868 584876 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 624974 624982 8 0.0
.app_xip_area 528588 528596 8 0.0
lock cyw930739m2evb_01 (read/write) 628018 628026 8 0.0
.app_xip_area 533088 533096 8 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 572474 572482 8 0.0
.app_xip_area 467828 467836 8 0.0
efr32 lighting-app BRD4161A (read only) 914908 914924 16 0.0
.text 914900 914916 16 0.0
window-app BRD4161A (read only) 895028 895044 16 0.0
.text 895020 895036 16 0.0
k32w lock k32w061+release (read/write) 729228 729244 16 0.0
.text 644892 644908 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 text 810400 810404 4 0.0
telink light-switch-app tlsr9518adk80d (read/write) 782388 782396 8 0.0
text 553284 553296 12 0.0
lighting-app tlsr9518adk80d (read/write) 802480 802488 8 0.0
text 570050 570062 12 0.0
Decreases (5 builds for cc13x2_26x2)
platform target config section a777a80 28f61eb change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 159192 159184 -8 -0.0
lock-ftd LP_CC2652R7 (read/write) 165584 165576 -8 -0.0
pump-app LP_CC2652R7 (read/write) 183364 183356 -8 -0.0
pump-controller-app LP_CC2652R7 (read/write) 190004 189996 -8 -0.0
shell LP_CC2652R7 (read/write) 160652 160644 -8 -0.0
Full report (37 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section a777a80 28f61eb change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 692359 692367 8 0.0
(read/write) 159192 159184 -8 -0.0
.bss 74532 74532 0 0.0
.data 3412 3412 0 0.0
.rodata 103823 103823 0 0.0
.text 588056 588064 8 0.0
lock-ftd LP_CC2652R7 (read only) 677071 677079 8 0.0
(read/write) 165584 165576 -8 -0.0
.bss 72692 72692 0 0.0
.data 3236 3236 0 0.0
.rodata 94967 94967 0 0.0
.text 581620 581628 8 0.0
lock-mtd LP_CC2652R7 (read only) 625903 625903 0 0.0
(read/write) 145524 145524 0 0.0
.bss 68428 68428 0 0.0
.data 3236 3236 0 0.0
.rodata 94855 94855 0 0.0
.text 530556 530556 0 0.0
pump-app LP_CC2652R7 (read only) 660571 660579 8 0.0
(read/write) 183364 183356 -8 -0.0
.bss 72948 72948 0 0.0
.data 3268 3268 0 0.0
.rodata 80467 80467 0 0.0
.text 579624 579632 8 0.0
pump-controller-app LP_CC2652R7 (read only) 653739 653747 8 0.0
(read/write) 190004 189996 -8 -0.0
.bss 73012 73012 0 0.0
.data 3232 3232 0 0.0
.rodata 83571 83571 0 0.0
.text 569688 569696 8 0.0
shell LP_CC2652R7 (read only) 686722 686730 8 0.0
(read/write) 160652 160644 -8 -0.0
.bss 77156 77156 0 0.0
.data 3416 3416 0 0.0
.rodata 101370 101370 0 0.0
.text 584868 584876 8 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 624974 624982 8 0.0
.app_xip_area 528588 528596 8 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) 628018 628026 8 0.0
.app_xip_area 533088 533096 8 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) 572474 572482 8 0.0
.app_xip_area 467828 467836 8 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
efr32 lighting-app BRD4161A (read only) 914908 914924 16 0.0
(read/write) 133244 133244 0 0.0
.bss 131184 131184 0 0.0
.data 2060 2060 0 0.0
.text 914900 914916 16 0.0
BRD4161A+rpc (read only) 949096 949096 0 0.0
(read/write) 149928 149928 0 0.0
.bss 147664 147664 0 0.0
.data 2264 2264 0 0.0
.text 949088 949088 0 0.0
BRD4161A+rs911x (read only) 788388 788388 0 0.0
(read/write) 129512 129512 0 0.0
.bss 127444 127444 0 0.0
.data 2068 2068 0 0.0
.text 788380 788380 0 0.0
lock-app BRD4161A+wf200 (read only) 946640 946640 0 0.0
(read/write) 123996 123996 0 0.0
.bss 121972 121972 0 0.0
.data 2024 2024 0 0.0
.text 946632 946632 0 0.0
window-app BRD4161A (read only) 895028 895044 16 0.0
(read/write) 133304 133304 0 0.0
.bss 131256 131256 0 0.0
.data 2048 2048 0 0.0
.text 895020 895036 16 0.0
esp32 all-clusters-app c3devkit (read only) 1000736 1000736 0 0.0
(read/write) 1477874 1477874 0 0.0
.dram0.bss 68200 68200 0 0.0
.dram0.data 14608 14608 0 0.0
.flash.rodata 209632 209632 0 0.0
.flash.text 1000736 1000736 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1055679 1055679 0 0.0
(read/write) 479888 479888 0 0.0
.dram0.bss 73728 73728 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 239980 239980 0 0.0
.flash.text 1050295 1050295 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 682748 682748 0 0.0
.bss 80224 80224 0 0.0
.data 2016 2016 0 0.0
.text 598804 598804 0 0.0
lock k32w061+release (read/write) 729228 729244 16 0.0
.bss 80656 80656 0 0.0
.data 1976 1976 0 0.0
.text 644892 644908 16 0.0
linux all-clusters-app debug (read only) 2748449 2748449 0 0.0
(read/write) 175872 175872 0 0.0
.bss 85056 85056 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 82584 82584 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 238813 238813 0 0.0
.text 2333330 2333330 0 0.0
bridge-app debug+rpc (read only) 2030385 2030385 0 0.0
(read/write) 147736 147736 0 0.0
.bss 72832 72832 0 0.0
.data 3936 3936 0 0.0
.data.rel.ro 65384 65384 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 167305 167305 0 0.0
.text 1704882 1704882 0 0.0
chip-tool debug (read only) 9308237 9308237 0 0.0
(read/write) 580976 580976 0 0.0
.bss 23936 23936 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 549600 549600 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 648 648 0 0.0
.rodata 480501 480501 0 0.0
.text 7496581 7496581 0 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9079508 9079508 0 0.0
(read/write) 647105 647105 0 0.0
.bss 42209 42209 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 584840 584840 0 0.0
.dynamic 560 560 0 0.0
.got 15016 15016 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 446484 446484 0 0.0
.text 7166708 7166708 0 0.0
lighting-app debug+rpc (read only) 2324945 2324945 0 0.0
(read/write) 153184 153184 0 0.0
.bss 74624 74624 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 70744 70744 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 186377 186377 0 0.0
.text 1971138 1971138 0 0.0
lock-app debug (read only) 2238353 2238353 0 0.0
(read/write) 147864 147864 0 0.0
.bss 73312 73312 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 67272 67272 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 196889 196889 0 0.0
.text 1880354 1880354 0 0.0
ota-provider-app debug (read only) 2058873 2058873 0 0.0
(read/write) 140944 140944 0 0.0
.bss 72768 72768 0 0.0
.data 1768 1768 0 0.0
.data.rel.ro 60616 60616 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 177184 177184 0 0.0
.text 1723074 1723074 0 0.0
ota-requestor-app debug (read only) 2088193 2088193 0 0.0
(read/write) 143720 143720 0 0.0
.bss 73440 73440 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 173376 173376 0 0.0
.text 1754738 1754738 0 0.0
shell debug (read only) 2564321 2564321 0 0.0
(read/write) 199768 199768 0 0.0
.bss 115752 115752 0 0.0
.data 1376 1376 0 0.0
.data.rel.ro 76872 76872 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 219986 219986 0 0.0
.text 2181410 2181410 0 0.0
thermostat-no-ble arm64 (read only) 2352044 2352044 0 0.0
(read/write) 176289 176289 0 0.0
.bss 87585 87585 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 146924 146924 0 0.0
.text 1975104 1975104 0 0.0
tv-app debug (read only) 2850537 2850537 0 0.0
(read/write) 278720 278720 0 0.0
.bss 190712 190712 0 0.0
.data 4672 4672 0 0.0
.data.rel.ro 77080 77080 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 219665 219665 0 0.0
.text 2447378 2447378 0 0.0
tv-casting-app debug (read only) 5412689 5412689 0 0.0
(read/write) 224992 224992 0 0.0
.bss 78328 78328 0 0.0
.data 2368 2368 0 0.0
.data.rel.ro 138072 138072 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 337825 337825 0 0.0
.text 4714338 4714338 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2420288 2420288 0 0.0
.bss 202668 202668 0 0.0
.data 5872 5872 0 0.0
.text 1382932 1382932 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180611 1180611 0 0.0
bss 138372 138372 0 0.0
rodata 152956 152956 0 0.0
text 810400 810404 4 0.0
p6 all-clusters-app default (read/write) 2536128 2536128 0 0.0
.bss 136168 136168 0 0.0
.data 2808 2808 0 0.0
.text 1494392 1494392 0 0.0
light-app default (read/write) 2422760 2422760 0 0.0
.bss 129488 129488 0 0.0
.data 2608 2608 0 0.0
.text 1381024 1381024 0 0.0
lock-app default (read/write) 2433408 2433408 0 0.0
.bss 129304 129304 0 0.0
.data 2568 2568 0 0.0
.text 1391672 1391672 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 782388 782396 8 0.0
bss 70608 70608 0 0.0
noinit 40416 40416 0 0.0
text 553284 553296 12 0.0
lighting-app tlsr9518adk80d (read/write) 802480 802488 8 0.0
bss 70864 70864 0 0.0
noinit 40416 40416 0 0.0
text 570050 570062 12 0.0

@andy31415 andy31415 merged commit bc65826 into project-chip:master May 18, 2022
@bzbarsky-apple bzbarsky-apple deleted the fix-platform-mdns-shutdown branch May 18, 2022 13:52
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.

2 participants