I have an application running on QNX RTOS and ARM-Le Cortex.
Some thread in the application hoggs the CPU and the CPU consumption reaches upto 90%. After the CPU load reaches 90% every thing stops responding.
My questions are: -
How to resolve this issue?? Through kernel trace, I was able to find the Thread which is hogging the CPU but how to find which function in
the thread is hogging the CPU??
Do you have the source code? There is a profiling feature in Momentics (which I’ve never used). Do you know what the thread is doing? I would think that some careful reflection on your part would make the answer obvious.
Is dumper running, is there a core dump generated?
You say that everything stops responding but you manage to get a kernel trace, how is that possible?
If you can run sloginfo, if the program did a SIGSEGV it will show up in the sloginfo output. It will show the address where it crashed, then if you have a map file for the executable you might be able to figure out in which fonction it happened.
You might want to ask yourself, how can I watch my TV without plugging it in?
There are ways to find out what you want, but they involve doing something.
If you can’t put “qconn” on the target, then you don’t have enough control to fix the problem.
Here is a more programatic way that I assume you also can’t do.
At the beginning of every routine, set a global variable with a unique number. In a separate thread, loop with a sleep. Increment counts in a table with the global variable as your index. After a while, check the table and see who’s hogging.