DNSCrypt / dnscrypt-proxy

dnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.
https://dnscrypt.info
ISC License
11.45k stars 1.01k forks source link

Not worked for ASUS AC-66U #665

Closed zw963 closed 5 years ago

zw963 commented 5 years ago

Following is info:

Linux RT-AC66U-F2F0 2.6.22.19 #1 Sun Apr 8 14:05:29 EDT 2018 mips ASUSWRT-Merlin

When run with mips:

admin@RT-AC66U-F2F0:/tmp/home/root# ./dnscrypt-proxy 
./dnscrypt-proxy: line 1: syntax error: unexpected "("

When run with mipsle:

admin@RT-AC66U-F2F0:/tmp/home/root# ./dnscrypt-proxy 
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x55286e, 0x16)
        /home/travis/.gimme/versions/go/src/runtime/panic.go:608 +0x60 fp=0x7f986aa8 sp=0x7f986a94 pc=0x43428
runtime.sysMap(0xc00000, 0x400000, 0x90c4b8)
        /home/travis/.gimme/versions/go/src/runtime/mem_linux.go:165 +0xf0 fp=0x7f986acc sp=0x7f986aa8 pc=0x29738
runtime.(*linearAlloc).alloc(0x9004d0, 0x400000, 0x400000, 0x90c4b8, 0x0)
        /home/travis/.gimme/versions/go/src/runtime/malloc.go:1251 +0xd0 fp=0x7f986ae4 sp=0x7f986acc pc=0x1d360
runtime.(*mheap).sysAlloc(0x900200, 0x2000, 0x90ac20, 0x39d94)
        /home/travis/.gimme/versions/go/src/runtime/malloc.go:523 +0x78 fp=0x7f986b30 sp=0x7f986ae4 pc=0x1b0fc
runtime.(*mheap).grow(0x900200, 0x1, 0x0)
        /home/travis/.gimme/versions/go/src/runtime/mheap.go:1094 +0x4c fp=0x7f986b60 sp=0x7f986b30 pc=0x3a664
runtime.(*mheap).allocSpanLocked(0x900200, 0x1, 0x90c4c8, 0x0)
        /home/travis/.gimme/versions/go/src/runtime/mheap.go:1018 +0x468 fp=0x7f986b84 sp=0x7f986b60 pc=0x3a518
runtime.(*mheap).alloc_m(0x900200, 0x1, 0x1e, 0x373d0)
        /home/travis/.gimme/versions/go/src/runtime/mheap.go:860 +0xfc fp=0x7f986bac sp=0x7f986b84 pc=0x39a68
runtime.(*mheap).alloc.func1()
        /home/travis/.gimme/versions/go/src/runtime/mheap.go:931 +0x5c fp=0x7f986bc4 sp=0x7f986bac pc=0x74cbc
runtime.(*mheap).alloc(0x900200, 0x1, 0x1001e, 0x0)
        /home/travis/.gimme/versions/go/src/runtime/mheap.go:930 +0x90 fp=0x7f986be8 sp=0x7f986bc4 pc=0x39e48
runtime.(*mcentral).grow(0x900c78, 0x0)
        /home/travis/.gimme/versions/go/src/runtime/mcentral.go:256 +0xb8 fp=0x7f986c0c sp=0x7f986be8 pc=0x29218
runtime.(*mcentral).cacheSpan(0x900c78, 0x610f8)
        /home/travis/.gimme/versions/go/src/runtime/mcentral.go:106 +0x458 fp=0x7f986c40 sp=0x7f986c0c pc=0x28c08
runtime.(*mcache).refill(0x2aaa8000, 0x1e)
        /home/travis/.gimme/versions/go/src/runtime/mcache.go:135 +0xc8 fp=0x7f986c50 sp=0x7f986c40 pc=0x284a0
runtime.(*mcache).nextFree(0x2aaa8000, 0x8fb11e, 0x2aaac000, 0x1cf50, 0x4000)
        /home/travis/.gimme/versions/go/src/runtime/malloc.go:770 +0xb0 fp=0x7f986c6c sp=0x7f986c50 pc=0x1ba0c
runtime.mallocgc(0xe0, 0x542560, 0x46c01, 0x468c8)
        /home/travis/.gimme/versions/go/src/runtime/malloc.go:923 +0x878 fp=0x7f986cc0 sp=0x7f986c6c pc=0x1c47c
runtime.newobject(0x542560, 0x400000)
        /home/travis/.gimme/versions/go/src/runtime/malloc.go:1052 +0x4c fp=0x7f986cd4 sp=0x7f986cc0 pc=0x1c8d8
runtime.malg(0x8000, 0x53d32)
        /home/travis/.gimme/versions/go/src/runtime/proc.go:3217 +0x40 fp=0x7f986cf0 sp=0x7f986cd4 pc=0x4e794
runtime.mpreinit(...)
        /home/travis/.gimme/versions/go/src/runtime/os_linux.go:311
runtime.mcommoninit(0x8fb1a0)
        /home/travis/.gimme/versions/go/src/runtime/proc.go:618 +0x130 fp=0x7f986d08 sp=0x7f986cf0 pc=0x46d68
runtime.schedinit()
        /home/travis/.gimme/versions/go/src/runtime/proc.go:540 +0x84 fp=0x7f986d30 sp=0x7f986d08 pc=0x468dc
runtime.rt0_go(0x7f986e1e, 0x0, 0x7f986e2f, 0x7f986e51, 0x7f986e5c, 0x7f986e64, 0x7f986e74, 0x7f986e91, 0x7f986e9c, 0x7f986eaf, ...)
        /home/travis/.gimme/versions/go/src/runtime/asm_mipsx.s:62 +0xa8 fp=0x7f986d40 sp=0x7f986d30 pc=0x76f98
jedisct1 commented 5 years ago

Looks like this device doesn't have enough free memory.

The latest versions of Go also require more memory than before, but this will probably be fixed in the next version.

zw963 commented 5 years ago

Hi, i have no idea about how to worked with ASUS AC-5300 router too.

$: uname -a
Linux RT-AC5300-5E70 2.6.36.4brcmarm #1 SMP PREEMPT Sun Oct 21 13:30:28 EDT 2018 armv7l ASUSWRT-Merlin

What version should i use? i try android-arm and android-arm64, no luck.

zw963 commented 5 years ago

What version should i use? i try android-arm and android-arm64, no luck.

Sorry, RT-AC5300 seem like worked with: linux-arm.

admin@RT-AC5300-5E70:/tmp/home/root# ./dnscrypt-proxy -version
2.0.19
zw963 commented 5 years ago

@jedisct1 , i think current version still not worked for AC-66U (MIPS), as i describe below.

dnscrypt-proxy-linux_mips

admin@RT-AC66U-F2F0:/tmp/home/root# ./dnscrypt-proxy 
./dnscrypt-proxy: line 1: syntax error: unexpected "("

dnscrypt-proxy-linux_mipsle

admin@RT-AC66U-F2F0:/tmp/home/root# ./dnscrypt-proxy 
fatal error: runtime: out of memory

So, i think this issue should not be close, right?

jedisct1 commented 5 years ago

Nobody seems to know the answer, so maybe you'll have more luck on a forum dedicated to routers.

zw963 commented 5 years ago

@jedisct1 , i think AC66U just too old, with limited memory, it is the last asus MIPS serious router.

admin@RT-AC66U-F2F0:/tmp/home/root# uname -a
Linux RT-AC66U-F2F0 2.6.22.19 #1 Sun Apr 8 14:05:29 EDT 2018 mips ASUSWRT-Merlin

admin@RT-AC66U-F2F0:/tmp/home/root# cat /proc/cpuinfo 
system type             : Broadcom BCM5300 chip rev 1
processor               : 0
cpu model               : MIPS 74K V4.9
BogoMIPS                : 299.82
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

unaligned_instructions  : 12485664
dcache hits             : 2147483648
dcache misses           : 0
icache hits             : 2147483648
icache misses           : 0
instructions            : 2147483648

admin@RT-AC66U-F2F0:/tmp/home/root# cat /proc/meminfo 
MemTotal:       239524 kB
MemFree:         78196 kB
Buffers:          7604 kB
Cached:         115352 kB
SwapCached:          0 kB
Active:          94416 kB
Inactive:        41392 kB
HighTotal:      131072 kB
HighFree:         7388 kB
LowTotal:       108452 kB
LowFree:         70808 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
AnonPages:       12860 kB
Mapped:           6832 kB
Slab:            16468 kB
SReclaimable:     2068 kB
SUnreclaim:      14400 kB
PageTables:        616 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    119760 kB
Committed_AS:   105552 kB
VmallocTotal:  1015800 kB
VmallocUsed:      6428 kB
VmallocChunk:  1006964 kB

Maybe it is time to drop support this old router, but, anyway, i hope i can use the newest dnscrypt-proxy 2 in my old router, and update my an OS project to use this new package. (in fact, this solution is have worked well for my another workspace newer ARM router)

zw963 commented 5 years ago

And, though, this old router work quite well with old dnscrypt-proxy+dnscrypt-wrapper, but, if can, i hope update to use new proxy anyway, thanks.