Fix a threading-related crash in privacy consent recalculation.
Review Request #13322 — Created Oct. 9, 2023 and submitted
Under certain conditions, we recompute the privacy consent
registrations. This can happen on thread startup or teardown, and
occasionally, two threads end up interfering with each other's state.This happens because, when recomputing, an unregister is performed, and
on a blank registry this will trigger a registry population, which then
triggers a signal and another attempt at a recomputation, in the middle
of an existing one. If this happens in multiple threads, it compounds
the problem.When this happens, we can end up triggering a double register of the new
consent requirements, which will crash.We now surround all this with a threading lock, and check for this in
the signal handler to avoid triggering an extra recomputation.
Unit tests pass.
Consent requirements continue to work properly.
Summary | ID |
---|---|
5691f304cf9c6161b63529ec1906fc30924a5a92 |
Description | From | Last Updated |
---|---|---|
Blank line between these two. |
david |