You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MB-42977: Fix use-after-free bug in AuthProviderService dtor
The AuthProviderService dtor calls event_base_loopbreak() to stop the
eventloop (which is running in a different thread), but then
immediately deletes the 'base' event_base object. Given
event_base_loopbreak() is non-blocking, this can result in the
event_base getting deleted while still being used by the other thread.
This manifests in different ways - sometimes a crash, but frequently
the background thread never breaks out of the event loop and the test
hangs, eventually timing out.
Fix by simply letting the AuthProviderService dtor delete the base
(via the unique_ptr which owns it) _after_ the background thread has
joined.
Change-Id: I92e06c293b866b442aa4386450947cfb55c01267
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/141394
Tested-by: Build Bot <[email protected]>
Reviewed-by: James Harrison <[email protected]>
0 commit comments