This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: trying to understand what's going on with timers and boot process


As I said, my problem is with Time::HiRes which is a perl module. Maybe I should have been a little more specific. The basic problem is you call the modules with the time you want to set the alarm for in usecs. The problem is in the broken version if HiRes, which I said is currently shipped with all distros of RedHat and probably others as well, calls setitimer with that value in its usec field. here's an example of an strace when setting a timer of 2 seconds on a broken implementation of HiRes:

setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 2000000}}, {it_interval={0, 0}, it_value={0, 0}}) = 0

notice the second field of it_value is incorrectly set to 2000000, but on this system which is running glibc 2.3 it works just fine! now here it is again with a correct version of HiRes:

setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={2, 0}}, NULL) = 0

As I said in my original note I realize the first call in invalid, but it still works correctly with glibc 2.3 and most of the time with 2.5 and I don't want to force everyone who uses my script to upgrade their HiRes (I do have a bugzilla into redhat on this) and so am trying to understand the cases where it will fail and why, especially why it only appears to fail during boot when 2.5 if glibc is present.

Does that help?

-mark

Carlos O'Donell wrote:
On Tue, Jul 1, 2008 at 9:09 AM, Mark Seger <Mark.Seger@hp.com> wrote:
My issue is I have an open source program that is dependent on HiRes and is
being distributed on Fedora 10 and I fear I'm going to start getting a lot
of support requests over this. I do intend to release a new version that
checks the version of glibc (I recently discovered I could just run
/lib/libc.6.so and it tells me its version) and warn people when there is a
problem, but I'm still stumped with the fact that I've only seen errors on
2.5 systems during boot. Can someone shed any light on what I'm seeing?
Should I be worrying about ALL versions of glibc > 2.3?

The first step is to develop a pure-C test case. Without a test case it's going to be very hard to debug your problem.

Do you have a test case?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]