IBM Support

Returning timer event is delayed in IBM Rational Rhapsody

Troubleshooting


Problem

When the timer task is activated, the event is sent, but not received until a significant period has elapsed.

Cause

1. It is possible that the OMTimerManager is having problems writing to the queue and is therefore unable to send the event.

This could be due to:

  • A fixed size MessageQueue - which cannot grow on demand - might be full at that point of time and therefore blocking the writer in a sem_take() operation?
  • Another object (running on a lower priority thread) was writing to the queue and was then interrupted during write (so the queue access is locked by semaphore) by the high priority OMTimerManager, who now waits for the semaphore as well. This would result in a deadlock.

2. You have two threads both named timer on a light weight

At least two components both contain a thread named "timer". If this is a Rhapsody timer-thread then you might have called "OXF::initialize()" in both software components (most likely while the component is starting).

Unlike heavy weight, process based operating systems (with independent processes running in virtual memory), with a light weight, thread based system (such as VxWorks) this will cause a problem.

The framework singleton objects like "OMMainThread", "OMTimerManager" and "OMThreadManager" are global symbols in a light weight, thread based system.

This will result in a conflict among the components, because each of them invokes an independent timer thread. However, all of these timer threads will try to call the callback of the very same single "OMTimerManager". The same thing may happen for the queue of "OMMainThread", if they called OXF::start() in each component.

One reason this occurs is because the system concept of the project has been moved from a platform like Linux, QNX, Windows, OS-9 or any other heavy weight, process based platform to the light weight, thread based platform VxWorks.

Resolving The Problem

To resolve this issue, follow one of the two items below:

1. It is possible that the OMTimerManager is having problems writing to the queue and is therefore unable to send the event.

  • Try increasing the initial (final) size of the MessageQueue (via the CG:Class:ActiveMessageQueueSize property of the active class or via an OXF constant in the OSAL for OMMainThread...OMDefaultMessageQueueSize or similar).

2. You have two threads both named timer on a light weight
  • You should invoke "OXF::initialize()" only once, ahead of initializing your first Rhapsody built component. You should then start the components, and finally invoke "OXF::start()" in order to run the framework's main thread.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21421341