times(2) reports the number of ticks since boot and sysconf(_SC_CLK_TCK) is supposed to give the number of ticks per second. However the value (100) reported by sysconf(_SC_CLK_TCK) is clearly 10 times too low as a simple experiment using a wall clock reveals. I noticed this problem because the soft timers implemented by the Mozart/Oz VM (relying on times(2) and _SC_CLK_TCK) were firing too quickly. I do not know what severity to assign. For me, it is quite high since it screws up my VM, but I imagine not many people are in this situation. I leave it as normal, but I consider it major.
Created attachment 4967 [details] illustrates the problem running this testcase on my machine produces the following output: according to gettimeofday: 5000 according to ticks: 50010 sysconf(_SC_CLK_TCK)=100 either times is wrong or sysconf(_SC_CLK_TCK) is wrong. either way, time computing according to ticks is off by a factor of 10.
This is a glibc *inconsistency*. Glibc hardwires that on i386 jiffies is always 100 and 1024 on alpha for example. Its not possible to provide a quick fix for that. Such a solution would require a couple of changes to kernel and glibc. Note that the jiffies patch to kernel 2.4 still is *experimental* . There are other possible problems associated to it as well. So in case this is critical for you , set the jiffies back to 100 in the kernel configuration. I will check what glibc2.3 does though.
no, I am now checking for the bug in our configure script and adjusting the computation using the appropriate ratio. Since you confirm that this is a glibc bug (which btw the way I tried to check before reporting the problem and could not locate in their bug db), I imagine that it will pop up in other systems as well. my problem is that I need to make the compilation of our VM robust in the face of such eventualities. I could of course change the jiffies thing on my machine, but that would not help users of our VM on other systems. I just hope you know whom to bug about it :-)
As bjb said, the jiffies patch is experimental, and from own experience do have some issues with some drivers. If the glibc guys will fix it for you, reopen this with the patch, or URL to it, else change your jiffies to the default 100.