connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Platform mdns Init is not a no-op after the first call (causes crashes with MdnsAvahi, e.g. in chip-tool)

Open bluebin14 opened this issue 2 years ago • 3 comments

Problem

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

Proposed Solution

Do not fail when instance is reinited. See also https://github.com/project-chip/connectedhomeip/pull/18670

bluebin14 avatar May 24 '22 05:05 bluebin14

The key part here is that Init() on the platform mdns stuff needs to be a no-op after the first call.

Right now it might not be handling that right because parts of Init() are async, so it can end up setting the "I am initialized" boolean much later.

bzbarsky-apple avatar May 24 '22 20:05 bzbarsky-apple

No longer reproducible with current SDK revision

bluebin14 avatar Jul 26 '22 13:07 bluebin14

The crash is gone, but the underlying "API docs say it's a no-op, but it's not a no-op" behavior is still there...

bzbarsky-apple avatar Jul 26 '22 19:07 bzbarsky-apple

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

stale[bot] avatar Apr 25 '23 19:04 stale[bot]