Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"The system clock can, and will, jump backwards and forwards in time due to things outside of your control. Your program should be designed to survive this."

This is one of my favorite go-to test cases. I've found some really fantastically interesting, catastrophic network halting badness with this really simple test.



This literally just happened to a VPS of mine. Time was jumping forwards and back, every second the time could jump an hour ahead and back. Everything screwed up, from log rotation to sessions.

My first thought was that this was some kind of prank :-) but seems it was a hardware issue on the parent machine combined with ntpd trying to compensate.


You should read this article (also applies to other VMs) http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachin...

There are a lot of issues that can happen because of this...


This one was a blast back in the day:

http://kb.vmware.com/selfservice/microsites/search.do?langua...

No need to run the test case, you'd run into it soon enough on a 2.6 kernel on VMWare. ;)


Ooh, such as?


The most fun one I ever found was a situation where a daemon analyzing & forwarding traffic through a bridged interface would lock up & stop passing traffic when you popped backwards and forwards through time on the box.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: