Yenya's World

Thu, 02 Mar 2006

Feb29 problem

Yesterday all our chip card access systems ceased to work. When I tried to find out what the problem was, there were no daemon processes running on servers which communicate with the card readers. When I tried to start one such process by hand, it failed with an "invalid date" message.

It turned out that the problem was in the new feature I have added to the service software few months ago: I decided, that when a card is used to unlock the door, the log message should be inserted to the database with a timestamp provided by the card reader, not with the database sysdate() function (which can be later, when the message is not read from the card reader immediately).

This is of course an improvement, but unfortunately it seems that the card readers suffer from the "Feb29" problem, because they all thought that yesterday was February 29, 2006. Which is an invalid date, and the service daemon has failed to convert this date to the UNIX timestamp, and crashed. The software of course does have an automatic time synchronization each day after the midnight, but this did not work as well, because (in order to see the time offset of the card reader to the system time) I read and log the old time first, and only then I set the new time. But reading the old time crashed the daemon, so the new time did not went in. Oh well.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)


Yenya's World: Linux and beyond - Yenya's blog.


RSS feed

Jan "Yenya" Kasprzak

The main page of this blog



Blog roll:

alphabetically :-)