#2738 assigned defect

POSIX sporadic server uses unexpected CPU budgets

Reported by: Sebastian Huber Owned by: Needs Funding
Priority: low Milestone: Indefinite
Component: score Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The POSIX sporadic server starts with invalid CPU budget of zero. This leads to an unsigned integer underflow in the next scheduler tick. The first _POSIX_Threads_Sporadic_budget_TSR() fixes the problem.

Change History (6)

comment:1 Changed on Jun 15, 2016 at 8:45:58 AM by Sebastian Huber <sebastian.huber@…>

In 917884c408708c7634e09563d7cd3ed30a4ab71a/rtems:

posix: Fix poradic server initial CPU budget

Update #2738.

comment:2 Changed on Jun 15, 2016 at 8:49:00 AM by Sebastian Huber

Summary: POSIX sporadic server starts with invalid CPU budgetPOSIX sporadic server uses unexpected CPU budgets
*** BEGIN OF TEST PSX 12 ***
Init's ID is 0x0b010001
Init: pthread_attr_init - SUCCESSFUL
Init: pthread_create - EINVAL (invalid scheduling policy)
Init: pthread_attr_init - SUCCESSFUL
Init: set scheduling parameter attributes for sporadic server
Init: pthread_create - EINVAL (replenish < budget)
Init: pthread_create - EINVAL (invalid sched_ss_low_priority)
Init: pthread_create - SUCCESSFUL
Sporadic Server: exitting
[0] H 100ms
[0] L 200ms
[1] H 290ms
[1] L 400ms
[2] H 490ms
[2] L 600ms
*** END OF TEST PSX 12 ***

From the test output we see, that the initial high period differs from the later high periods. The later high periods lack one clock tick of time.

Last edited on Jun 15, 2016 at 9:22:11 AM by Sebastian Huber (previous) (diff)

comment:3 Changed on Jun 15, 2016 at 9:21:56 AM by Sebastian Huber <sebastian.huber@…>

In 661e0e6377b16cb52c46c87877ed182bcf39ef01/rtems:

psxtests/psx12: Use and print proper rounded ms

Update #2738.

comment:4 Changed on Dec 23, 2016 at 2:10:53 PM by Sebastian Huber

Priority: normallow

comment:5 Changed on Jan 23, 2017 at 1:32:11 PM by Sebastian Huber

Milestone: 4.12Indefinite
Owner: changed from Sebastian Huber to Needs Funding
Status: newassigned

comment:6 Changed on Jan 23, 2017 at 4:26:08 PM by Joel Sherrill

I am not wanting to change the status on this. Just wondered from looking at the output if the math isn't adding one tick in the conversion from time to ticks or vice-versa. We had an off by one in that time of math a while back somewhere else I recall.

Note: See TracTickets for help on using tickets.