cbeuw / GoQuiet

A Shadowsocks obfuscation plugin utilising domain fronting to evade deep packet inspection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

client out of memory with ss-redir

zmz125000 opened this issue · comments

ss-local + gq-client work fine on R7000 router,
ss-redir works fine,
ss-redir + gq-client OOM and crash at light network load (almost the same RAM usage with ss-local)

gq-client-linux-arm-1.2.2 (plugin mode)
shadowsocks-libev 3.2.0
Asuswrt-Merlin firmware

Mem: 86740K used, 168976K free, 2460K shrd, 1552K buff, 21676K cached
ss-redir + gq-client use about 10MB RAM

{
    "ServerName":"www.bing.com",
    "Key":"",
    "TicketTimeHint":3600,
    "Browser":"chrome"
}
 2018-10-18 03:48:34 INFO: plugin "gq-client" enabled
 2018-10-18 03:48:34 INFO: initializing ciphers... chacha20-ietf-poly1305
 2018-10-18 03:48:34 INFO: This system doesn't provide enough entropy to quickly generate high-quality random numbers.
Installing the rng-utils/rng-tools, jitterentropy or haveged packages may help.
On virtualized Linux environments, also consider using virtio-rng.
The service will not start until enough entropy has been collected.

 2018-10-18 03:48:34 INFO: listening at 0.0.0.0:7777
 2018-10-18 03:48:34 INFO: UDP relay enabled
 2018-10-18 03:48:35 INFO: running from root user
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x158579, 0x16)
/usr/local/go/src/runtime/panic.go:608 +0x5c
runtime.sysMap(0xc00000, 0x400000, 0x255e58)
/usr/local/go/src/runtime/mem_linux.go:156 +0xac
runtime.(*linearAlloc).alloc(0x24a744, 0x400000, 0x400000, 0x255e58, 0x0)
/usr/local/go/src/runtime/malloc.go:1230 +0x94
runtime.(*mheap).sysAlloc(0x249c80, 0x400000, 0x0, 0x322dc)
/usr/local/go/src/runtime/malloc.go:525 +0x54
runtime.(*mheap).grow(0x249c80, 0x5, 0x0)
/usr/local/go/src/runtime/mheap.go:920 +0x2c
runtime.(*mheap).allocSpanLocked(0x249c80, 0x5, 0x255e68, 0x0)
/usr/local/go/src/runtime/mheap.go:848 +0x320
runtime.(*mheap).alloc_m(0x249c80, 0x5, 0x7b, 0x0)
/usr/local/go/src/runtime/mheap.go:692 +0x118
runtime.(*mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:759 +0x3c
runtime.(*mheap).alloc(0x249c80, 0x5, 0x1007b, 0x0)
/usr/local/go/src/runtime/mheap.go:758 +0x60
runtime.(*mcentral).grow(0x24c610, 0x0)
/usr/local/go/src/runtime/mcentral.go:232 +0x94
runtime.(*mcentral).cacheSpan(0x24c610, 0x246d20)
/usr/local/go/src/runtime/mcentral.go:106 +0x34c
runtime.(*mcache).refill(0x40098000, 0x11277b)
/usr/local/go/src/runtime/mcache.go:122 +0x7c
runtime.(*mcache).nextFree.func1()
/usr/local/go/src/runtime/malloc.go:749 +0x24
runtime.systemstack(0x643c0)
/usr/local/go/src/runtime/asm_arm.s:354 +0x84
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1229

goroutine 1231 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_arm.s:298 +0x4 fp=0xb50f0c sp=0xb50f08 pc=0x644c8
runtime.(*mcache).nextFree(0x40098000, 0x7b, 0x0, 0x0, 0x0)
/usr/local/go/src/runtime/malloc.go:748 +0xa4 fp=0xb50f38 sp=0xb50f0c pc=0x19e64
runtime.mallocgc(0x5000, 0x136b18, 0x1, 0x0)
/usr/local/go/src/runtime/malloc.go:903 +0x768 fp=0xb50fa0 sp=0xb50f38 pc=0x1a784
runtime.makeslice(0x136b18, 0x5000, 0x5000, 0x0, 0x0, 0x0)
/usr/local/go/src/runtime/slice.go:70 +0x68 fp=0xb50fb4 sp=0xb50fa0 pc=0x4f69c
main.(*pair).remoteToSS(0x743e80)
/home/andy/go/src/github.com/cbeuw/GoQuiet/cmd/gq-client/gq-client.go:39 +0x28 fp=0xb50fe4 sp=0xb50fb4 pc=0x111dc4
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:867 +0x4 fp=0xb50fe4 sp=0xb50fe4 pc=0x66210
created by main.initSequence
/home/andy/go/src/github.com/cbeuw/GoQuiet/cmd/gq-client/gq-client.go:131 +0x5d0

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x502e9fc0, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x44
internal/poll.(*pollDesc).wait(0x4840b4, 0x72, 0x440300, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x7c
internal/poll.(*pollDesc).waitRead(0x4840b4, 0xffffff00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x2c
internal/poll.(*FD).Accept(0x4840a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:384 +0x17c
net.(*netFD).accept(0x4840a0, 0x452ce8, 0x42cf8, 0x112d00)
/usr/local/go/src/net/fd_unix.go:238 +0x20
net.(*TCPListener).accept(0x40c278, 0x494f14, 0x494f18, 0xc)
/usr/local/go/src/net/tcpsock_posix.go:139 +0x20
net.(*TCPListener).Accept(0x40c278, 0x15e61c, 0x178f60, 0x452ce8, 0x484050)
/usr/local/go/src/net/tcpsock.go:260 +0x3c
main.main()
/home/andy/go/src/github.com/cbeuw/GoQuiet/cmd/gq-client/gq-client.go:214 +0x3f4

goroutine 132 [IO wait]:
internal/poll.runtime_pollWait(0x502e9140, 0x72, 0x8e774)
/usr/local/go/src/runtime/netpoll.go:173 +0x44
internal/poll.(*pollDesc).wait(0x4850a4, 0x72, 0xffffff00, 0x1788a0, 0x230048)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x7c
internal/poll.(*pollDesc).waitRead(0x4850a4, 0x5ad800, 0x2800, 0x2800)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x2c
internal/poll.(*FD).Read(0x485090, 0x5ad800, 0x2800, 0x2800, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:169 +0x14c
net.(*netFD).Read(0x485090, 0x5ad800, 0x2800, 0x2800, 0x1ff, 0x1, 0x177)
/usr/local/go/src/net/fd_unix.go:202 +0x38
net.(*conn).Read(0x40c848, 0x5ad800, 0x2800, 0x2800, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:177 +0x58
io.ReadAtLeast(0x502ea070, 0x40c848, 0x5ad800, 0x2800, 0x2800, 0x1, 0x0, 0x380, 0x0)
/usr/local/go/src/io/io.go:310 +0x6c
main.(*pair).ssToRemote(0x44eb40)
/home/andy/go/src/github.com/cbeuw/GoQuiet/cmd/gq-client/gq-client.go:58 +0x94
created by main.initSequence
/home/andy/go/src/github.com/cbeuw/GoQuiet/cmd/gq-client/gq-client.go:132 +0x5ec

goroutine *** [IO wait]:
.
.
.
.
.

 2018-10-18 03:48:57 ERROR: remote recv: Connection reset by peer
 2018-10-18 03:48:57 ERROR: remote recv: Connection reset by peer
 2018-10-18 03:48:57 ERROR: plugin service exit unexpectedly
 2018-10-18 03:48:57 ERROR: getpeername: Transport endpoint is not connected
 2018-10-18 03:48:57 ERROR: getpeername: Transport endpoint is not connected