wangyu- / tinyfecVPN

A VPN Designed for Lossy Links, with Build-in Forward Error Correction(FEC) Support. Improves your Network Quality on a High-latency Lossy Link.
MIT License
2.28k stars 456 forks source link

Tinyfecvpn x86 client CPU 占用100% #90

Open garyxi008 opened 4 years ago

garyxi008 commented 4 years ago

环境: Windows 10 64bit+ Virtual Box v6.0.14 +Openwrt (intel 32bit)--v18.06.5 Tinyfec版本:intel 32位版本,git version: 79d5e4dee8 build date: Aug 20 2018 12:20:44 使用top发现 tinyfecvpn cpu占用100%,cpu占用和流量关系不大,静默40-50kbps或看测速iperf3跑满时,cpu都是100%。 CPU: 62% usr 37% sys 0% nic 0% idle 0% io 0% irq 0% sirq Load average: 1.02 1.01 1.00 2/49 4033 PID PPID USER STAT VSZ %VSZ %CPU COMMAND 1755 1 root R 18092 7% 100% /usr/tinyfecvpn/tinyvpn_x86 -c -r serverip:serverport -f 10:10 --sub-net 10.222.20.0 --tun-dev tun100 --keep-reconnect -k password

使用strace -p tinyfecPID ,日志如下, 不停的访问/etc/localtime, 从ubuntu复制了zoneinfo文件夹至 openwrt的/usr/share目录下,并将Shanghai链接到/etc/localtime ls -ali localtime, 重启后,tinyfec仍占用CPU 100%, openwrt WEB页面时区也设置成了上海。 142 lrwxrwxrwx 1 root root 33 Dec 9 19:23 localtime -> /usr/share/zoneinfo/Asia/Shanghai

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=3614188}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=3742794}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=4561055}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=4687123}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=5491653}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=5614414}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=6370095}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=6493283}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=7232297}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=7355754}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=8047434}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=8170207}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=8874063}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=8996961}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=9666432}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=9898250}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=10618593}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=10762934}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=11432130}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=11554750}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=528, ...}) = 0 write(1, "\33[32m[2019-12-24 14:31:22][INFO]"..., 56) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1755, si_uid=0} --- sigreturn({mask=[]}) = -1 EPIPE (Broken pipe) clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=12258771}) = 0 epoll_wait(3, [], 64, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=66583, tv_nsec=12381448}) = 0 time([1577169082 / 2019-12-24T14:31:22+0800 /]) = 1577169082 (2019-12-24T14:31:22+0800) stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_s

For English speaking user: https://github.com/wangyu-/UDPspeeder/wiki/Issue-Guide

中文用户请看: https://github.com/wangyu-/UDPspeeder/wiki/发Issue前请看 (否则Issue可能被忽略,或被直接关掉)

wangyu- commented 3 weeks ago

maybe see https://github.com/wangyu-/tinyfecVPN/issues/99