It seems bug 1581127 helped with reducing LS shutdown hangs.
Bug 1541776 Comment 21 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
It seems bug 1581127 helped with reducing IDB shutdown hangs.