Skip to content

Race condition fixes

This MR fixes 2 race conditions that can happen in wireplumber, especially if the daemon is run with valgrind:

  1. Some clients (eg Clementine music player) can create a node and then quickly destroy it before the proxy finishes being bound, leading to assertion errors. This has been fixed in the first commit by checking if the global proxy is valid when binding, and so returning a transition error if it happens, avoiding the unneeded binding process.

  2. Sometimes, a new global with the same Id as another old global owned by a proxy wants to be exposed before the old proxy is destroyed. If this happens, instead of returning with an assertion error, we remove the old global and we export the new one.

Those 2 fixes make it possible to run wireplumber with valgrind and not having assertion errors, making it easier to debug memory leaks when running the daemon.

Merge request reports