Task Notes Polution

Joel Sherrill joel.sherrill at OARcorp.com
Wed Jun 6 23:58:36 UTC 2001



"Fernando RUIZ CASAS (E-mail)" wrote:
> 
> Hi rtems-users.
> 
> Working in a reduced network-protocol
> when a new shell task is created over a pseudo-terminal (ptn)
> the TASK NOTES have been corrupted.
> 
> But only TWO task. The others tasks have not been corrupted.

I would have to think about the allocation order and stack 
growth direction for your target CPU (x86 I think).  But I
think it will be the task created immediately before the
one with the corruption that is having the stack problem.

You can always check the address of the RTEMS API extension
versus the task stacks to make sure.

> Setting the CONFIGURE_EXTRA_TASK_STACKS and CONFIGURE_MEMORY_OVERHEAD
> Increasing the task_stack in the shell_stack task and more tries but...
> 
> The task notes continue corrupted.
> 
> Which is the parameter to touch in order to avoid this problem?
> Where is the first place to see?
> 
> Only the two first tasks have been corrupted.
> I think that the code (it's the same for all the ptnX tasks) is good.
> 
> *********************Here the capture***************************************
> 
> RTEMS SHELL (Ver.1.0-FRC):/dev/ptn7. Jun  6 2001. 'help' to list commands.
> ptn7 [/] #
> ptn7 [/] # task
>   ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
> ----------------------------------------------------------------------------
> --
> 08010002   WDCT     1   DELAY  P:T:nA  NONE
> 08010003   net0     8   Wsem   P:T:nA  NONE    18010029  0xa0b3b10
> 08010004   net1     8   Wsem   P:T:nA  NONE    18010031  0xa0b3b10
> 08010005   tMST     8   READY  P:T:nA  NONE
> 08010006   tSLV     8   Wevnt  P:T:nA  NONE
> 08010007   tVIS     8   DELAY  P:T:nA  NONE
> 08010009   ptn0     8   Wsem   P:T:nA  NONE    1801000d  0xa0b3b10 0: 0x1388
> 1: 0x18 2: 0x5ffffc5 4: 0xa6a 5: 0xa01b82a 6: 0x100 7: 0xa01aa46 8:
> 0xa0f8a88 14: 0xa046420 15: 0xa0f8af8
> 0801000a   ptn1     8   Wsem   P:T:nA  NONE    18010010  0xa0b3b10 0:
> 0xa02d076 1: 0xa0f88bc 2: 0xa009c80 3: 0xa0f88d0 4: 0x1b4 5: 0x4 6:
> 0xa0f88e4 7: 0xa0f88d0 8: 0xa02e42c 9: 0xa0f88c8 10: 0xa0f8a80 11: 0xa0f88d4
> 13: 0xa0f88dc
> 0801000b   ptn2     8   Wsem   P:T:nA  NONE    18010013  0xa0b3b10
> 0801000c   ptn3     8   Wsem   P:T:nA  NONE    18010016  0xa0b3b10
> 0801000d   ptn4     8   Wsem   P:T:nA  NONE    18010019  0xa0b3b10
> 0801000e   ptn5     8   Wsem   P:T:nA  NONE    1801001c  0xa0b3b10
> 0801000f   ptn6     8   Wsem   P:T:nA  NONE    1801001f  0xa0b3b10
> 08010011   ptn7     8   READY  P:T:nA  NONE    18010030  0xa0b3b10
> ptn7 [/] # config
> config
> INITIAL (startup) Configuration Info
> ----------------------------------------------------------------------------
> --
> WORKSPACE      start: 0xa066ce8;  size: 0x99318
> TIME           usec/tick: 10000;  tick/timeslice: 50;  tick/sec: 100
> MAXIMUMS       tasks: 20;  timers: 2;  sems: 106;  que's: 0;  ext's: 1
>                partitions: 0;  regions: 1;  ports: 0;  periods: 0
> ptn1 [/] # malloc
> Malloc stats
>   avail:128k  allocated:94k (74%) max:95k (74%) lifetime:0k freed:141k
>   Call counts:   malloc:183   free:52   realloc:0   calloc:52
> ptn1 [/] #
> 
> ***************************************************************************
> After EXIT from the 'corrupted' tasks
> ***************************************************************************
> ptn0 [/] # exit
> exit
> logoff from the system...
> Goodbye from RTEMS SHELL :-(
> 
> ptn7 [/] # task
> task
>   ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
> ----------------------------------------------------------------------------
> --
> 08010002   WDCT     1   DELAY  P:T:nA  NONE
> 08010003   net0     8   Wsem   P:T:nA  NONE    18010029  0xa0b3b10
> 08010004   net1     8   Wsem   P:T:nA  NONE    18010031  0xa0b3b10
> 08010005   tMST     8   READY  P:T:nA  NONE
> 08010006   tSLV     8   Wevnt  P:T:nA  NONE
> 08010007   tVIS     8   DELAY  P:T:nA  NONE
> 0801000b   ptn2     8   Wsem   P:T:nA  NONE    18010013  0xa0b3b10
> 0801000c   ptn3     8   Wsem   P:T:nA  NONE    18010016  0xa0b3b10
> 0801000d   ptn4     8   Wsem   P:T:nA  NONE    18010019  0xa0b3b10
> 0801000e   ptn5     8   Wsem   P:T:nA  NONE    1801001c  0xa0b3b10
> 0801000f   ptn6     8   Wsem   P:T:nA  NONE    1801001f  0xa0b3b10
> 08010011   ptn7     8   READY  P:T:nA  NONE    18010030  0xa0b3b10
> ptn7 [/] #
> 
> ***************************************************************************
> After Reenter in the two ptnX Closed
> ***************************************************************************
> ptn1 [/] # task
> task
>   ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
> ----------------------------------------------------------------------------
> --
> 08010002   WDCT     1   DELAY  P:T:nA  NONE
> 08010003   net0     8   Wsem   P:T:nA  NONE    18010029  0xa0abb00
> 08010004   net1     8   Wsem   P:T:nA  NONE    18010031  0xa0abb00
> 08010005   tMST     8   READY  P:T:nA  NONE
> 08010006   tSLV     8   Wevnt  P:T:nA  NONE
> 08010007   tVIS     8   DELAY  P:T:nA  NONE
> 0801000b   ptn2     8   Wsem   P:T:nA  NONE    18010013  0xa0abb00
> 0801000c   ptn3     8   Wsem   P:T:nA  NONE    18010016  0xa0abb00
> 0801000d   ptn4     8   Wsem   P:T:nA  NONE    18010019  0xa0abb00
> 0801000e   ptn5     8   Wsem   P:T:nA  NONE    1801001c  0xa0abb00
> 0801000f   ptn6     8   Wsem   P:T:nA  NONE    1801001f  0xa0abb00
> 08010011   ptn7     8   Wsem   P:T:nA  NONE    18010022  0xa0abb00
> 08010012   ptn0     8   Wsem   P:T:nA  NONE    1801000d  0xa0abb00
> 08010013   ptn1     8   READY  P:T:nA  NONE    18010028  0xa0abb00
> ptn1 [/] #
> ***************************************************************************
> Now all seems OK. Bizarrous problem. I'm confused.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel 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