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

User Initiated Abort (cause code: 12) not handled #225

Closed
enobufs opened this issue May 1, 2022 · 3 comments
Closed

User Initiated Abort (cause code: 12) not handled #225

enobufs opened this issue May 1, 2022 · 3 comments

Comments

@enobufs
Copy link
Member

enobufs commented May 1, 2022

Your environment.

  • Version: pion/sctp@v1.8.2
  • Browser: Chrome Version 100.0.4896.127 (Official Build) (x86_64)

What did you do?

Performed close() on a peer connection, from Chrome to pion, after sending a set of data over a data channel.

What did you expect?

No warning in the log.

What happened?

This line was seen on the pion side:

sctp WARNING: 2022/05/01 09:29:38 [0xc00016e000] unable to parse SCTP packet failed build Abort Chunk: BuildErrorCause does not handle: User Initiated Abort

I did not see this warning when the teardown was initiated by Firefox.

Current pion/sctp does not parse User Initiated Abort (cause code: 12). By parsing, we can retrieve "Upper Layer Abort Reason", which may help troubleshooting.

Related info:

@enobufs
Copy link
Member Author

enobufs commented May 1, 2022

@jeremija has already implemented this in #182. Let me follow up on the PR.

@enobufs
Copy link
Member Author

enobufs commented May 1, 2022

FYI: From my quick investigation, User-Initiated Abort Reason field Chrome sent contained "Close called".

   This error cause MAY be included in ABORT chunks that are sent
   because of an upper-layer request.  The upper layer can specify an
   Upper Layer Abort Reason that is transported by SCTP transparently
   and MAY be delivered to the upper-layer protocol at the peer.

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |         Cause Code=12         |      Cause Length=Variable    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       /                    Upper Layer Abort Reason                   /
       \                                                               \
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

@enobufs
Copy link
Member Author

enobufs commented May 11, 2022

Fixed by #183

@enobufs enobufs closed this as completed May 11, 2022
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

No branches or pull requests

1 participant