I have narrowed down. This bug was introduced by the fix in #1618900. That tries to fix the problem of the the unattended-upgrades.service by letting it depend on network.target and local-fs.target. However, that doesn't change any of the dependencies, it only makes the race window larger.
After some experiments, the correct dependencies in the unit file appear to be: Before=remote-fs.target local-fs.target Which make it behave just like the SysV init script. This change together with the patch I attached to this bug report together should fix the issue and also fix #1618900 . Regards, Erik -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1654600 Title: unattended-upgrade-shutdown hangs when /var is a separate filesystem To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1654600/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs