Hello,
I recently joined a company that uses RTX as its OS. I'm still very inexperienced in its use and am still slowly working myself in the code that has been written so far. Most of my team is on holiday now and of course something had to go wrong.
While arriving at work today I noticed the system I had been running over the weekend (which uses an LPC2478) had stopped working. I went into debug mode and let the system run, hoping it would crash again, which it did.
When analyzing what goes wrong, I came across a peculiar problem. The program was stuck in the following while loop of os_put_prio() in rt_List.c:
while (p_CB2 != NULL && prio <= p_CB2->prio) { p_CB = (P_XCB)p_CB2; p_CB2 = p_CB2->p_lnk; }
When I further investigated why it was stuck it appeared that a task was listed twice in the p_CB2 (which, fyi, is the os_rdy list, when tracing back from where the call came). This of course made for an infite loop as the pointer to next task would eventually lead to the same task again.
I have run it three times and each time it's a different task that's listed twice. Sometimes the next item in the list is already the same task, sometimes there's a task inbetween.
Does anyone know what could cause this phenomenon?
Your help would be greatly appreciated!
Kind regards,
Gael