Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 181 by doubleukay: 4 billion seconds added to expiry when system
time steps backwards
http://code.google.com/p/memcached/issues/detail?id=181
What steps will reproduce the problem?
As root,
1. date -s '2011-01-06 00:00:59'
2. ./memcached -u nobody -d
3. echo -e "set x 0 1 0\r\n\r" | nc localhost 11211
4. echo stats cachedump 1 0 | nc localhost 11211
5. date -s '2011-01-06 00:00:00'
6. echo -e "set x 0 1 0\r\n\r" | nc localhost 11211
7. echo stats cachedump 1 0 | nc localhost 11211
What is the expected output? What do you see instead?
In step #7, I expect to see the expiry of item "x" to be in the ballpark of
1294290000s, however I see 5589257300 instead. This means that the cache
key will practically never expire. Note that 5589257300 - 1294290000 is
roughly 2^32.
What version of the product are you using? On what operating system?
Tested on 1.2.2 and 1.4.5, on Debian 5.0 64-bit.
Please provide any additional information below.
This problem is most likely happen at system boot, when ntpdate corrects a
server time backwards, but could happen any other time system time is
changed backwards.
Attachments:
output.txt 641 bytes