4 Replies Latest reply: Jan 12, 2011 11:24 AM by 809142 RSS

    enabling stack trace on a realtime thread

    809142
      Hi,


      I'm having issues with getting a stack trace for a real time thread. I keep getting the following:
      com.sun.rtsjx.DisabledStackTrace.canBeEnabledWithRealtimeDebugBean(DisabledStackTrace.java:24)


      so i went inside my factory where i initialize my RT Threads, and added the following:
      com.sun.rtsjx.DisabledStackTrace.canBeEnabledWithRealtimeDebugBean();

      I still wasnt able to get a stack trace. So then i thought, maybe i had to make that same call in each thread. So inside one of my classes that runs on a RT Thread, i added the above logic. Still nothing..

      can anyone tell me how to enable?

      Thanks so much
        • 1. Re: enabling stack trace on a realtime thread
          EJP
          I keep getting the following:
          com.sun.rtsjx.DisabledStackTrace.canBeEnabledWithRealtimeDebugBean(DisabledStackTrace.java:24)
          I don't understand what you mean by this statement. How do you 'keep getting the following'?
          • 2. Re: enabling stack trace on a realtime thread
            809142
            So my process is multithreaded and only some of the threads are realtime threads. From within a realtime thread i can execute a full thread dump no problem. However, if i were to attempt to execute a thread dump on a realtime thread (within a different thread) i get that log statement stating i need to enable stack tracing.
            • 3. Re: enabling stack trace on a realtime thread
              EJP
              That's not a statement, it's a single line from a stack trace. Where's the rest of it?
              • 4. Re: enabling stack trace on a realtime thread
                809142
                There is no stack trace. At least that's what im getting from the output. My guess is RTSJ sees pausing the thread to get a full stack trace causes jitter and makes the system just that much more undeterministic. Therefore by default they disable stack tracing for realtime threads (when called from a different thread). Here is the entire output:

                INFO [ProcessMonitor InputQ-1 Cell] stax.StackTraceAspect: (21/Dec/2010 17:47:22.177) 21/Dec/2010 17:47:22.177
                Missed Heartbeat Trace for CELL [ShapeCell]
                Strack Trace Dump
                _________Input Thread
                "ShapeCell InputQ-1 Cell" id [173] priority [20] state [WAITING] alive [true] daemon [false] native [false] suspended [false]
                at com.sun.rtsjx.DisabledStackTrace.canBeEnabledWithRealtimeDebugBean(DisabledStackTrace.java:24)
                queue: depth [0] max size [10000]


                The "ProcessMonitor InputQ-1" is a non-realtime thread attempting to get a stack trace of "ShapeCell InputQ-1" thread (which is a realtime thread)



                I believe the developers of RTSJ are probably going to have to answer this question. I have a followup meeting with them in the near future and will post their response.