Fix: UPF N3 Interface Nil While Running 10K Subscriber Load Test#481
Merged
Conversation
d4f4d61 to
c9db9ef
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses a race condition during high-load scenarios (10K subscribers) where the UPF N3 interface becomes nil, causing PDU Resource Setup failures. The fix implements proper locking mechanisms to prevent concurrent access issues when reading and writing the N3Interfaces slice.
- Added mutex locking around N3Interfaces initialization and updates
- Protected N3Interfaces read access with read locks to prevent reading nil or partially initialized data
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pfcp/handler/handler.go | Added write lock protection around N3Interfaces initialization to prevent race conditions during concurrent updates |
| context/ngap_build.go | Added read lock protection when accessing N3Interfaces to prevent reading nil or partially initialized interface data |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: anaswara <anaswara.n@cdac.in>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: anaswara <anaswara.n@cdac.in>
Signed-off-by: anaswara <anaswara.n@cdac.in>
2f9ce3b to
2ebc3b0
Compare
sureshmarikkannu
previously approved these changes
Nov 21, 2025
I think there are a couple issues with the Lock
gab-arrobo
requested changes
Nov 21, 2025
gab-arrobo
reviewed
Nov 21, 2025
Signed-off-by: anaswara <anaswara.n@cdac.in>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
During a 10K subscriber load test, a few UEs failed due to the UPF N3 interface becoming nil, which resulted in PDU Resource Setup Failure. This issue impacts large-scale subscriber load scenarios. When the UPF N3 interface becomes nil, session establishment fails, affecting network reliability and scalability. Ensuring stable N3 interface handling is critical for high-capacity deployments and load testing.
Test Report Added?: