Potential race condition using AutoStartEnabled

Symptom

CPU speeds have increased dramatically over the last few years and more systems are being built with multiple CPUs in them. Many telephony systems have scripts that initiate the user application upon system start-up. 

This has led to a known race condition between Dialogic® CG series Media Boards booting up and user application initialization when the AutoStartEnabled keyword is used in the oamsys configuration file. 

The AutoStartEnabled keyword is used to boot CG series Media Boards when ctdaemon is started. It is not enough to have a dependency that waits for ctdaemon to start before trying to initialize the user application. Ctdaemon could be started but the CG series Media Boards could still be booting.

Workaround

A workaround for this issue is to use the OAM service to start the boards in the application.

To do this, the application would need to:

  • Open the OAM service on a new context and register that context to receive OAM events via oamAlertRegister

  • Detect the boards in the OAM database via oamBoardEnum

  • Use oamStartBoard to start the boards one by one

  • When the OAMEVN_STARTBOARD_DONE event with reason code OAM_REASON_FINISHED is generated, the board is ready for use by the application.

Product List

Dialogic CG series Media Boards

 

Return to Documentation Home I Return to Sangoma Support