For the last month or so, my mac has been randomly logging out overnight. When I come back in the morning, it's at the login screen and all my applications need to restart. I know it's not a full reboot because my
uptime steadily increases and when I run
last reboot or
last shutdown they are days ago.
I've tried examining the logs, and it looks like perhaps com.apple.WindowServer is crashing. I'm not sure if that's a consistent symptom though (or why it would crash, and only overnight - never while I'm actively working).
Running on an iMac, using macOS Mojave (although also happened on High Sierra).
Of note, the point where the logout happens starts with:
Oct 18 05:26:02 Christophers-iMac com.apple.xpc.launchd (com.apple.WindowServer): Service exited due to SIGABRT
Oct 18 05:26:02 Christophers-iMac com.apple.xpc.launchd (com.apple.ViewBridgeAuxiliary): Service exited with abnormal code: 2
Oct 18 05:26:04 Christophers-iMac com.apple.xpc.launchd (com.apple.ViewBridgeAuxiliary): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
Oct 18 05:26:04 Christophers-iMac sessionlogoutd: DEAD_PROCESS: 99533 console