Bug report: downtimes beyond 2038 cause event queue errors

Andreas Ericsson ae at op5.se
Fri Apr 5 16:55:38 CEST 2013

On 04/05/2013 09:41 AM, Anton Löfgren wrote:
> For the record, the following patch identically triggers the faults on my
> x86_64 Arch installation (where time_t normally is a quad word).

Well, yes. You're explicitly casting it to a 32-bit value but it can't
hold that much so it gets truncated. But CentOS 5 really shouldn't have
32-bit time_t, and especially not on 64-bit archs, so I don't know
where it's getting its cast from.

It's weird though, because we use the timeval struct provided by
squeue_event_runtime() to check the delay. The delay should always be
< 0 if we overflow the tv_sec field, or huge if we don't. Either way,
we should either run the event as scheduled (and then remove it), or
it shouldn't be at the top of the queue.

Not that I'm overly bothered with what happens when you schedule things
25 years into the future, but bugs that shouldn't exist tend to piss me

Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal

More information about the Developers mailing list