I did a lightning talk on a tale of two clocks

A short bug-story talk at Melbourne CocoaHeads. xcrun altool --upload-app kept failing on our iOS CI with a deeply nested NSCocoaErrorDomain Code=-1011 "Authentication failed", and the userInfo chain confidently blamed network proxies or Apple servers having issues. Neither was true.

The real cause was inside the VM. We’d built the macOS image and suspended it warm on one Mac mini, then resumed it on a different host with a different CPU clock speed. The VM’s two clocks — wall time and the monotonic clock that had been calibrated against the original host’s ticks — no longer agreed. Time would step five seconds into the future and come back as a negative number. Altool’s auth flow tripped over it and surfaced one of the more misleading NSError chains I’ve seen.