-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
golang 1.14 related problem(mipsle crash, 100% cpu) #771
Comments
是的,golang1.14得timer行为有问题 |
0322在服务器(linux64)和本地(darwin)之间开了一个连接,挂了一晚上没出现0321的CPU100%情况 |
还是不行: USAGE: VERSION: COMMANDS: GLOBAL OPTIONS: goroutine 6 [running]: goroutine 1 [runnable]: goroutine 7 [runnable]: goroutine 8 [runnable]: |
@wangvisual 你的这个问题,可否查下dmesg,或者syslog有没有异常,虽然这是 golang的bug,但errno == -89,这个不知道是啥 |
EDESTADDRREQ 89 Destination address required |
log里没有可疑的信息。 |
On MIPS, pipe returns two values rather than taking a pointer. On MIPS64, call pipe2 rather than pipe. Also, use the correct system call number for fcntl on mips64. Change-Id: Ie72acdefeb593f44cb98735fc40eac99cf73509e Reviewed-on: https://go-review.googlesource.com/c/go/+/202417 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1.14 has one additional call nonblockingPipe() within netpollinit() compare with 1.13, the pipe() definition for mipsle was not verified. |
golang officially confirmed that issue, but there're still some problem with timer on amd64... some time timer hangs. |
@xtaci 试了20200322的版本,服务端还是会出现CPU占用99.9的情况,只是比20200321版本运行的时间长了,从早上9到21点。 |
golang/go#38023 |
@wangvisual can you help run this build, with patch from golang/go#37997 |
@xtaci CPU 100%的问题没有了,但是发现客户端内存好像有泄露问题 从昨天21点运行到早上8点,内存占用了80%左右 用的是TCP模式,同机子另外以UDP模式运行的客户端则没有这个问题 |
@xtaci 从昨晚到现在一切正常,没出现CPU满载的情况 |
TCP模式没有经过特别的优化,可能会有较大的内存消耗,空了再做优化。其他没问题就好,你可以尝试启动的时候加入 GOGC=10 ./client_xxx 这样启动。 |
golang可能会在下一个小版本修复此问题。golang/go#38023 |
@xtaci 用sh脚本套娃好了😂 |
|
nohup env GOGC=10 ... |
感谢! |
v20200409的docker版本服务端在运行一段时间之后依旧有卡死的问题(看服务端的日志:网络没问题,服务端无法收到任何packet) |
@qx-juilliard docker版本可能没有更新golang版本, 我更新了一下Dockerfile,可以pull latest试试 |
tcp模式确实存在内存泄漏问题,附图是client进程的内存消耗,准备试试GOGC |
目前只有20200226版本好一点,之后的版本基本1天内存就爆了(VPS 512M),我现在服务器和客户端都换成0226版本了😂 |
CPU usage is also high on Raspberry Pi 2. |
20200201 version works, but for version 20200226 && 20200321, the --help may even crashes, but not always, when it crash, the log shows:
root@localhost:/opt/bin/a# ./client_linux_mipsle.0321 --help
runtime: pipe failed with -89
fatal error: runtime: pipe failed
goroutine 6 [running]:
runtime.throw(0x40afb2, 0x14)
/usr/local/go/src/runtime/panic.go:1114 +0x60 fp=0xc285e8 sp=0xc285d4 pc=0x4cd0c
runtime.netpollinit()
/usr/local/go/src/runtime/netpoll_epoll.go:40 +0x20c fp=0xc28620 sp=0xc285e8 pc=0x489a0
runtime.netpollGenericInit()
/usr/local/go/src/runtime/netpoll.go:112 +0xa0 fp=0xc28628 sp=0xc28620 pc=0x46cf4
runtime.doaddtimer(0xc1e000, 0xc3e444)
/usr/local/go/src/runtime/time.go:271 +0x1e8 fp=0xc28654 sp=0xc28628 pc=0x756a0
runtime.addInitializedTimer(0xc3e444)
/usr/local/go/src/runtime/time.go:258 +0x8c fp=0xc28670 sp=0xc28654 pc=0x75480
runtime.addtimer(0xc3e444)
/usr/local/go/src/runtime/time.go:248 +0x88 fp=0xc2867c sp=0xc28670 pc=0x753c4
time.startTimer(0xc3e444)
/usr/local/go/src/runtime/time.go:207 +0x3c fp=0xc28684 sp=0xc2867c pc=0x751c4
time.NewTimer(0x0, 0x0, 0x0)
/usr/local/go/src/time/sleep.go:93 +0xf8 fp=0xc286a8 sp=0xc28684 pc=0xead00
github.com/xtaci/kcp-go/v5.(*TimedSched).sched(0xc48060)
/home/xtaci/go/pkg/mod/github.com/xtaci/kcp-go/[email protected]/timedsched.go:64 +0x5c fp=0xc287e4 sp=0xc286a8 pc=0x225e50
runtime.goexit()
/usr/local/go/src/runtime/asm_mipsx.s:651 +0x4 fp=0xc287e4 sp=0xc287e4 pc=0x87d64
created by github.com/xtaci/kcp-go/v5.NewTimedSched
/home/xtaci/go/pkg/mod/github.com/xtaci/kcp-go/[email protected]/timedsched.go:56 +0x118
goroutine 1 [runnable, locked to thread]:
text/template/parse.init()
/usr/local/go/src/text/template/parse/lex.go:75
goroutine 7 [runnable]:
github.com/xtaci/kcp-go/v5.(*TimedSched).prepend(0xc48060)
/home/xtaci/go/pkg/mod/github.com/xtaci/kcp-go/[email protected]/timedsched.go:93
created by github.com/xtaci/kcp-go/v5.NewTimedSched
/home/xtaci/go/pkg/mod/github.com/xtaci/kcp-go/[email protected]/timedsched.go:58 +0x154
system type : Broadcom BCM4716 chip rev 1 pkg 10
processor : 0
cpu model : MIPS 74K V4.0
BogoMIPS : 239.20
cpu MHz : 480
wait instruction : no
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : no
hardware watchpoint : yes
ASEs implemented : mips16 dsp
shadow register sets : 1
VCED exceptions : not available
VCEI exceptions : not available
Linux localhost 2.6.22.19 #20 Fri May 5 00:20:55 CEST 2017 mips GNU/Linux
The text was updated successfully, but these errors were encountered: