Skip to content

Huge number of SIGURG eating up the CPU #68462

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

Closed
ttc0419 opened this issue Jul 16, 2024 · 4 comments
Closed

Huge number of SIGURG eating up the CPU #68462

ttc0419 opened this issue Jul 16, 2024 · 4 comments

Comments

@ttc0419
Copy link

ttc0419 commented Jul 16, 2024

Go version

go version go1.21.6 linux/amd64

Output of go env in your module/workspace:

default

What did you do?

strace the thread with high CPU usage
same program in #68414, but closed without any further response.

What did you see happen?

--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44458944
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44457664
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824647875376
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 140016272782680
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824647875328
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824647875376
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44458944
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44458944
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824647875376
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44458432
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824647875328
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824647875328
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44458944
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44458432
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44457664
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 76824920
futex(0x4944158, FUTEX_WAKE_PRIVATE, 1) = 1
accept4(13, {sa_family=AF_INET6, sin6_port=htons(52040), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.88.4.4", &sin6_addr), sin6_scope_id=0}, [112->28], SOCK_CLOEXEC|SOCK_NONBLOCK) = 29
epoll_ctl(4, EPOLL_CTL_ADD, 29, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2868905599, u64=9176106624710870655}}) = 0
getsockname(29, {sa_family=AF_INET6, sin6_port=htons(8080), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.88.8.60", &sin6_addr), sin6_scope_id=0}, [112->28]) = 0
setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(29, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(29, SOL_TCP, TCP_KEEPINTVL, [15], 4) = 0
setsockopt(29, SOL_TCP, TCP_KEEPIDLE, [15], 4) = 0
accept4(13, {sa_family=AF_INET6, sin6_port=htons(52042), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.88.4.4", &sin6_addr), sin6_scope_id=0}, [112->28], SOCK_CLOEXEC|SOCK_NONBLOCK) = 30
epoll_ctl(4, EPOLL_CTL_ADD, 30, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=91226359, u64=9176106458724434167}}) = 0
getsockname(30, {sa_family=AF_INET6, sin6_port=htons(8080), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:10.88.8.60", &sin6_addr), sin6_scope_id=0}, [112->28]) = 0
setsockopt(30, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(30, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(30, SOL_TCP, TCP_KEEPINTVL, [15], 4) = 0
setsockopt(30, SOL_TCP, TCP_KEEPIDLE, [15], 4) = 0
accept4(13, 0xc0006e17e0, [112], SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
read(30, "GET /status HTTP/1.1\r\nHo", 24) = 24
read(30, "st: 10.88.8.60:8080\r\nUser-Agent:"..., 4094) = 85
write(30, "HTTP/1.1 200 OK\r\nVary: Origin\r\nD"..., 151) = 151
epoll_ctl(4, EPOLL_CTL_DEL, 30, 0xc0007ff93c) = 0
close(30)                               = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
read(29, "GET /status HTTP/1.1\r\nHo", 24) = 24
read(29, "st: 10.88.8.60:8080\r\nUser-Agent:"..., 4094) = 85
write(29, "HTTP/1.1 200 OK\r\nVary: Origin\r\nD"..., 151) = 151
epoll_ctl(4, EPOLL_CTL_DEL, 29, 0xc0007ff93c) = 0
close(29)                               = 0
epoll_pwait(4, [], 128, 0, NULL, 0)     = 0
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 1
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44457664
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 44457664
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824633982976
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 0
read(42, "\27\3\3\0\35\37g\2013Q\201V\374\321\364\202\337.\336\301\364P@[\264\365\207\31\\\213\22\272"..., 2688) = 34
read(42, 0xc000c14a80, 2688)            = -1 EAGAIN (Resource temporarily unavailable)
--- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=1, si_uid=0} ---
rt_sigreturn({mask=[]})                 = 824678144192

What did you expect to see?

less signals wasting CPU time?

@gabyhelp
Copy link

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@seankhliao
Copy link
Member

see #37942, I don't see anything about CPU time here

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
@ttc0419
Copy link
Author

ttc0419 commented Jul 16, 2024

@seankhliao Please do not close the issue without any confirmation. If you need proof of something, ask and wait at least for some time and then close it. Anyway, here is your proof:

cut.mp4

@seankhliao
Copy link
Member

as indicated by the other issue, sigurg is used by the runtime internally for preemption, if your application is stuck it is unlikely to be the cause, only a symptom.

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

3 participants