openatx / atx-agent

HTTP Server runs on android devices
Other
745 stars 274 forks source link

atx-agent一段时间无响应 #66

Open hylhyl323323 opened 4 years ago

hylhyl323323 commented 4 years ago

atx-agent版本:0.8.0 长时间运行时,atx-agent有一定几率出现崩溃,无法被连接的现象,通过192.168.120.100:7912/version也无法获取到信息,从手机上看,atx-agent显示已经stopped

日志: 127.0.0.1 - - [19/Dec/2019:16:11:18 +0800] "GET /screenshot/0 HTTP/1.1" 200 68220 127.0.0.1 - - [19/Dec/2019:16:11:18 +0800] "GET /screenshot/0 HTTP/1.1" 200 68220 127.0.0.1 - - [19/Dec/2019:16:11:19 +0800] "GET /screenshot/0 HTTP/1.1" 200 68198 2019/12/19 16:13:31 [Info] main.go:516 - - - - - - - - - - - - - - - 2019/12/19 16:13:31 [Info] main.go:517 daemon started atx-agent version 0.8.0 Listen on http://192.168.120.100:7912 2019/12/19 16:13:31 [Fatal] main.go:532 listen tcp :7912: bind: address already in use

codeskyblue commented 4 years ago

猜测应该是atx-agent代码出现卡死的逻辑。需要先kill 掉已经启动的atx-agent

codeskyblue commented 4 years ago

原因追查中

现象:进程没有相应

$ adb shell ps -A | grep atx
shell        26961     1  806408   2560 futex_wait_queue_me 69ba0 S atx-agent
adb shell cat /proc/26961/stack
[<0000000000000000>] __switch_to+0x94/0xa0
[<0000000000000000>] futex_wait_queue_me+0xd8/0x144
[<0000000000000000>] futex_wait+0xec/0x200
[<0000000000000000>] do_futex+0xdc/0x4e8
[<0000000000000000>] compat_SyS_futex+0xdc/0x168
[<0000000000000000>] cpu_switch_to+0x2c0/0x2360
[<0000000000000000>] 0xffffffffffffffff

相关链接