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


On Tue, Jul 1, 2008 at 10:42 AM, Mark Seger <Mark.Seger@hp.com> wrote:
> Does that help?

The setitimer call in glibc is an assembly wrapper to the kernel
syscall. On x86 there is no logic in userspace, it's handled
completely by the kernel.

The glibc wrapper might have some argument setup code, but nothing
more. Disassemble setitimer from a debug version of libc.so.6 to see
the wrapper.

A recent kernel implementation of sys_setitimer calls do_setitimer
which uses the following check (((unsigned long) (t)->tv_usec) <
USEC_PER_SEC) to invalidate large usec values and return EINVAL.

In summary, it would appear that if a user upgrades their kernel, the
buggy Time:HiRes perl module must surely break.

Does that help? :-)

In the future *please* produce a test-case that shows the problem,
even if it is a buggy call to a libc routine.

1. Expected behaviour
2. Observed behaviour
3. Reproducible test-case.

e.g.
Expected behaviour:
- Call to setitimer fails.

Observed behaviour:
- Invalid call to setitimer works in glibc 2.3 and 2.5, but sometimes
fails in 2.5.

Test-case
.... Code showing invalid call to setitimer.

Cheers,
Calros.


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