Printer state stays at "Finishing" after printing from SD


What is the problem?

When printing from an SD card, OctoPrint never sees that the job is completed and never goes back to the "Operational" state without manual intervention (usually a disconnect and reconnect will fix it). It stays at "Finishing," but never gets word that it's finished.

The third-to-last line in the serial log (see below) shows a transition from "Printing from SD" to "Finishing," when it should probably switch to "Operational" instead.

Additional information about your setup

OctoPrint version: 1.3.10
OctoPi version: n/a (running OctoPrint on ARM64 Gentoo on a Raspberry Pi 3)
printer: Anet A8
firmware: Marlin bugfix-2.0.x 9562a02
serial.log: posted at due to length