Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Problems with registers save/restore on context switch?
Latest test shows that on the machine that fails with both the modified
and the unmodified 6.0.3 kernel, it works fine with a 5.2 kernel
output: (printfs are to show progress, and are not failures)
candor$ ./lttest
init: 1970-01-01T00:00:01
57
67108921
134217785
201326649
268435513
335544377
402653241
469762105
536870969
603979833
671088697
738197561
805306425
872415289
939524153
candor$
HOWEVER....
When I boot that same 5.2 system with a 6.0.2 kernel (the 6.0.3 kernels are
on the disk I took out....)
It works fine, too.
candor$ lttest
init: 1970-01-01T00:00:01
57
67108921
134217785
201326649
268435513
335544377
402653241
469762105
536870969
603979833
671088697
738197561
805306425
872415289
939524153
candor$
Not sure what this means. I can't run the same binary from the 6.0 system on
5.2 because it's ELF.
I CAN copy the lttest binary from the 5.2 system to the production system
that fails. That also fails:
mercy$ ./lttest
init: 1970-01-01T00:00:01
57
67108921
fail: 1970-01-01T00:00:03
fail: 1970-01-01T00:00:03
134217785
fail: 1970-01-01T00:00:04
201326649
fail: 1963-09-04T23:30:30
fail: 1970-01-01T00:00:02
268435513
fail: 1970-01-01T00:00:02
335544377
(etc)
Not sure what this means. It doesn't look like the compiler, but how can
it be the stuff on the disk external to the kernel? Can the libraries cause
this sort of thing? Hard to see how it could be - intermittent?
Mysterious.....
-dgl-
The test program again - with printfs...
candor$ cat lttest.c
#include <stdio.h>
#include <string.h>
#include <time.h>
void prttime(char *str, struct tm *tmp);
int
main(int argc, char **argv)
{
struct tm tm;
struct tm *tmp;
time_t t;
int i;
t = 1;
tzset();
tmp = gmtime_r(&t, &tm);
if (tmp == NULL) {
perror("init localtime");
}
prttime("init", &tm);
for (i = 0; i < 1000000000; ++i) {
tmp = gmtime_r(&t, &tm);
if (tmp == NULL) {
perror("localtime");
continue;
}
if ( tm.tm_year != 70 ||
tm.tm_mon != 0 ||
tm.tm_mday != 1 ||
tm.tm_hour != 0 ||
tm.tm_min != 0 ||
tm.tm_sec != 1 ) {
prttime("fail", tmp);
}
if ((i & 0x3ffffff) == 57) printf("%d\n" , i);
}
return 0;
}
void
prttime(char *str, struct tm *tmp)
{
printf("%s: %04d-%02d-%02dT%02d:%02d:%02d\n",
str,
1900 + tmp->tm_year, tmp->tm_mon + 1, tmp->tm_mday,
tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
}
candor$
Home |
Main Index |
Thread Index |
Old Index