celzero / firestack

Userspace wireguard and network monitor
https://rethinkdns.com/app
Mozilla Public License 2.0
100 stars 16 forks source link

fdsan: attempted to close file descriptor #80

Closed hussainmohd-a closed 3 months ago

hussainmohd-a commented 3 months ago
08-08 08:36:15.638 22493 10786 I ProxyLogs: enabling WireGuard, id: 4
08-08 08:36:15.638 22493 10786 I ProxyLogs: update one wg, id: 4, Test1-NL-FREE-175013 to true
08-08 08:36:15.642 22493 10786 I ProxyLogs: enable wg config: 4, Test1-NL-FREE-175013
08-08 08:36:15.659 22493 22538 I GoLog   : wgproxy.go:562: I proxy: wg: wg4 tun: created; dns[wg4dns:10.2.0.1:0]; dst[wg4endpoint:89.39.107.188:51820]; mtu[1200]
08-08 08:36:15.660 22493  7492 I GoLog   : wgconn.go:246: I wg: bind: wg4 close; err4? <nil> err6? <nil>
08-08 08:36:15.660 22493  7492 I GoLog   : wgconn.go:222: I wg: bind: wg4 opened port(41372) for v4? true v6? true
08-08 08:36:15.660 22493  7493 I GoLog   : wgconn.go:246: I wg: bind: wg4 close; err4? <nil> err6? <nil>
08-08 08:36:15.661 22493 22538 E GoLog   : wgconn.go:418: W wg: bind: wg4 recvFrom(invalid AddrPort): 0 / err? read udp4 0.0.0.0:41372: use of closed network connection
08-08 08:36:15.661 22493 22538 E GoLog   : wgconn.go:418: W wg: bind: wg4 recvFrom(invalid AddrPort): 0 / err? read udp6 [::]:41372: use of closed network connection
08-08 08:36:15.662 22493  7493 I GoLog   : wgconn.go:222: I wg: bind: wg4 opened port(51820) for v4? true v6? true
08-08 08:36:15.662 22493 22600 I GoLog   : wgconn.go:103: I wg: bind: wg4 new shared endpoint for 89.39.107.188:51820 89.39.107.188:51820
08-08 08:36:15.663 22493 22600 I GoLog   : wgconn.go:103: I wg: bind: wg4 new shared endpoint for 89.39.107.188:51820 89.39.107.188:51820
08-08 08:36:15.663 22493  7493 I GoLog   : proxy.go:102: I proxy: added wg4/wg/
08-08 08:36:15.664 22493  7492 I GoLog   : upstream.go:101: I dns53: (wg4) pre-resolved 10.2.0.1:53 to ; ok? true
08-08 08:36:15.664 22493  7492 I GoLog   : upstream.go:111: I dns53: (wg4) setup: 10.2.0.1:53; pre-ips? false; relay? true
08-08 08:36:15.664 22493  7492 I GoLog   : cacher.go:124: I cache: (Cachewg4) setup: cached.10.2.0.1:53; opts: ttl=10m0s;bumps=10;size=256
08-08 08:36:15.664 22493  7492 I GoLog   : transport.go:257: I dns: add transport wg4@10.2.0.1:53; cache? true
08-08 08:36:15.664 22493 16305 I VpnLifecycle: proxy ip version, has4? true, has6? false, failOpen? false
08-08 08:36:15.665 22493 16305 I VpnLifecycle: r6: IPv6 available, overlay: false
08-08 08:36:15.665 22493 16305 I VpnLifecycle: r4: IPv4 networks available
08-08 08:36:15.665 22493 16305 I VpnLifecycle: Building vpn for v4? true, v6? false
08-08 08:36:15.665 22493 16305 I VpnLifecycle: overlay: routes changed? true, mtu changed? true
08-08 08:36:15.666 22493 16305 I VpnLifecycle: overlay changed OverlayNetworks(has4=true, has6=false, failOpen=false, mtu=1280), restart vpn
08-08 08:36:15.667 22493 16319 I VpnLifecycle: initiateWgPing(wg4): true
08-08 08:36:15.667 22493 16319 I VpnLifecycle: add wireguard proxy with wg4; dns? true
08-08 08:36:15.668 22493 10789 I VpnLifecycle: mtu; proxy: 1280, underlying: 1500, min: 1280
08-08 08:36:15.670 22493 22584 I VpnLifecycle: ---------------------------RESTART-INIT----------------------------
08-08 08:36:15.672 22493 22600 I VpnLifecycle: flow: returning mark: Mark{PID:Exit,CID:47165c4b63f75c58,UID:rethink,} for src(10.111.222.1: 51820), dest(89.39.107.188:51820)
08-08 08:36:15.672 22493  7493 E GoLog   : common.go:214: W intra: makeIPPorts(v4? true, v6? true): all: 1; out: 89.39.107.188:51820
08-08 08:36:15.672 22493  7493 E GoLog   : sockopt.go:42: E set TCP_KEEPIDLE failed: protocol not available
08-08 08:36:15.672 22493  7493 E GoLog   : sockopt.go:45: E set TCP_KEEPINTVL failed: protocol not available
08-08 08:36:15.672 22493  7493 E GoLog   : sockopt.go:48: E set TCP_KEEPCNT failed: protocol not available
08-08 08:36:15.673 22493 10789 I VpnLifecycle: handle proxy change, proxy: WIREGUARD, mode: WIREGUARD
08-08 08:36:15.673 22493 22566 D BatchLogger: signal sleep 2500 ms
08-08 08:36:15.673 22493 22538 I GoLog   : exit.go:50: I proxy: exit: dial(udp) to 89.39.107.188:51820; err? <nil>
08-08 08:36:15.673 22493  7493 I GoLog   : udp.go:385: I udp: 47165c4b63f75c58 (proxy? Exit@127.0.0.127:1337) 100.127.171.175:45820 -> 89.39.107.188:51820/89.39.107.188:51820 for uid rethink
08-08 08:36:15.674 22493  7493 I GoLog   : dispatchers.go:233: I ns: tun(150): wrapup: immediate (loopback)
08-08 08:36:15.674 22493  7493 E GoLog   : fdbased.go:501: W ns: tun(150): dispatchLoop: exit; err no such file
08-08 08:36:15.725 22493 22542 I GoLog   : fds.go:95: I ns: dispatch: fds: stop: eve(188) tun(150); err? <nil>
08-08 08:36:15.725 22493 22542 I GoLog   : dispatchers.go:194: I ns: dispatch: swap: tun(150 => -1); err <nil>
08-08 08:36:15.725 22493 22542 I GoLog   : fdbased.go:246: I ns: tun(150): Dispose: close fd %!d(MISSING)!
08-08 08:36:15.725 22493 22584 I VpnLifecycle: tunnel unlinked
08-08 08:36:15.726 22493 22584 I VpnLifecycle: mtu; proxy: 1280, underlying: 1500, min: 1280
08-08 08:36:15.726 22493 22584 I VpnLifecycle: builder: route rethink traffic in rethink
08-08 08:36:15.727 22493 22542 E GoLog   : fdsan: attempted to close file descriptor 150, expected to be unowned, actually owned by unique_fd 0x718976f1bc
--------- beginning of crash
08-08 08:36:15.728 22493 22737 F libc    : fdsan: attempted to close file descriptor 150, expected to be unowned, actually owned by unique_fd 0x718976f1bc
08-08 08:36:15.731 22493 22737 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 22737 (binder:22493_5), pid 22493 (elzero.bravedns)
08-08 08:36:16.545 21328 21328 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-08 08:36:16.546 21328 21328 F DEBUG   : Build fingerprint: 'Nothing/PongIND/Pong:14/UP1A.231005.007/2406280430:user/release-keys'
08-08 08:36:16.546 21328 21328 F DEBUG   : Revision: '0'
08-08 08:36:16.546 21328 21328 F DEBUG   : ABI: 'arm64'
08-08 08:36:16.546 21328 21328 F DEBUG   : Timestamp: 2024-08-08 08:36:16.077368587+0530
08-08 08:36:16.546 21328 21328 F DEBUG   : Process uptime: 38774s
08-08 08:36:16.546 21328 21328 F DEBUG   : Cmdline: com.celzero.bravedns
08-08 08:36:16.546 21328 21328 F DEBUG   : pid: 22493, tid: 22737, name: binder:22493_5  >>> com.celzero.bravedns <<<
08-08 08:36:16.546 21328 21328 F DEBUG   : uid: 10369
08-08 08:36:16.546 21328 21328 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
08-08 08:36:16.546 21328 21328 F DEBUG   : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
08-08 08:36:16.546 21328 21328 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
08-08 08:36:16.546 21328 21328 F DEBUG   : Abort message: 'fdsan: attempted to close file descriptor 150, expected to be unowned, actually owned by unique_fd 0x718976f1bc'
08-08 08:36:16.546 21328 21328 F DEBUG   :     x0  0000000000000000  x1  00000000000058d1  x2  0000000000000006  x3  00000071090fb590
08-08 08:36:16.546 21328 21328 F DEBUG   :     x4  631f646b68651f64  x5  631f646b68651f64  x6  631f646b68651f64  x7  7f7f7f7f7f7f7f7f
08-08 08:36:16.546 21328 21328 F DEBUG   :     x8  00000000000000f0  x9  e13bb2330ee32724  x10 00000071090facbc  x11 000000746b14f028
08-08 08:36:16.546 21328 21328 F DEBUG   :     x12 000000746b14f020  x13 000000007fffffff  x14 000000001e2aadfc  x15 000027c0d942e1ad
08-08 08:36:16.546 21328 21328 F DEBUG   :     x16 000000744d56bd18  x17 000000744d5473b0  x18 0000006fabb7e000  x19 00000000000057dd
08-08 08:36:16.546 21328 21328 F DEBUG   :     x20 00000000000058d1  x21 00000071090fc000  x22 0000000000000003  x23 00000071090fb388
08-08 08:36:16.546 21328 21328 F DEBUG   :     x24 00000071090fb680  x25 00000071090fb300  x26 00000071090fb2c0  x27 ffffff80ffffffc8
08-08 08:36:16.546 21328 21328 F DEBUG   :     x28 0000000000000000  x29 00000071090fb620
08-08 08:36:16.546 21328 21328 F DEBUG   :     lr  000000744d4f8e08  sp  00000071090fb240  pc  000000744d4f8e2c  pst 0000000000001000
08-08 08:36:16.546 21328 21328 F DEBUG   : 14 total frames
08-08 08:36:16.546 21328 21328 F DEBUG   : backtrace:
08-08 08:36:16.546 21328 21328 F DEBUG   :       #00 pc 000000000005fe2c  /apex/com.android.runtime/lib64/bionic/libc.so (fdsan_error(char const*, ...)+564) (BuildId: 50118287324a156bc7be11d3d940c7be)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #01 pc 000000000005fb30  /apex/com.android.runtime/lib64/bionic/libc.so (android_fdsan_close_with_tag+920) (BuildId: 50118287324a156bc7be11d3d940c7be)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #02 pc 000000000006037c  /apex/com.android.runtime/lib64/bionic/libc.so (close+20) (BuildId: 50118287324a156bc7be11d3d940c7be)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #03 pc 0000000000089a58  /system/lib64/libbinder.so (android::Parcel::closeFileDescriptors()+248) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #04 pc 000000000007dde0  /system/lib64/libbinder.so (android::Parcel::freeDataNoInit()+64) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #05 pc 000000000007dd48  /system/lib64/libbinder.so (android::Parcel::~Parcel()+36) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #06 pc 0000000000060ef0  /system/lib64/libbinder.so (android::IPCThreadState::executeCommand(int)+1648) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #07 pc 00000000000607bc  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+164) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #08 pc 0000000000061130  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+116) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #09 pc 000000000006ad98  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+28) (BuildId: f7913f9e3d0fd3fb09233e4d1b701c23)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #10 pc 00000000000142d0  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+288) (BuildId: 6df8048e2f2c69be0a5d8ee3149d683d)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #11 pc 00000000000ecc40  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144) (BuildId: a7f60638c3e67ef3ed8db3d07cfa7f75)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #12 pc 00000000000c3644  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 50118287324a156bc7be11d3d940c7be)
08-08 08:36:16.546 21328 21328 F DEBUG   :       #13 pc 000000000005cfa4  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 50118287324a156bc7be11d3d940c7be)