Deterministic failure to meet sysconf(_SC_TIMER_MAX) for
CLOCK_REALTIME
Garrett Cooper
yanegomi at gmail.com
Thu Jul 29 06:26:54 UTC 2010
Hi,
Running the following noted test [1], I always run into issues on
the 29th iteration and EAGAIN:
$ conformance/behavior/timers/1-1.run-test
timer_create() did not return success for iteration 29: Resource
temporarily unavailable
$ conformance/behavior/timers/1-1.run-test
timer_create() did not return success for iteration 29: Resource
temporarily unavailable
$ conformance/behavior/timers/1-1.run-test
timer_create() did not return success for iteration 29: Resource
temporarily unavailable
$ conformance/behavior/timers/1-1.run-test
timer_create() did not return success for iteration 29: Resource
temporarily unavailable
Interestingly enough, sysconf(_SC_TIMER_MAX) returns 54; this is
the requirement that the test is attempting to validate (that at least
_SC_TIMER_MAX timers can be created via timer_create).
The timers kernel code is capped to 25 by default, by a
preprocessor define in .../sys/sysctl.h:
/sys/sys/sysctl.h:#define CTL_P1003_1B_TIMER_MAX 25 /* int */
Doesn't make sense why an additional 4 timers were created.
Oh, and the sysctl reports something else entirely:
p1003_1b.timers: 200112
p1003_1b.delaytimer_max: 2147483647
p1003_1b.timer_max: 32
So, what number is the source of truth and why don't they all match?
Thanks!
-Garrett
PS I'm still running a CURRENT kernel based off of r206173...
[1] http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=blob;f=testcases/open_posix_testsuite/conformance/behavior/timers/1-1.c;h=ac043b0913e93f8db93cc74e249316f5ff82bdc8;hb=HEAD
More information about the freebsd-hackers
mailing list