Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip stats under error conditions. #218

Merged
merged 1 commit into from
Sep 1, 2024
Merged

Skip stats under error conditions. #218

merged 1 commit into from
Sep 1, 2024

Conversation

thakurajayL
Copy link
Contributor

@thakurajayL thakurajayL commented Aug 29, 2024

Some of the messags are nested and they need to have multiple statistics Id assigned to them. This is advance scenario which needs further design. But current design is good enough for most of the common scenario. Hence I have proposed to avoid POD crahshes if stats Id is not found.

stats/stats.go Outdated
x := m.T.Sub(ue.CReg.RegReqOutTime)
ue.CReg.RegReqAuthReq = x.Microseconds()
logger.StatsLog.Infoln("Time[us] between Reg Req & Auth Req ", ue.CReg.RegReqAuthReq)
if t != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the transaction (Id) does not already exist in the StatisticsEvent?

Copy link
Contributor

@gab-arrobo gab-arrobo Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After further debugging, I see that the same transaction (Id=14) gets "popped" twice in the stats, which leads to nil pointer. Transaction 14 "comes" from HandleInitialContextSetupRequest (gnodeb/worker/gnbcpueworker/handler.go) and from HandleServiceAcceptEvent (simue/handler.go). Does it mean that the same output "event" generates 2 "input" events/messages?

Received Event: PDU_SESS_ACC_IN, Id: 9
Received Event: UE_CTX_CMD_IN, Id: 12
Received Event: ICS_REQ_IN, Id: 14
Received Event: SVC_ACCEPT_IN, Id: 14

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes current design needs some changes to handle few corner cases and hence it crashes if transaction not found. I would say at least gnbsim should not crash if no transaction found.

Signed-off-by: Ajay Lotan Thakur <thakur.ajay@gmail.com>
@thakurajayL thakurajayL merged commit b8b7a4a into main Sep 1, 2024
9 checks passed
@thakurajayL thakurajayL deleted the dev-stats-fix branch September 1, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants