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

[Bugs] Sometime accept for the SCTP socket fails #561

Open
ShouheiNishi opened this issue Apr 24, 2024 · 0 comments
Open

[Bugs] Sometime accept for the SCTP socket fails #561

ShouheiNishi opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ShouheiNishi
Copy link
Contributor

Describe the bug

Sometime accept for the SCTP socket fails in AMF.

To Reproduce

Steps to reproduce the behavior:

  1. Apply this patch
diff --git a/test/registration_test.go b/test/registration_test.go
index 761e064..8c0e4f1 100644
--- a/test/registration_test.go
+++ b/test/registration_test.go
@@ -64,6 +64,11 @@ func TestRegistration(t *testing.T) {
        var recvMsg = make([]byte, 2048)

        // RAN connect to AMF
+       for i := 0; i < 1000; i++ {
+               conn, err := test.ConnectToAmf(amfN2Ipv4Addr, ranN2Ipv4Addr, 38412, 9487)
+               assert.Nil(t, err)
+               conn.Close()
+       }
        conn, err := test.ConnectToAmf(amfN2Ipv4Addr, ranN2Ipv4Addr, 38412, 9487)
        assert.Nil(t, err)

  1. Run command ./test.sh -o TestRegistration

Environment (please complete the following information):

  • free5GC Version: 3.4.1
  • OS: Ubuntu 20.04.6 LTS
  • Kernel version: 5.15.0-102-generic
  • go version: go1.22.2

Additional context

It seems that this issue is caused by free5gc/sctp@097e517.
In this issue case, raw SCTP socket may be leaked.

log.txt

@andy89923 andy89923 added the bug Something isn't working label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants