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

[SCTP] Fixed a crash on SIGPIPE (#2734) #2757

Merged
merged 1 commit into from
Nov 28, 2023
Merged

[SCTP] Fixed a crash on SIGPIPE (#2734) #2757

merged 1 commit into from
Nov 28, 2023

Conversation

acetcom
Copy link
Member

@acetcom acetcom commented Nov 28, 2023

If EPOLLIN, EPOLLOUT, and EPOLLRDHUP occur at the same time, Linux generates a SIGPIPE signal as below.

11/13 16:55:43.340: [core] INFO: after eopll_process , num_of_poll is 1 (../lib/core/ogs-epoll.c:215)
11/13 16:55:43.340: [core] INFO: received: 2005 (../lib/core/ogs-epoll.c:230)
11/13 16:55:43.340: [core] INFO: EPOLLIN event occurred (../lib/core/ogs-epoll.
11/13 16:55:43.340: [core] INFO: EPOLLOUT event occurred (../lib/core/ogs-epoll.c:259)
11/13 16:55:43.340: [core] INFO: EPOLLRDHUP event occurred (../lib/core/ogs-epoll.c:263)
11/13 16:55:43.340: [amf] DEBUG: SCTP_SHUTDOWN_EVENT:[T:32773, F:0x0, L:12] (../src/amf/ngap-sctp.c:191)
11/13 16:55:43.340: [amf] INFO: ogs_queue_push amf_sctp_event_push (../src/amf/event.c:104)

I've made modifications so that when EPOLLRDHUP occurs, only OGS_POLLIN is set and OGS_POLLOUT is unset to prevent SIGPIPE from occurring in such cases.

Thanks a lot!
Sukchan

@acetcom acetcom merged commit 4739198 into main Nov 28, 2023
4 checks passed
@acetcom acetcom deleted the issues2734 branch November 28, 2023 07:10
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.

None yet

1 participant