shadowsocks/v2ray-plugin-android

v2ray plugin doesn't work on Android Q

love4taylor opened this issue · 5 comments

libss-local exits too fast (exit code: 255)

--------- beginning of crash
03-14 12:49:50.802 18480 18480 F libc    : error: "/data/app/com.github.shadowsocks.plugin.v2ray-_GCuz83U87AvVQBpN03Ezw==/lib/arm64/libv2ray.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic
03-14 12:49:50.802 18480 18480 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 18480 (libv2ray.so), pid 18480 (libv2ray.so)
03-14 12:49:50.823 18484 18484 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
03-14 12:49:50.823   897  1396 D ConnectivityService: Setting DNS servers for network 120 to [/172.19.0.2]
03-14 12:49:50.824   803   803 I /system/bin/tombstoned: received crash request for pid 18480
03-14 12:49:50.824   897  1396 D DnsManager: setDnsConfigurationForNetwork(120, [172.19.0.2], [], [1800, 25, 8, 64], , [])
03-14 12:49:50.824 18484 18484 I crash_dump64: performing dump of process 18480 (target tid = 18480)
03-14 12:49:50.825 18484 18484 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-14 12:49:50.825 18484 18484 F DEBUG   : Build fingerprint: 'google/sailfish/sailfish:Q/QPP1.190205.018.B4/5347935:user/release-keys'
03-14 12:49:50.825 18484 18484 F DEBUG   : Revision: '0'
03-14 12:49:50.825 18484 18484 F DEBUG   : ABI: 'arm64'
03-14 12:49:50.825 18484 18484 F DEBUG   : Timestamp: 2019-03-14 12:49:50+0800
03-14 12:49:50.825 18484 18484 F DEBUG   : pid: 18480, tid: 18480, name: libv2ray.so  >>> /data/app/com.github.shadowsocks.plugin.v2ray-_GCuz83U87AvVQBpN03Ezw==/lib/arm64/libv2ray.so <<<
03-14 12:49:50.825 18484 18484 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
03-14 12:49:50.825 18484 18484 F DEBUG   : Abort message: 'error: "/data/app/com.github.shadowsocks.plugin.v2ray-_GCuz83U87AvVQBpN03Ezw==/lib/arm64/libv2ray.so": executable's TLS segment is underaligned: alignment is 8, needs to be at least 64 for ARM64 Bionic'
03-14 12:49:50.825 18484 18484 F DEBUG   :     x0  0000000000000000  x1  0000000000004830  x2  0000000000000006  x3  0000007fff8308a0
03-14 12:49:50.825 18484 18484 F DEBUG   :     x4  0080000000000000  x5  0080000000000000  x6  0080000000000000  x7  0000000000000010
03-14 12:49:50.825 18484 18484 F DEBUG   :     x8  00000000000000f0  x9  c7f1fb658e0ce0c1  x10 fffffff8ffffffdf  x11 0000000000000000
03-14 12:49:50.825 18484 18484 F DEBUG   :     x12 0000000000000008  x13 0000000000000106  x14 000000762771dd40  x15 0000000000000030
03-14 12:49:50.825 18484 18484 F DEBUG   :     x16 0000000000000000  x17 0000000000000000  x18 00000076276fe000  x19 00000000000000ac
03-14 12:49:50.825 18484 18484 F DEBUG   :     x20 0000000000004830  x21 00000000000000b2  x22 0000000000004830  x23 00000000ffffffff
03-14 12:49:50.825 18484 18484 F DEBUG   :     x24 000000762770f000  x25 00000076278235a0  x26 0000007627823990  x27 0000007627823000
03-14 12:49:50.825 18484 18484 F DEBUG   :     x28 0000007627823000  x29 0000007fff830950
03-14 12:49:50.825 18484 18484 F DEBUG   :     sp  0000007fff830880  lr  00000076277eebcc  pc  00000076277eebec
03-14 12:49:50.826 18484 18484 F DEBUG   : 
03-14 12:49:50.826 18484 18484 F DEBUG   : backtrace:
03-14 12:49:50.826 18484 18484 F DEBUG   :       #00 pc 00000000000debec  /bionic/bin/linker64 (__dl_abort+160)
03-14 12:49:50.826 18484 18484 F DEBUG   :       #01 pc 00000000000ff9dc  /bionic/bin/linker64 (__dl__ZN15StaticTlsLayout27reserve_exe_segment_and_tcbEPK10TlsSegmentPKc+268)
03-14 12:49:50.827 18484 18484 F DEBUG   :       #02 pc 0000000000050444  /bionic/bin/linker64 (__dl__Z27linker_setup_exe_static_tlsPKc+68)
03-14 12:49:50.827 18484 18484 F DEBUG   :       #03 pc 000000000004b534  /bionic/bin/linker64 (__dl__ZL29__linker_init_post_relocationR19KernelArgumentBlockR6soinfo+3008)
03-14 12:49:50.827 18484 18484 F DEBUG   :       #04 pc 000000000004a864  /bionic/bin/linker64 (__dl___linker_init+416)
03-14 12:49:50.827 18484 18484 F DEBUG   :       #05 pc 0000000000051aa4  /bionic/bin/linker64 (__dl__start+4)
03-14 12:49:50.836   897  1490 W NativeCrashListener: Couldn't find ProcessRecord for pid 18480
03-14 12:49:50.836 18484 18484 E crash_dump64: AM data write failed: Broken pipe
03-14 12:49:50.837   803   803 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_05
03-14 12:49:50.839 18466 18466 E shadowsocks: plugin service exit unexpectedly

Here's a fix for physical devices running arm... https://github.com/Catfriend1/syncthing-android/pull/374/files

Mygod commented

That's quite a dirty fix.

Mygod commented

According to golang/go#29674 (comment), this will be fixed in Go 1.13.

I can confirm that this can be fixed by building libv2ray using gotip (go development tree).