This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Scheduler problem?


Hi all,
I'm running benchmark of my application and after some time one of the
threads (named MIRS) stops running.
All other threads keep running (I get pings and the benchmark runs on
the other threads)

I have t he ASSERTS and TRACES enabled.
The Scheduler is not configured with time-slicing.

I have implemented CLI command to get the threads info by "get_next"
and "get_info"
and added the TRACE DUMP and also
This is the output in normal mode

Thread # 1(Idle Thread) state(0) stack on 0x80045418 length 1536. Max
usage - 1396(90%)
Thread # 2(COM-TX) state(1) stack on 0x80039690 length 2560. Max usage
- 1400(54%)
Thread # 3(COM-RX) state(1) stack on 0x8003a090 length 2560. Max usage
- 1616(63%)
Thread # 4(CLI   ) state(0) stack on 0x8003e290 length 3584. Max usage
- 2112(58%)
Thread # 5(MODEM1) state(1) stack on 0x8003cc90 length 2816. Max usage
- 1312(46%)
Thread # 6(RF1   ) state(1) stack on 0x8003b690 length 2816. Max usage
- 1848(65%)
Thread # 7(MODEM2) state(1) stack on 0x8003d790 length 2816. Max usage
- 1312(46%)
Thread # 8(RF2   ) state(1) stack on 0x8003c190 length 2816. Max usage
- 1928(68%)
Thread # 9(MIRS  ) state(1) stack on 0x8003aa90 length 3072. Max usage
- 1648(53%)
Thread #10(TCP   ) state(1) stack on 0x8004b768 length 2048. Max usage
- 1600(78%)
Thread #11(ETH   ) state(1) stack on 0x8004bf68 length 2048. Max usage
- 1328(64%)

Scheduler:

Lock:                0
Current Thread:      CLI

Threads:

         Idle Thread pri =  31 state =      R id =   1
                     stack base = 80045418 ptr = 80045860 size = 00000600
                     sleep reason     NONE wake reason     NONE
                     queue = 00000000      wait info = 00000000

              COM-TX pri =   7 state = S      id =   2
                     stack base = 80039690 ptr = 80039f30 size = 00000a00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e51c      wait info = 80039fd0

              COM-RX pri =  15 state = S      id =   3
                     stack base = 8003a090 ptr = 8003a838 size = 00000a00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004b228      wait info = 00000000

                 CLI pri =  20 state =      R id =   4
                     stack base = 8003e290 ptr = 8003ebd8 size = 00000e00
                     sleep reason     NONE wake reason     DONE
                     queue = 00000000      wait info = 00000000

              MODEM1 pri =   9 state = S      id =   5
                     stack base = 8003cc90 ptr = 8003d5a8 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e504      wait info = 00000000

                 RF1 pri =   9 state = S      id =   6
                     stack base = 8003b690 ptr = 8003bcf0 size = 00000b00
                     sleep reason    DELAY wake reason     NONE
                     queue = 00000000      wait info = 00000000

              MODEM2 pri =   9 state = S      id =   7
                     stack base = 8003d790 ptr = 8003e0a8 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e514      wait info = 00000000

                 RF2 pri =   9 state = S      id =   8
                     stack base = 8003c190 ptr = 8003c990 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e50c      wait info = 00000000

                MIRS pri =  11 state = S      id =   9
                     stack base = 8003aa90 ptr = 8003b510 size = 00000c00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e4f4      wait info = 8003b5b0

                 TCP pri =   7 state = S      id =  10
                     stack base = 8004b768 ptr = 8004bdc0 size = 00000800
                     sleep reason  TIMEOUT wake reason     NONE
                     queue = 8004b668      wait info = 00000000

                 ETH pri =   6 state = S      id =  11
                     stack base = 8004bf68 ptr = 8004c618 size = 00000800
                     sleep reason     WAIT wake reason     NONE
                     queue = 80033f98      wait info = 00000000

And this is the output in the faulty mode

Thread # 1(Idle Thread) state(0) stack on 0x80045418 length 1536. Max
usage - 1396(90%)
Thread # 2(COM-TX) state(1) stack on 0x80039690 length 2560. Max usage
- 1400(54%)
Thread # 3(COM-RX) state(1) stack on 0x8003a090 length 2560. Max usage
- 1616(63%)
Thread # 4(CLI   ) state(0) stack on 0x8003e290 length 3584. Max usage
- 2112(58%)
Thread # 5(MODEM1) state(1) stack on 0x8003cc90 length 2816. Max usage
- 1312(46%)
Thread # 6(RF1   ) state(1) stack on 0x8003b690 length 2816. Max usage
- 1872(66%)
Thread # 7(MODEM2) state(1) stack on 0x8003d790 length 2816. Max usage
- 1312(46%)
Thread # 8(RF2   ) state(1) stack on 0x8003c190 length 2816. Max usage
- 1928(68%)
Thread # 9(MIRS  ) state(0) stack on 0x8003aa90 length 3072. Max usage
- 1648(53%)
Thread #10(TCP   ) state(1) stack on 0x8004b768 length 2048. Max usage
- 1600(78%)
Thread #11(ETH   ) state(1) stack on 0x8004bf68 length 2048. Max usage
- 1328(64%)

Scheduler:

Lock:                0
Current Thread:      CLI

Threads:

         Idle Thread pri =  31 state =      R id =   1
                     stack base = 80045418 ptr = 80045860 size = 00000600
                     sleep reason     NONE wake reason     NONE
                     queue = 00000000      wait info = 00000000

              COM-TX pri =   7 state = S      id =   2
                     stack base = 80039690 ptr = 80039f30 size = 00000a00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e51c      wait info = 80039fd0

              COM-RX pri =  15 state = S      id =   3
                     stack base = 8003a090 ptr = 8003a838 size = 00000a00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004b228      wait info = 00000000

                 CLI pri =  20 state =      R id =   4
                     stack base = 8003e290 ptr = 8003ebd8 size = 00000e00
                     sleep reason     NONE wake reason     DONE
                     queue = 00000000      wait info = 00000000

              MODEM1 pri =   9 state = S      id =   5
                     stack base = 8003cc90 ptr = 8003d5a8 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e504      wait info = 00000000

                 RF1 pri =   9 state = S      id =   6
                     stack base = 8003b690 ptr = 8003be90 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e4fc      wait info = 00000000

              MODEM2 pri =   9 state = S      id =   7
                     stack base = 8003d790 ptr = 8003e0a8 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e514      wait info = 00000000

                 RF2 pri =   9 state = S      id =   8
                     stack base = 8003c190 ptr = 8003c990 size = 00000b00
                     sleep reason     WAIT wake reason     NONE
                     queue = 8004e50c      wait info = 00000000

                MIRS pri =  11 state =      R id =   9
                     stack base = 8003aa90 ptr = 8003b510 size = 00000c00
                     sleep reason     NONE wake reason     DONE
                     queue = 00000000      wait info = 8003b5b0

                 TCP pri =   7 state = S      id =  10
                     stack base = 8004b768 ptr = 8004bdc0 size = 00000800
                     sleep reason  TIMEOUT wake reason     NONE
                     queue = 8004b668      wait info = 00000000

                 ETH pri =   6 state = S      id =  11
                     stack base = 8004bf68 ptr = 8004c618 size = 00000800
                     sleep reason     WAIT wake reason     NONE
                     queue = 80033f98      wait info = 00000000


Does anyone can advise?
Should I suspect the priority inversion protocols ?
Are there more tools that I can use to find the root cause?

Thanks

Elad

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]