# OSC O-DU High Issue
>[time=Wed, Aug 16, 2023 10:20 AM]
:::danger
#### **Problem 1: Throughput would be dropped suddenly**

As the figure shown above, at the red circle part, you can see the throughput is dropped suddenly. I try to trace the log.
**Reason:**
- Sometimes **RLC didn't send the BO indication to SCH**, and it causes that scheduler didn't allocate any resources to DL data. Finally, the throughput is dropped suddenly.
- The log shown below indicates that **MAC skips 5 slot to send the BO indication to SCH**. [Entire Log](https://drive.google.com/file/d/1m36GEHrTiiJTu_ybYkIXCbbh1oid44GM/view?usp=sharing)
And this log is printed in `MacProcRlcDlData()`
```
DEBUG --> MAC: Received DL data for sfn=644 slot=1 numPdu= 4
...
DEBUG --> MAC: Received DL data for sfn=644 slot=7 numPdu= 5
```


---
- Furthermore, I also found that the **time series become abnormal** when RLC didn't send the BO indication to SCH.
- As the below figure shown the **abnormal situation**, you can found that `slot.indication` and **Received DL Data from CU_STUB** is mixed up. Even it only did receiving DL message during 1 slot time.
- As the below figure shown the **Normal situation**, you can found that the time series only shows the the procedure which is related to **Received DL Data from CU_STUB** without mixing other procedure
>**Abnormal:**

>**Normal**

:::spoiler MSC Source Code
```
title O-DU Data Transmission Procedure
participant "PHY_Stub" as PHY
participant MAC
participant SCH
participant RLC
RLC->MAC: BO Status
MAC->SCH:<align:center>BO
box over SCH: Store the BO Info
PHY->MAC: SLOT.Indication
MAC->SCH: Send SLOT.Indication to SCH
box over SCH: Run Slice-enabled Scheduler
SCH->MAC: <align:center>Send DL Scheduling Result\n**sendDlAllocToMac()**
box over MAC: MacProcDlAlloc()
box over MAC: sendSchedRptToRlc()
MAC->RLC: <align:center>Report Scheduling Result\n**MacSendSchedResultRptToRlc()**
box over RLC: RlcProcSchedResultRpt()
box over RLC: rlcProcDedLcSchedRpt()
box over RLC: rlcUtlSendToMac()
box over RLC: rlcSendDedLcDlData()
RLC->MAC:<align:center>Send DL Data\n**RlcSendDlDataToMac()**
box over MAC: <align:center>MacProcRlcDlData()\n Functionality:\n1.Store the DL data, and it will be transmitted in next slot.indication\n2. Send the BO indication to SCH
MAC->SCH:<align:center>BO Info\n**sendDlRlcBoInfoToSch()**
```
:::
:::danger
#### **Problem 2: O-DU is crashed when generating full load traffic**
This problem has two kinds of error log and different possible triggered points:
- **Segmentation Fault when MAC packs the DL data (SDU)**

- **Possible Reason:**
When `Number of Packets` generated by CU_STUB is higher, the possibility is getting higher as well. I guess it is caused by generating number of packets, and leads out of sync finally.
:::success
- **Memory allocation failed (Solved)**

- **Possible Reason:**
When the traffic is full load, the BO would be getting higer as the figure shown below:

BO almost reaches 2 millions. Therefore, I think this error is caused by **overflow** or the **memory is not enough** in their designed memory pool.
- **Solution:**
In `RlcProcDlUserDataTransfer()`, whenever RLC receiving new data from CU STUB, let it check how many BO in the buffer. If the BO is over certain number, drop the user data to prevent the buffer overflow memory problem.
```c=
mBuf = dlDataMsgInfo->dlMsg;
/* Avoid RLC BO overflow*/
DU_LOG("\nINFO --> Jacky: Enter RlcProcDlUserDataTransfer");
RlcDlRbCb rbCb; / RB Control Block */
RlcCb *tRlcCb;
tRlcCb = RLC_GET_RLCCB(pst->dstInst);
rlcDbmFetchDlRbCbByRbId(tRlcCb, &datReqInfo->rlcId, &rbCb);
if(rbCb){
DU_LOG("\nINFO --> Jacky: The BO size is: %d", rbCb->m.umDl.bo);
if(rbCb->m.umDl.bo>50000){
DU_LOG("\nINFO --> Jacky: Skip this tranmission");
RLC_SHRABL_STATIC_BUF_FREE(RLC_MEM_REGION_DL, RLC_POOL, datReqInfo, sizeof(RlcDatReqInfo));
// RLC_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, dlDataMsgInfo->dlMsg, dlDataMsgInfo->msgLen * sizeof(Buffer));
ODU_PUT_MSG_BUF(dlDataMsgInfo->dlMsg);
RLC_SHRABL_STATIC_BUF_FREE(pst->region, pst->pool, dlDataMsgInfo, sizeof(RlcDlUserDataInfo));
--rlcCb[pst->dstInst]->dlSduId;
return ROK;
}
}else{
DU_LOG("\nINFO --> Jacky: Empty allocate for rbCb->m.umDl.bo");
}
if(rlcProcDlData(pst, datReqInfo, mBuf) != ROK)
{
return RFAILED;
}
```
:::