diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-02-06 13:25:56 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-02-06 13:53:28 +0100 |
commit | c3b942e0fc4777f9033f614b6b1f462c0f8c473e (patch) | |
tree | 95ea9621578abb0c14b45f228d8e56e7a888349d /bootstrap.sh | |
parent | 4369771870b3945f95e1468a0803696034d506b7 (diff) |
Don't hold interruptCallbacks lock during interrupt handling
This changes the representation of the interrupt callback list to
be safe to use during interrupt handling.
Holding a lock while executing arbitrary functions is something to
avoid in general, because of the risk of deadlock.
Such a deadlock occurs in https://github.com/NixOS/nix/issues/3294
where ~CurlDownloader tries to deregister its interrupt callback.
This happens during what seems to be a triggerInterrupt() by the
daemon connection's MonitorFdHup thread. This bit I can not confirm
based on the stack trace though; it's based on reading the code,
so no absolute certainty, but a smoking gun nonetheless.
Diffstat (limited to 'bootstrap.sh')
0 files changed, 0 insertions, 0 deletions