Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#74 tv_usec reported by kernel is off

closed
nobody
None
5
2005-09-29
2005-08-29
Anonymous
No

Dear Da-x and co!

I must say colinux is great!
I use it now for my server, that now is seamlessly is
running windows to provide services, and using colinux
0.6.1-linux-2.4.26 with debian 3.1 stable as a firewall.
But I found a bug... Which almost freezes my box.
Bind(9.2.4) DNS reports this error in the syslog:

"gettimeofday returned bad tv_usec: corrected"

I used the following program to verify the problem:

#include <sys/time.h>
#include <stdio.h>

int main (void) {
struct timeval now;
while (1) {
gettimeofday(&now, NULL);
printf("tv_sec = %d", now.tv_sec);
printf(" tv_usec = %d\n", now.tv_usec);
}
return 0;
}

output:
tv_sec = 1125328665 tv_usec = -12271264
tv_sec = 1125328665 tv_usec = -12271251
tv_sec = 1125328665 tv_usec = -12271239

These are the systemtime in seconds (tv_sec), followed
by a subdivion by microseconds (tv_usec), the last is of
course an integer between 0 and 999,999
So the systemtime microseconds reported by the
kernel/colinux is off. because it is negative, which is
normally not possible.

The result is that Bind is using 100% processortime
correcting it *every time*. I could patch bind, but the
problem could arise in other programs.

Please help!

Ewoud Kappers
ekappers@ewoudnet.nl

Discussion

  • Henry N.
    Henry N.
    2005-09-29

    • status: open --> closed
     
  • Henry N.
    Henry N.
    2005-09-29

    Logged In: YES
    user_id=579204

    Is corrected in newer versions. Your test works on 2.6.11-co-
    0.6.3-pre13, the last snapsot. (No negative values)

    http://www.colinux.org/snapshots

    Henry