Fix another subtle shutdown deadlock The problem occurred when a thread tries to GC during shutdown.  In order to GC it has to acquire all the Capabilities in the system, but during shutdown, some of the Capabilities have already been closed and can never be acquired.
Fix another subtle shutdown deadlock
The problem occurred when a thread tries to GC during shutdown.  In
order to GC it has to acquire all the Capabilities in the system, but
during shutdown, some of the Capabilities have already been closed and
can never be acquired.

shlevy/ghc,mcschroeder/ghc,tibbe/ghc,snoyberg/ghc,ekmett/ghc,olsner/ghc,siddhanathan/ghc,sgillespie/ghc,vikraman/ghc,gridaphobe/ghc,lukexi/ghc,olsner/ghc,nushio3/ghc,nathyong/microghc-ghc,acowley/ghc,tjakway/ghcjvm,bitemyapp/ghc,ryantm/ghc,mcmaniac/ghc,ryantm/ghc,christiaanb/ghc,christiaanb/ghc,urbanslug/ghc,AlexanderPankiv/ghc,green-haskell/ghc,mcschroeder/ghc,mettekou/ghc,mcschroeder/ghc,fmthoma/ghc,olsner/ghc,fmthoma/ghc,TomMD/ghc,elieux/ghc,acowley/ghc,nathyong/microghc-ghc,ml9951/ghc,green-haskell/ghc,acowley/ghc,vTurbine/ghc,lukexi/ghc-7.8-arm64,ml9951/ghc,snoyberg/ghc,oldmanmike/ghc,ekmett/ghc,gcampax/ghc,nomeata/ghc,ghc-android/ghc,nkaretnikov/ghc,nushio3/ghc,nathyong/microghc-ghc,tibbe/ghc,shlevy/ghc,nathyong/microghc-ghc,nushio3/ghc,jstolarek/ghc,sdiehl/ghc,olsner/ghc,acowley/ghc,nathyong/microghc-ghc,mettekou/ghc,forked-upstream-packages-for-ghcjs/ghc,christiaanb/ghc,forked-upstream-packages-for-ghcjs/ghc,fmthoma/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,holzensp/ghc,vikraman/ghc,christiaanb/ghc,holzensp/ghc,gridaphobe/ghc,shlevy/ghc,green-haskell/ghc,vTurbine/ghc,gridaphobe/ghc,ekmett/ghc,mcmaniac/ghc,fmthoma/ghc,nathyong/microghc-ghc,vTurbine/ghc,bitemyapp/ghc,sdiehl/ghc,TomMD/ghc,mettekou/ghc,mfine/ghc,acowley/ghc,christiaanb/ghc,shlevy/ghc,acowley/ghc,da-x/ghc,vikraman/ghc,GaloisInc/halvm-ghc,da-x/ghc,ekmett/ghc,forked-upstream-packages-for-ghcjs/ghc,spacekitteh/smcghc,TomMD/ghc,spacekitteh/smcghc,holzensp/ghc,wxwxwwxxx/ghc,fmthoma/ghc,mfine/ghc,snoyberg/ghc,jstolarek/ghc,mfine/ghc,ghc-android/ghc,TomMD/ghc,oldmanmike/ghc,shlevy/ghc,elieux/ghc,tibbe/ghc,jstolarek/ghc,green-haskell/ghc,lukexi/ghc-7.8-arm64,GaloisInc/halvm-ghc,christiaanb/ghc,mettekou/ghc,da-x/ghc,lukexi/ghc-7.8-arm64,mcschroeder/ghc,oldmanmike/ghc,sgillespie/ghc,shlevy/ghc,elieux/ghc,nkaretnikov/ghc,ghc-android/ghc,mfine/ghc,snoyberg/ghc,ghc-android/ghc,ghc-android/ghc,mfine/ghc,mfine/ghc,lukexi/ghc,forked-upstream-packages-for-ghcjs/ghc,siddhanathan/ghc,forked-upstream-packages-for-ghcjs/ghc,ilyasergey/GHC-XAppFix,jstolarek/ghc,hferreiro/replay,nathyong/microghc-ghc,tjakway/ghcjvm,bitemyapp/ghc,frantisekfarka/ghc-dsi,lukexi/ghc-7.8-arm64,vikraman/ghc,ezyang/ghc,jstolarek/ghc,vTurbine/ghc,AlexanderPankiv/ghc,elieux/ghc,hferreiro/replay,mcschroeder/ghc,tjakway/ghcjvm,spacekitteh/smcghc,urbanslug/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,frantisekfarka/ghc-dsi,TomMD/ghc,AlexanderPankiv/ghc,christiaanb/ghc,ml9951/ghc,TomMD/ghc,GaloisInc/halvm-ghc,snoyberg/ghc,wxwxwwxxx/ghc,gcampax/ghc,siddhanathan/ghc,anton-dessiatov/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,vTurbine/ghc,lukexi/ghc-7.8-arm64,fmthoma/ghc,tjakway/ghcjvm,forked-upstream-packages-for-ghcjs/ghc,wxwxwwxxx/ghc,mettekou/ghc,GaloisInc/halvm-ghc,ezyang/ghc,holzensp/ghc,ekmett/ghc,ml9951/ghc,tibbe/ghc,bitemyapp/ghc,anton-dessiatov/ghc,hferreiro/replay,elieux/ghc,gcampax/ghc,AlexanderPankiv/ghc,sdiehl/ghc,nkaretnikov/ghc,hferreiro/replay,ryantm/ghc,nushio3/ghc,oldmanmike/ghc,urbanslug/ghc,urbanslug/ghc,wxwxwwxxx/ghc,sgillespie/ghc,vikraman/ghc,mcmaniac/ghc,oldmanmike/ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,anton-dessiatov/ghc,gridaphobe/ghc,olsner/ghc,ml9951/ghc,lukexi/ghc,siddhanathan/ghc,TomMD/ghc,sdiehl/ghc,gcampax/ghc,mcschroeder/ghc,da-x/ghc,ilyasergey/GHC-XAppFix,ryantm/ghc,sdiehl/ghc,ezyang/ghc,ml9951/ghc,ml9951/ghc,hferreiro/replay,sdiehl/ghc,nkaretnikov/ghc,ryantm/ghc,anton-dessiatov/ghc,vikraman/ghc,gridaphobe/ghc,mettekou/ghc,snoyberg/ghc,frantisekfarka/ghc-dsi,oldmanmike/ghc,shlevy/ghc,ezyang/ghc,elieux/ghc,snoyberg/ghc,tjakway/ghcjvm,urbanslug/ghc,siddhanathan/ghc,holzensp/ghc,urbanslug/ghc,oldmanmike/ghc,mcschroeder/ghc,vTurbine/ghc,nomeata/ghc,GaloisInc/halvm-ghc,mettekou/ghc,da-x/ghc,vikraman/ghc,urbanslug/ghc,elieux/ghc,ezyang/ghc,siddhanathan/ghc,nkaretnikov/ghc,lukexi/ghc,mcmaniac/ghc,bitemyapp/ghc,gcampax/ghc,sgillespie/ghc,olsner/ghc,da-x/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,nushio3/ghc,tibbe/ghc,anton-dessiatov/ghc,nomeata/ghc,ezyang/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,frantisekfarka/ghc-dsi,ilyasergey/GHC-XAppFix,ghc-android/ghc,frantisekfarka/ghc-dsi,mfine/ghc,gridaphobe/ghc,gcampax/ghc,nkaretnikov/ghc,sdiehl/ghc,ml9951/ghc,sgillespie/ghc,green-haskell/ghc,gcampax/ghc,tjakway/ghcjvm,sgillespie/ghc,lukexi/ghc,mcmaniac/ghc,fmthoma/ghc,nkaretnikov/ghc,ghc-android/ghc,olsner/ghc,vTurbine/ghc,AlexanderPankiv/ghc,hferreiro/replay,tjakway/ghcjvm,AlexanderPankiv/ghc,nomeata/ghc,da-x/ghc,ezyang/ghc,hferreiro/replay,siddhanathan/ghc,acowley/ghc,spacekitteh/smcghc,ilyasergey/GHC-XAppFix,nushio3/ghc,nushio3/ghc,nomeata/ghc