Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2010 23:26:52 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        hackers@freebsd.org
Cc:        standards@freebsd.org
Subject:   Deterministic failure to meet sysconf(_SC_TIMER_MAX) for  CLOCK_REALTIME
Message-ID:  <AANLkTimy666B=r7_T_kqz-CPck43yMbJtw=1OeG3r-N2@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimy666B=r7_T_kqz-CPck43yMbJtw=1OeG3r-N2>