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

Add ChipMdnsShutdown() #9108

Merged
merged 2 commits into from
Aug 19, 2021
Merged

Conversation

kpschoedel
Copy link
Contributor

Problem

Issue #8001 MdnsAvahi destructor segfault; require separate shutdown:
MdnsAvahi can cause a crash on exit due to a static instance running
code in its destructor after dependent components have shut down.

Change overview

  • Add ChipMdnsShutdown(). This is a narrow fix, which does not attempt
    to address other potential problems with singleton mDNS state.
  • Fix TestMdns to shut down cleanly.

Testing

  • TestMdns and CI.

#### Problem

Issue project-chip#8001 MdnsAvahi destructor segfault; require separate shutdown

MdnsAvahi can cause a crash on exit due to a static instance running
code in its destructor after dependent components have shut down.

#### Change overview

- Add `ChipMdnsShutdown()`. This is a narrow fix, which does not attempt
  to address other potential problems with singleton mDNS state.
- Fix TestMdns to shut down cleanly.

#### Testing

- TestMdns and CI.
@github-actions
Copy link

Size increase report for "esp32-example-build" from 0bdeccb

File Section File VM
chip-lock-app.elf .flash.text -68 -68
chip-bridge-app.elf .flash.text -48 -48
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize
[Unmapped],0,68
.flash.text,-68,-68

Comparing ./master_artifact/chip-bridge-app.elf and ./pull_artifact/chip-bridge-app.elf:

sections,vmsize,filesize
[Unmapped],0,48
.flash.text,-48,-48

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize


@woody-apple woody-apple merged commit 09916d7 into project-chip:master Aug 19, 2021
@kpschoedel kpschoedel deleted the x8001-mdns-shutdown branch August 19, 2021 22:58
@msandstedt msandstedt mentioned this pull request Sep 11, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Add ChipMdnsShutdown()

#### Problem

Issue project-chip#8001 MdnsAvahi destructor segfault; require separate shutdown

MdnsAvahi can cause a crash on exit due to a static instance running
code in its destructor after dependent components have shut down.

#### Change overview

- Add `ChipMdnsShutdown()`. This is a narrow fix, which does not attempt
  to address other potential problems with singleton mDNS state.
- Fix TestMdns to shut down cleanly.

#### Testing

- TestMdns and CI.

* restyle
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