Resources not freed when calling sctp_sendmsg() after shutdown()
Somehow after calling sctp_sendmsg after calling shutdown with SHUT_WR a resource is not freed anymore.
I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.
See the following test-cases that all reproduce this issue. All call sctp_sendmsg after calling shutdown, therefore i suspect that this is the cause of the issue.
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt
Xin Long
maintainerQuoted 12 lines · Julian Cordes
Somehow after calling
sctp_sendmsgafter calling shutdown withSHUT_WRa resource is not freed anymore.I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.
Quoted 3 lines
See the following test-cases that all reproduce this issue. All call
sctp_sendmsgafter calling shutdown, therefore i suspect that this is the cause of the issue.
I think it's a old issue, the latest kernel has no this issue any more. can you give it a try ?
Quoted 7 lines
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt
2017-01-17 18:30 GMT+01:00 Xin Long <[email protected]>:
Quoted 13 lines · Julian Cordes
Quoted 12 lines
Somehow after calling
sctp_sendmsgafter calling shutdown withSHUT_WRa resource is not freed anymore.I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.
Quoted 6 lines
Quoted 3 lines
See the following test-cases that all reproduce this issue. All call
sctp_sendmsgafter calling shutdown, therefore i suspect that this is the cause of the issue.I think it's a old issue, the latest kernel has no this issue any more. can you give it a try ?
Hi,
i just ran the test-case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on a recent archlinux kernel:
$ uname -a Linux localhost 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux
The problem still exists. The second time i ran the test case, i got as a result:
shutdown-14.pkt:78: runtime error in bind call: Expected result 0 but got -1 with errno 98 (Address already in use)
Quoted 7 lines
Quoted 7 lines
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt
Xin Long
maintainerQuoted 24 lines · Julian Cordes
2017-01-17 18:30 GMT+01:00 Xin Long <[email protected]>:
Quoted 13 lines · Julian Cordes
Quoted 12 lines
Somehow after calling
sctp_sendmsgafter calling shutdown withSHUT_WRa resource is not freed anymore.I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.Quoted 6 lines
Quoted 3 lines
See the following test-cases that all reproduce this issue. All call
sctp_sendmsgafter calling shutdown, therefore i suspect that this is the cause of the issue.I think it's a old issue, the latest kernel has no this issue any more. can you give it a try ?
Hi,
i just ran the test-case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on a recent archlinux kernel:
Quoted 9 lines
$ uname -a Linux localhost 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/LinuxThe problem still exists. The second time i ran the test case, i got as a result:
shutdown-14.pkt:78: runtime error in bind call: Expected result 0 but got -1 with errno 98 (Address already in use)
I meant upstream latest kernel:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
it's already v4.10-rc3
you may need to rebuild. :)
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt
2017-01-17 18:44 GMT+01:00 Xin Long <[email protected]>:
Quoted 34 lines · Julian Cordes
Quoted 24 lines
2017-01-17 18:30 GMT+01:00 Xin Long <[email protected]>:
Quoted 13 lines · Julian Cordes
Quoted 12 lines
Somehow after calling
sctp_sendmsgafter calling shutdown withSHUT_WRa resource is not freed anymore.I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.Quoted 6 lines
Quoted 3 lines
See the following test-cases that all reproduce this issue. All call
sctp_sendmsgafter calling shutdown, therefore i suspect that this is the cause of the issue.I think it's a old issue, the latest kernel has no this issue any more. can you give it a try ?
Hi,
i just ran the test-case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on a recent archlinux kernel:Quoted 9 lines
$ uname -a Linux localhost 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/LinuxThe problem still exists. The second time i ran the test case, i got as a result:
shutdown-14.pkt:78: runtime error in bind call: Expected result 0 but got -1 with errno 98 (Address already in use)
Quoted 7 lines
I meant upstream latest kernel:
git clonegit://git.kernel.org/pub/scm/linux/kernel/git/davem/net.gitit's already v4.10-rc3
you may need to rebuild. :)
Hi,
okay. I have never rebuild a complete linux kernel. Do i just have to clone the specified repository and then run make?
Maybe someone that has already v4.10-rc3 can clone packetdrill from
https://github.com/nplab/packetdrill and run the specified test-case. If it works multiple times then this has already been fixed, if the bind calls fails the second time then the problem is still there...!
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt
Xin Long
maintainerQuoted 42 lines · Julian Cordes
2017-01-17 18:44 GMT+01:00 Xin Long <[email protected]>:
Quoted 34 lines · Julian Cordes
Quoted 24 lines
2017-01-17 18:30 GMT+01:00 Xin Long <[email protected]>:
Quoted 13 lines · Julian Cordes
Quoted 12 lines
Somehow after calling
sctp_sendmsgafter calling shutdown withSHUT_WRa resource is not freed anymore.I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.Quoted 6 lines
Quoted 3 lines
See the following test-cases that all reproduce this issue. All call
sctp_sendmsgafter calling shutdown, therefore i suspect that this is the cause of the issue.I think it's a old issue, the latest kernel has no this issue any more. can you give it a try ?
Hi,
i just ran the test-case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on a recent archlinux kernel:Quoted 9 lines
$ uname -a Linux localhost 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/LinuxThe problem still exists. The second time i ran the test case, i got as a result:
shutdown-14.pkt:78: runtime error in bind call: Expected result 0 but got -1 with errno 98 (Address already in use)Quoted 7 lines
I meant upstream latest kernel:
git clonegit://git.kernel.org/pub/scm/linux/kernel/git/davem/net.gitit's already v4.10-rc3
you may need to rebuild. :)
Quoted 8 lines
Hi,
okay. I have never rebuild a complete linux kernel. Do i just have to clone the specified repository and then run make?Maybe someone that has already v4.10-rc3 can clone packetdrill from
https://github.com/nplab/packetdrill and run the specified test-case. If it works multiple times then this has already been fixed, if the bind calls fails the second time then the problem is still there...!
yeah, in my env, it works well with the latest kernel.
but I think it's a blocker for your test script, you may still want to build the latest kernel.
https://kernelnewbies.org/KernelBuild :
part "Setting up your kernel configuration" and
part "Building the kernel"
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt
2017-01-17 19:08 GMT+01:00 Xin Long <[email protected]>:
Quoted 51 lines · Julian Cordes
Quoted 42 lines
2017-01-17 18:44 GMT+01:00 Xin Long <[email protected]>:
Quoted 34 lines · Julian Cordes
Quoted 24 lines
2017-01-17 18:30 GMT+01:00 Xin Long <[email protected]>:
Quoted 13 lines · Julian Cordes
Quoted 12 lines
Somehow after calling
sctp_sendmsgafter calling shutdown withSHUT_WRa resource is not freed anymore.I can reproduce the following behaviour:
When running for example the following test case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on my machine, it succeeds the first time. This means that the test case worked as expected. But if I run the same test case
on the same machine again then the bind-call in the test-case will fail. I waited longer than 30 minutes but only a reboot of the operating system seems to help in this case.Quoted 6 lines
Quoted 3 lines
See the following test-cases that all reproduce this issue. All call
sctp_sendmsgafter calling shutdown, therefore i suspect that this is the cause of the issue.I think it's a old issue, the latest kernel has no this issue any more. can you give it a try ?
Hi,
i just ran the test-case
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
on a recent archlinux kernel:Quoted 9 lines
$ uname -a Linux localhost 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/LinuxThe problem still exists. The second time i ran the test case, i got as a result:
shutdown-14.pkt:78: runtime error in bind call: Expected result 0 but got -1 with errno 98 (Address already in use)Quoted 7 lines
I meant upstream latest kernel:
git clonegit://git.kernel.org/pub/scm/linux/kernel/git/davem/net.gitit's already v4.10-rc3
you may need to rebuild. :)Quoted 8 lines
Hi,
okay. I have never rebuild a complete linux kernel. Do i just have to clone the specified repository and then run make?Maybe someone that has already v4.10-rc3 can clone packetdrill from
https://github.com/nplab/packetdrill and run the specified test-case. If it works multiple times then this has already been fixed, if the bind calls fails the second time then the problem is still there...!
Quoted 11 lines
yeah, in my env, it works well with the latest kernel.
but I think it's a blocker for your test script, you may still want to build the latest kernel.
https://kernelnewbies.org/KernelBuild :
part "Setting up your kernel configuration" and
part "Building the kernel"
I have now build the kernel fromgit://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git and can confirm that this issue is resolved with the latest kernel. I can now run the test scripts multiples times and it works as expected on my machine.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Testscripts available at:
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-14.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-tests/ttl-policy/shutdown-2.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-1.pkt
https://github.com/nplab/PR_SCTP_Testsuite/blob/master/forward-tsn/sender-side-implementation/shutdown-received-tests/ttl-policy/shutdown-2.pkt