There was an issue with the BSR being lost and things getting stuck. We just merged a fix for this.
It can also get stuck if the number of bytes to send in the buffer is too small.
I'm working on fixes, as this is required by real RRC protocol (which is required to properly test upcoming handover).
UE sends SR
gNB receives SR (NrGnbMac::DoReceiveControlMessage->UlReceiveSr)
gNB informs the scheduler (NrGnbMac::DoSlotUlIndication->SchedUlSrInfoReq)
gNB schedules BSR grant (NrGnbMac::DoSlotUlIndication->SchedUlTriggerReq->NrMacSchedulerNs3::DoSchedUlTriggerReq->ScheduleUl->DoScheduleUl->DoScheduleUlSr)
gNB transmits UL DCI
UE sends BSR (this is where Ana and me were working on bugs)
gNB receives BSR
(NrGnbMac::DoReceivePhyPdu->NrGnbMac::ReceiveBsrMessage->NrNoOpComponentCarrierManager::DoUlReceiveMacCe->NrGnbMac::DoReportMacCeToScheduler)
gNB informs scheduler about BSR (NrGnbMac::DoSlotUlIndication->NrMacSchedulerNs3::DoSchedUlMacCtrlInfoReq->BSRReceivedFromUe)
gNB scheduler decides who to give resources (NrGnbMac::DoSlotUlIndication->SchedUlTriggerReq->NrMacSchedulerNs3::DoSchedUlTriggerReq->ScheduleUl->DoScheduleUl)
Then UL DCI indicates to UE how many resources they have, they perform txops to distribute to their LCs and presto!