版本 2.4
pselect6(0,NULL,NULL,NULL,{tv_sec=0,tv_nsec=100000000},NULL) = 0(超时)
使用 strace 不断重复。仅启用一个 httpd 进程。
答案1
我有同样的问题。这是我的日志
netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 729/systemd-resolve
tcp 0 0 0.0.0.0:22825 0.0.0.0:* LISTEN 2728/php
tcp 0 0 0.0.0.0:23004 0.0.0.0:* LISTEN 2752/php
tcp 0 0 0.0.0.0:22928 0.0.0.0:* LISTEN 2742/php
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1072/sshd: /usr/sbi
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 971/mysqld
tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN 971/mysqld
tcp6 0 0 :::9100 :::* LISTEN 1074312/node_export
tcp6 71 0 :::80 :::* LISTEN 2207/apache2
tcp6 0 0 :::22 :::* LISTEN 1072/sshd: /usr/sbi
tcp6 512 0 :::443 :::* LISTEN 2207/apache2
udp 0 0 127.0.0.53:53 0.0.0.0:* 729/systemd-resolve
udp 0 0 0.0.0.0:500 0.0.0.0:* 1073/charon
udp 0 0 0.0.0.0:4500 0.0.0.0:* 1073/charon
udp6 0 0 :::500 :::* 1073/charon
udp6 0 0 :::4500 :::* 1073/charon
Apache2 卡住并且仅在 ipv6 tcp 上监听。
这是堆栈跟踪。
2207 pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
2207 wait4(-1, 0x7ffedc77b084, WNOHANG|WSTOPPED, NULL) = 0
2207 times({tms_utime=3026 /* 30.26 s */, tms_stime=6010 /* 60.10 s */, tms_cutime=369020 /* 3690.20 s */, tms_cstime=174724 /* 1747.24 s */}) = 1819843847
2207 pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
2207 wait4(-1, 0x7ffedc77b084, WNOHANG|WSTOPPED, NULL) = 0
2207 times({tms_utime=3026 /* 30.26 s */, tms_stime=6010 /* 60.10 s */, tms_cutime=369020 /* 3690.20 s */, tms_cstime=174724 /* 1747.24 s */}) = 1819843947
2207 pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 0 (Timeout)
2207 wait4(-1, 0x7ffedc77b084, WNOHANG|WSTOPPED, NULL) = 0
2207 times({tms_utime=3026 /* 30.26 s */, tms_stime=6010 /* 60.10 s */, tms_cutime=369020 /* 3690.20 s */, tms_cstime=174724 /* 1747.24 s */}) = 1819844047
2207 pselect6(0, NULL, NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL^C