]> git.proxmox.com Git - cargo.git/commit
Auto merge of #5570 - alexcrichton:fix-deadlock, r=matklad
authorbors <bors@rust-lang.org>
Mon, 28 May 2018 09:34:35 +0000 (09:34 +0000)
committerbors <bors@rust-lang.org>
Mon, 28 May 2018 09:34:35 +0000 (09:34 +0000)
commit228c406e162f67e92b324c6899a7a609a980d464
tree4b9dc351511b99a5cffa91ec2c0071234395ae43
parentd775dddd31ce56a78e2f368f546311bfd94135b6
parent1868998bec6a311d2dd8e4549968df58d1b787ab
Auto merge of #5570 - alexcrichton:fix-deadlock, r=matklad

Fix an issue of deadlock in Cargo

Currently Cargo can deadlock itself via file locks in somewhat obscure
scenarios. One way to trigger this scenario is by causing the index to fail
being created, for example through an invalid `init.templatedir` configuration.

This commit takes the strategy of solving two bugs:

* First, the deadlock is fixed. This is done by manually ensuring that the
  current deadlock doesn't happen by scheduling cached work to happen outside
  the scope of a lock.
* Second, the initialization of the registry's index is fixed. We turn off the
  usage of external templates as we don't want to use them for this internally
  managed repository anyway.

Closes #5551