Skip to content

Fix releaseTunnel() race condition affecting PFCP Session Deletion Response handling - #84

Open
anaswarac-dac wants to merge 1 commit into
cdacmasterfrom
longevity#333
Open

Fix releaseTunnel() race condition affecting PFCP Session Deletion Response handling#84
anaswarac-dac wants to merge 1 commit into
cdacmasterfrom
longevity#333

Conversation

@anaswarac-dac

Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug fix

What this PR does / why we need it:
This PR fixes a race condition during PFCP session deletion in releaseTunnel().

Previously, PendingUPF entries were added and PFCP Session Deletion Requests were sent in the same loop. If a UPF responded quickly, the response handler could remove that UPF from PendingUPF before the remaining UPFs had been added. This could cause PendingUPF.IsEmpty() to become true prematurely, resulting in session cleanup being triggered before all PFCP Session Deletion Responses were received.

To eliminate this race, the release process is split into two phases:

Populate the complete PendingUPF map for all unique UPFs.
Send PFCP Session Deletion Requests only after PendingUPF has been fully populated.

This guarantees that PendingUPF.IsEmpty() becomes true only after responses from all expected UPFs have been processed, preventing premature session cleanup and avoiding intermittent session establishment failures observed during longevity testing.
Which issue(s) this PR fixes:

Fixes #83

Test Report Added?:

/kind TESTED

Test Report:

Special notes for your reviewer:

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.

Fix releaseTunnel() race condition affecting PFCP Session Deletion Response handling

1 participant