myzhan/boomer

fatal error: runtime: out of memory

daocoder2 opened this issue · 4 comments

Describe the bug
locust==1.2.3 & boomer==d09cf08

容器详情

CONTAINER ID        NAME            CPU %             MEM USAGE / LIMIT   MEM %            NET I/O             BLOCK I/O       PIDS
a6779f450529        armtant-rdg   5.16%               65.36MiB / 376.4GiB   0.02%               0B / 0B             86kB / 571MB        10

下面可能用到的应用层代码

/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:395

boomer.RecordFailure(common.ASE, "sen_avg_time", int64(0), err.Error())

崩溃堆栈如下

fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x80a0b8, 0x16)
	/usr/local/go/src/runtime/panic.go:1117 +0x72
runtime.sysMap(0xc004000000, 0xc004000000, 0xab1c50)
	/usr/local/go/src/runtime/mem_linux.go:169 +0xc6
runtime.(*mheap).sysAlloc(0xa982a0, 0xc000400000, 0x42d837, 0xa982a8)
	/usr/local/go/src/runtime/malloc.go:729 +0x1e5
runtime.(*mheap).grow(0xa982a0, 0x6000093, 0x0)
	/usr/local/go/src/runtime/mheap.go:1346 +0x85
runtime.(*mheap).allocSpan(0xa982a0, 0x6000093, 0x460100, 0xa982a0)
	/usr/local/go/src/runtime/mheap.go:1173 +0x609
runtime.(*mheap).alloc.func1()
	/usr/local/go/src/runtime/mheap.go:910 +0x59
runtime.systemstack(0x0)
	/usr/local/go/src/runtime/asm_amd64.s:379 +0x66
runtime.mstart()
	/usr/local/go/src/runtime/proc.go:1246

goroutine 156 [running]:
runtime.systemstack_switch()
	/usr/local/go/src/runtime/asm_amd64.s:339 fp=0xc000329b88 sp=0xc000329b80 pc=0x46dbc0
runtime.(*mheap).alloc(0xa982a0, 0x6000093, 0xc000a10001, 0x40ee2a)
	/usr/local/go/src/runtime/mheap.go:904 +0x85 fp=0xc000329bd8 sp=0xc000329b88 pc=0x4294e5
runtime.(*mcache).allocLarge(0x7f5017739768, 0xc000125c85, 0x790100, 0xc000a16240)
	/usr/local/go/src/runtime/mcache.go:224 +0x97 fp=0xc000329c30 sp=0xc000329bd8 pc=0x419b57
runtime.mallocgc(0xc000125c85, 0x0, 0x879f00, 0x7cf940)
	/usr/local/go/src/runtime/malloc.go:1078 +0x925 fp=0xc000329cb8 sp=0xc000329c30 pc=0x40f8e5
runtime.rawstring(0xc000125c85, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/runtime/string.go:263 +0x4f fp=0xc000329ce8 sp=0xc000329cb8 pc=0x4559af
runtime.rawstringtmp(0x0, 0xc000125c85, 0x407955, 0x43b69c, 0xc000329d50, 0x467860, 0xc0002cc180)
	/usr/local/go/src/runtime/string.go:131 +0x74 fp=0xc000329d28 sp=0xc000329ce8 pc=0x455374
runtime.concatstrings(0x0, 0xc000329e08, 0x3, 0x3, 0x0, 0x0)
	/usr/local/go/src/runtime/string.go:50 +0xc5 fp=0xc000329dc0 sp=0xc000329d28 pc=0x454dc5
runtime.concatstring3(0x0, 0xc00036ab60, 0x64, 0x879170, 0x1, 0x798340, 0xc000125c20, 0x0, 0x0)
	/usr/local/go/src/runtime/string.go:63 +0x47 fp=0xc000329e00 sp=0xc000329dc0 pc=0x4550c7
net.(*OpError).Error(0xc000978240, 0x9, 0x10)
	/usr/local/go/src/net/net.go:470 +0x273 fp=0xc000329e68 sp=0xc000329e00 pc=0x592e53
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:395 +0x134 fp=0xc000329f88 sp=0xc000329e68 pc=0x752834
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49 fp=0xc000329fa8 sp=0xc000329f88 pc=0x748449
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4 fp=0xc000329fd0 sp=0xc000329fa8 pc=0x74d774
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000329fd8 sp=0xc000329fd0 pc=0x46fa01
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 1 [select, 15 minutes]:
github.com/myzhan/boomer.Run(0xc000010588, 0x1, 0x1)
	/armyant/vendor/github.com/myzhan/boomer/boomer.go:260 +0x3a5
main.main()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:464 +0x390

goroutine 7 [IO wait, 15 minutes]:
internal/poll.runtime_pollWait(0x7f4fedc1b758, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000012998, 0x72, 0x0, 0x2, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000012980, 0xc0003fc6ca, 0x2, 0x2, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc000012980, 0xc0003fc6ca, 0x2, 0x2, 0x7f5017729a68, 0x18, 0xc0003d29d8)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000105b0, 0xc0003fc6ca, 0x2, 0x2, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
io.ReadAtLeast(0x880ea0, 0xc0000105b0, 0xc0003fc6ca, 0x2, 0x2, 0x2, 0x7f50175ac170, 0xc00011a358, 0x48)
	/usr/local/go/src/io/io.go:328 +0x87
io.ReadFull(...)
	/usr/local/go/src/io/io.go:347
github.com/zeromq/gomq/zmtp.(*Connection).readMultipart(0xc0000fddc0, 0xc0000e4fb8, 0xc0003d29d8, 0x1, 0x1, 0x0, 0x0)
	/armyant/vendor/github.com/zeromq/gomq/zmtp/conn.go:551 +0xfa
github.com/zeromq/gomq/zmtp.(*Connection).RecvMultipart.func1(0xc0000fddc0, 0xc00011a300)
	/armyant/vendor/github.com/zeromq/gomq/zmtp/conn.go:503 +0x45
created by github.com/zeromq/gomq/zmtp.(*Connection).RecvMultipart
	/armyant/vendor/github.com/zeromq/gomq/zmtp/conn.go:500 +0x49

goroutine 8 [select, 15 minutes]:
github.com/myzhan/boomer.(*gomqSocketClient).recv(0xc000296600)
	/armyant/vendor/github.com/myzhan/boomer/client_gomq.go:68 +0xba
created by github.com/myzhan/boomer.(*gomqSocketClient).connect
	/armyant/vendor/github.com/myzhan/boomer/client_gomq.go:49 +0x3d0

goroutine 9 [select]:
github.com/myzhan/boomer.(*gomqSocketClient).send(0xc000296600)
	/armyant/vendor/github.com/myzhan/boomer/client_gomq.go:103 +0x86
created by github.com/myzhan/boomer.(*gomqSocketClient).connect
	/armyant/vendor/github.com/myzhan/boomer/client_gomq.go:50 +0x3f5

goroutine 10 [select, 15 minutes]:
github.com/myzhan/boomer.(*slaveRunner).startListener.func1(0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:405 +0xc5
created by github.com/myzhan/boomer.(*slaveRunner).startListener
	/armyant/vendor/github.com/myzhan/boomer/runner.go:403 +0x3f

goroutine 11 [select]:
github.com/myzhan/boomer.(*requestStats).start.func1(0xc000118230)
	/armyant/vendor/github.com/myzhan/boomer/stats.go:139 +0x10d
created by github.com/myzhan/boomer.(*requestStats).start
	/armyant/vendor/github.com/myzhan/boomer/stats.go:136 +0x3f

goroutine 12 [select]:
github.com/myzhan/boomer.(*slaveRunner).run.func1(0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:440 +0xaa
created by github.com/myzhan/boomer.(*slaveRunner).run
	/armyant/vendor/github.com/myzhan/boomer/runner.go:438 +0x37f

goroutine 13 [select]:
github.com/myzhan/boomer.(*slaveRunner).run.func2(0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:459 +0xd0
created by github.com/myzhan/boomer.(*slaveRunner).run
	/armyant/vendor/github.com/myzhan/boomer/runner.go:456 +0x3a5

goroutine 18 [syscall, 15 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/go/src/runtime/sigqueue.go:168 +0xa5
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
	/usr/local/go/src/os/signal/signal.go:151 +0x45

goroutine 34 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1ae48, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00058ec98, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00058ec80, 0xc0002f2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc00058ec80, 0xc0002f2000, 0x1000, 0x1000, 0x4d190e, 0xc00029c02f, 0xc00017272b)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc00019a218, 0xc0002f2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0005ca8a0)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0005ca8a0, 0x2, 0xc000302300, 0xc00061b490, 0x46ace5, 0xc000302300, 0x200000003)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0005f4f20, 0x2, 0xc0000fe0c0, 0x0, 0xc00029c000, 0xc00061b590, 0x4c89b3)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0005f4f20, 0x0, 0x0, 0xa704e0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0005f4f20, 0x31, 0x0, 0x0, 0x31, 0xc000172680)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0005f4f20, 0xc000010018, 0x8105a2, 0x24, 0xc00061bca0, 0x2, 0x2)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012780, 0xa, 0x10, 0xc00002228a, 0x10, 0x0, 0x880c40, 0xc00071b7b0)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 36 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1b018, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00058ee98, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00058ee80, 0xc00027e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc00058ee80, 0xc00027e000, 0x1000, 0x1000, 0x4d190e, 0xc00029c02f, 0xc00017272b)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010378, 0xc00027e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0008fa480)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0008fa480, 0x2, 0xc000302780, 0xc0006c9490, 0x46ace5, 0xc000302780, 0x200000003)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0004c8c60, 0x2, 0xc0000fe0c0, 0x0, 0xc00029c000, 0xc0006c9590, 0x4c89b3)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0004c8c60, 0x0, 0x0, 0xa704e0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0004c8c60, 0x31, 0x0, 0x0, 0x31, 0xc000172680)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0004c8c60, 0xc000010018, 0x8105a2, 0x24, 0xc0006c9ca0, 0x2, 0x2)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012700, 0xa, 0x10, 0xc00002224a, 0x10, 0x0, 0x880c40, 0xc00071bba0)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 20 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1b2d0, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00058ea98, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00058ea80, 0xc0003c6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc00058ea80, 0xc0003c6000, 0x1000, 0x1000, 0x2, 0x15, 0x88be68)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000736030, 0xc0003c6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0005c9140)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0005c9140, 0x2, 0xc000a4d4c0, 0x88be68, 0xc0004140b8, 0x798340, 0xc0009362ea)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc000930420, 0x2, 0xc000a4d500, 0x4fb8da, 0xc0002fa7b8, 0xa, 0x0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc000930420, 0x4fae5a, 0xc0002fa790, 0x77b6a0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc000930420, 0xc000a4d658, 0x467fa0, 0xc000a4d6a0, 0xc000a4d6a8, 0x43687b)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc000930420, 0x820e80, 0xc000012700, 0xa, 0x10, 0xc00062b800, 0xc00062b7a0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012700, 0xa, 0x10, 0xc00002224a, 0x10, 0x0, 0x880c40, 0xc00039deb0)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 85 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1af30, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc0006de198, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0006de180, 0xc000204000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc0006de180, 0xc000204000, 0x1000, 0x1000, 0x4d190e, 0xc00029c02f, 0xc00017272b)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010008, 0xc000204000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0006b8d20)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0006b8d20, 0x2, 0xc000182900, 0xc000619490, 0x46ace5, 0xc000182900, 0x200000003)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0004c8000, 0x2, 0xc0000fe0c0, 0x0, 0xc00029c000, 0xc000619590, 0x4c89b3)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0004c8000, 0x0, 0x0, 0xa704e0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0004c8000, 0x31, 0x0, 0x0, 0x31, 0xc000172680)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0004c8000, 0xc000010018, 0x8105a2, 0x24, 0xc000619ca0, 0x2, 0x2)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc00017e400, 0x14, 0x20, 0xc0000221ca, 0x10, 0x0, 0x880c40, 0xc0000f9d00)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 164 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1b588, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00058e918, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00058e900, 0xc0002a6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc00058e900, 0xc0002a6000, 0x1000, 0x1000, 0x4d190e, 0xc00029c02f, 0xc00017272b)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc00019a1e8, 0xc0002a6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0007204e0)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0007204e0, 0x2, 0xc000182c00, 0xc0006d9490, 0x46ace5, 0xc000182c00, 0x200000003)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0005f49a0, 0x2, 0xc0000fe0c0, 0x0, 0xc00029c000, 0xc0006d9590, 0x4c89b3)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0005f49a0, 0x0, 0x0, 0xa704e0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0005f49a0, 0x31, 0x0, 0x0, 0x31, 0xc000172680)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0005f49a0, 0xc000010018, 0x8105a2, 0x24, 0xc0006d9ca0, 0x2, 0x2)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc00017e400, 0x14, 0x20, 0xc0000221ca, 0x10, 0x0, 0x880c40, 0xc00071a730)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 123 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1b3b8, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00040e898, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00040e880, 0xc000606000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc00040e880, 0xc000606000, 0x1000, 0x1000, 0x2, 0x15, 0x88be68)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0003d8000, 0xc000606000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0006ae840)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0006ae840, 0x2, 0xc0009034c0, 0x88be68, 0xc000736058, 0x798340, 0xc000604182)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc000620000, 0x2, 0xc000903500, 0x4fb8da, 0xc0003b64f8, 0xa, 0x0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc000620000, 0x4fae5a, 0xc0003b64d0, 0x0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc000620000, 0xc000903658, 0x467fa0, 0xc0009036a0, 0xc0009036a8, 0x43687b)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc000620000, 0x820e80, 0xc000012780, 0xa, 0x10, 0xc0003b2a50, 0xc0003b29c0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012780, 0xa, 0x10, 0xc00002228a, 0x10, 0x0, 0x880c40, 0xc00036db40)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 104 [runnable]:
internal/poll.runtime_pollWait(0x7f4fedc1ad60, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000634398, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000634380, 0xc0007aa000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc000634380, 0xc0007aa000, 0x1000, 0x1000, 0x2, 0x15, 0x88be68)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0007a6000, 0xc0007aa000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc000296120)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc000296120, 0x2, 0xc0008fd4c0, 0x88be68, 0xc000414010, 0x798340, 0xc00093601a)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0007ac000, 0x2, 0xc0008fd500, 0x4fb8da, 0xc0001485a8, 0xa, 0x0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0007ac000, 0x4fae5a, 0xc000148580, 0x77b6a0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0007ac000, 0xc0008fd658, 0x467fa0, 0xc0008fd6a0, 0xc0008fd6a8, 0x43687b)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0007ac000, 0x820e80, 0xc000012780, 0xa, 0x10, 0xc0004000c0, 0xc0005fe090)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012780, 0xa, 0x10, 0xc00002228a, 0x10, 0x0, 0x880e60, 0xc0008ace60)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 160 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1b1e8, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00058e698, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00058e680, 0xc0001fc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc00058e680, 0xc0001fc000, 0x1000, 0x1000, 0x4d190e, 0xc00029c02f, 0xc00017272b)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc00019a1b8, 0xc0001fc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc0008a8d20)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc0008a8d20, 0x2, 0xc000378a80, 0xc000901490, 0x46ace5, 0xc000378a80, 0x200000003)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0005f4580, 0x2, 0xc0000fe0c0, 0x0, 0xc00029c000, 0xc000901590, 0x4c89b3)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0005f4580, 0x0, 0x0, 0xa704e0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0005f4580, 0x31, 0x0, 0x0, 0x31, 0xc000172680)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0005f4580, 0xc000010018, 0x8105a2, 0x24, 0xc000901ca0, 0x2, 0x2)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012600, 0xa, 0x10, 0xc00002210a, 0x10, 0x0, 0x880c40, 0xc000407e10)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 92 [IO wait]:
internal/poll.runtime_pollWait(0x7f4fedc1b670, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc0006de598, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0006de580, 0xc000256000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc0006de580, 0xc000256000, 0x1000, 0x1000, 0x4d190e, 0xc00029c02f, 0xc00017272b)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000100f8, 0xc000256000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
bufio.(*Reader).fill(0xc000622f00)
	/usr/local/go/src/bufio/bufio.go:101 +0x108
bufio.(*Reader).Peek(0xc000622f00, 0x2, 0xc000378d80, 0xc000a4b490, 0x46ace5, 0xc000378d80, 0x200000003)
	/usr/local/go/src/bufio/bufio.go:139 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0004c8420, 0x2, 0xc0000fe0c0, 0x0, 0xc00029c000, 0xc000a4b590, 0x4c89b3)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:370 +0x46
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0004c8420, 0x0, 0x0, 0xa704e0)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0004c8420, 0x31, 0x0, 0x0, 0x31, 0xc000172680)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:980 +0x8f
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0004c8420, 0xc000010018, 0x8105a2, 0x24, 0xc000a4bca0, 0x2, 0x2)
	/armyant/vendor/github.com/gorilla/websocket/conn.go:1064 +0x2f
main.bus(0xc000012480, 0x9, 0x10, 0xc00002214a, 0x10, 0x0, 0x880c40, 0xc000316e00)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:237 +0xaae
main.busWork()
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:386 +0xe5
github.com/myzhan/boomer.(*runner).safeRun(0xc0002c8000, 0x820e88)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:65 +0x49
github.com/myzhan/boomer.(*runner).spawnWorkers.func1(0xc0002604e0, 0xc0002c8000)
	/armyant/vendor/github.com/myzhan/boomer/runner.go:147 +0xb4
created by github.com/myzhan/boomer.(*runner).spawnWorkers
	/armyant/vendor/github.com/myzhan/boomer/runner.go:133 +0x156

goroutine 169500 [sleep]:
time.Sleep(0x186a0)
	/usr/local/go/src/runtime/time.go:193 +0xd2
main.bus.func1(0xc000012780, 0xa, 0x10, 0xc0004000c0, 0xc0005fe090, 0xc000400150, 0xc0007ac000, 0xc00021d910, 0xc000a22060, 0xc000a22078, ...)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:220 +0x2f1
created by main.bus
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:120 +0x9d1

goroutine 169470 [sleep]:
time.Sleep(0x186a0)
	/usr/local/go/src/runtime/time.go:193 +0xd2
main.bus.func1(0xc000012780, 0xa, 0x10, 0xc0003b2a50, 0xc0003b29c0, 0xc0003b2ae0, 0xc000620000, 0xc00036db50, 0xc0003ca8e8, 0xc0003ca900, ...)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:220 +0x2f1
created by main.bus
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:120 +0x9d1

goroutine 169499 [sleep]:
time.Sleep(0x186a0)
	/usr/local/go/src/runtime/time.go:193 +0xd2
main.bus.func1(0xc000012700, 0xa, 0x10, 0xc00062b800, 0xc00062b7a0, 0xc00062b890, 0xc000930420, 0xc00039dec0, 0xc000628bd0, 0xc000628be8, ...)
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:220 +0x2f1
created by main.bus
	/armyant/business/ase/s045aae0b_ws_cnja_trans/cnja.go:120 +0x9d1

可能是压测代码有 BUG,生成 error 的速度太快了。

确实error生成速度较多,因为应用有问题,疯狂报错。 框架代码层面大概是哪里问题导致这个呢?

按照常见的 golang 程序内存泄漏方法分析一下吧,框架层不涉及大量的内存分配。

好的,这个就比较奇怪,因为看了容器mem差不多也就100M浮动就崩了。