Task Creation Issue
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Oct 6 17:28:44 UTC 2011
On 10/06/2011 12:07 PM, Gabriel Raineri wrote:
> Solved!
>
Great. Reports on potential confdefs.h issues always
make me nervous. Given a test case they are fairly
straight forward to track down.
> I forgot to add:
> #define CONFIGURE_MESSAGE_BUFFER_MEMORY \
> CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( _maxQ1, _sizeQ1) + \
> CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( _maxQ2, _sizeQ2) + \
This means you are using a recent RTEMS version
and confdefs.h has undergone changes to be easier
to audit for correctness. So hopefully it is less likely
to have a mistake in it. :)
> Thanks everybody!
>
> Cheers,
> G.
>
> PS: Dumb, dumb, dumb...
>
>
> On 06-Oct-11 1:06 PM, Joel Sherrill wrote:
>> On 10/06/2011 10:53 AM, Gedare Bloom wrote:
>>>
>>> Is it possible that you underallocated something other than tasks?
>>> All those configure commands reserve some space in a shared
>>> workspace, and if for example you have timers or more than 21
>>> semaphores then the workspace could be too small.
>>>
>>> Another possibility is a bug in confdefs.h where the workspace size
>>> is calculated. We would need more info to diagnose further,
>>> including how you ./configure RTEMS and some idea of the resources
>>> your code uses.
>>>
>> This is sadly always a possibility. All it takes is missing one
>> allocation
>> on task create.
>>
>> If you can put together a VERY simple test case with nothing but tasks
>> that does it, we can file a PR and I can look into it.
>>
>> --joel
>>> On Oct 6, 2011 11:04 AM, "Gabriel Raineri" <graineri at invap.com.ar
>>> <mailto:graineri at invap.com.ar>> wrote:
>>> > Hi everybody!
>>> >
>>> > I'm having an issue when creating tasks. The thing is that I'm
>>> receiving
>>> > RTEMS_UNSATISFIED (not enough memory for stack/FP context) after
>>> having
>>> > created a bunch of them.
>>> >
>>> > Let's dig into the details...
>>> >
>>> > #define CONFIGURE_MAXIMUM_TASKS 25
>>> > #define CONFIGURE_MAXIMUM_SEMAPHORES 21
>>> > #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 14
>>> > #define CONFIGURE_MAXIMUM_PARTITIONS 6
>>> > #define CONFIGURE_MAXIMUM_TIMERS 0
>>> > #define CONFIGURE_MAXIMUM_BARRIERS 1
>>> >
>>> > * Tasks are being created after all other RTEMS objects (Semaphores,
>>> > Queues, etc.).
>>> > * After creating the task #22 and when attempting to create task
>>> #23 I
>>> > get the aforementioned error code.
>>> > * All tasks are created with a stack size of
>>> RTEMS_MINIMUM_STACK_SIZE bytes.
>>> >
>>> > The weird thing is that if I define CONFIGURE_EXTRA_TASK_STACKS to be
>>> > RTEMS_MINIMUM_STACK_SIZE * 5 (20480 bytes) the tasks are created
>>> without
>>> > any problem.
>>> >
>>> > I think I shouldn't need to define CONFIGURE_EXTRA_TASK_STACKS. Am
>>> I right?
>>> >
>>> > Am I missing something?
>>> >
>>> > Any help will be appreciated!
>>> >
>>> > Cheers,
>>> > Gabriel
>>
>>
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list