srsRAN_4G
srsRAN_4G copied to clipboard
possible race condition resulting in missed mbsfn conf
Issue Description
The configuration w/r to mbsfn can be "missed" possibly due to a race or state condition. This has been observed under (2) different scenarios described below. See patches provided for addition logging for the startup sequence and a patch to delay the init in phy_common.
Setup Details
Using the ZMQ RF device and the default config with mbsfn enabled we have on occasion accidentally started the enb before the epc. The enb will try to connect to the epc every 10 sec and this is usually fine if the ue has not been started yet. But with mbsfn enabled upon receiving the first connection refused error, something goes wrong and the call order seems to change w/r to initialization. When starting the epc before starting the enb this does not happen except in our emulation environment which uses another RF device and may initialize faster than the typical RF devices. In our emulation environment even when starting the epc first, this happens maybe 10% of the time but is reproduce-able under the same circumstances. Adding a 2 second sleep placed in phy_common init() seems to prevent the problem which leads us to believe there is a possible race condition even when the suggested epc/enb start up order is employed though not very common.
Expected Behavior
./srsenb ./enb.conf.zmq_mbsfn | grep XXX 2<&1 XXX in rrc::init XXX in rrc::configure_mbsfn_sibs, adding configue_mbsfn to task_schedule XXX in phy::configure_mbsfn XXX in phy_common configure_mbsfn XXX in phy_common init XXX in phy_common init mcch_configured = 1 XXX MCH |0|1|1|1|0|0|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| XXX set_dl_tti_mask : |0|1|1|1|0|0|1|1|1|0| XXX MCCH |0|1|0|0|0|0|0|0|0|0| [
Actual Behaviour
./srsenb ./enb.conf.zmq_mbsfn | grep XXX 2<&1 XXX in rrc::init XXX in rrc::configure_mbsfn_sibs, adding configue_mbsfn to task_schedule connect(): Connection refused XXX in phy_common init XXX in phy_common init mcch_configured = 0 XXX in phy::configure_mbsfn XXX in phy_common configure_mbsfn
Steps to reproduce the problem
Enable mbsfn and start the enb before starting the epc.