Missing Top Layers

What is the problem?

I have had several long prints with very critical sections at the top few layers that have failed, but in a weird way. The top few layers just don't get printed (anywhere from 5 to 20 layers). There is no obvious indication that the printer failed other than the missing layers. I have not been able to witness the printing of the last layers, but when I go to pop my print off, the print head is at its "I have successfully finished printing" position. I do not see anything in the logs indicating any kind of failure.

What did you already try to solve it?

I have only looked at the logs. I have also considered that the issue may be with various equipment plugged into the wall outlets or light switches, but I have not been able to line up any instances of turning on those devices or the lights causing this issue. I have had issues with a desk lamp making my raspberry pi freak out when the lamp is turned on, but I have since unplugged the lamp.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

RPi 3B
Printer: Creality CR-10 with GT2560 replacement
Firmware: Marlin V1
OctoPrint version: 1.3.8
OctoPi version: octopi-stretch-lite-0.15.1 was what I installed

octoprint.log (40.4 KB)

No serial.log because I hadn't enabled that feature. I have done so now for future issues.

Any suggestions for fixes are greatly appreciated.

[UPDATE]

This is no longer an issue. After a couple hours of messing around with this issue, I found what appears to be a thread of PTFE stuck in my nozzle. This explains everything, so the issue isn't with Octoprint as I had thought but with my printer deciding to shred the PTFE tube. Thanks anyway.

I totally get this with Shaxon filament in my PTFE tubing. I get this so routinely that I just bypass the PTFE for anything that's Shaxon. I do have to add a little shim next to the pickup bowden intake so that the filament hits the middle part of the teeth, however.