一、摘要
当出现网络不好时(日志关键字“process data stall”),会出现com.android.networkstack.process 后台进程联网访问“http://www.google.cn/generate_204”进行网络检测的行为,会额外带来功耗电流。遇到这种情况,主要是环境因素,一般调整好网络环境,复测可消失。
二、BugReport
com.android.networkstack.process 联网带来电流毛刺的现象
三、日志
网络不好的日志关键字“process data stall”
1073进程包含:om.android.networkstack.process 和 com.android.cellbroadcastservice 的联网行为。从日志看有1073联网
-
com.android.networkstack.process /
1073 (1 entries):
bugreportlog.txt:33518:pkg,com.android.cellbroadcastservice,1073,300000000,0,?-1?,0
直接解压bugreport进行文本搜索也可以
android.txt:470624:05-14 20:37:52.514 1073 4145 11346 D TrafficStats: tagSocket(128) with statsTag=0xffffff81, statsUid=-1
android.txt:470625:05-14 20:37:52.518 root 1414 11349 I resolv : ResNSendHandler::run: 0 / {108 983148 108 983148 1073 1}
android.txt:470627:05-14 20:37:52.519 1073 4145 4145 D TrafficStats: tagSocket(121) with statsTag=0xffffffff, statsUid=-1
android.txt:470628:05-14 20:37:52.520 root 1414 11350 I resolv : ResNSendHandler::run: 0 / {108 983148 108 983148 1073 1}
android.txt:470630:05-14 20:37:52.520 root 1414 11352 I resolv : ResNSendHandler::run: 0 / {108 983148 108 983148 1073 1}
android.txt:470632:05-14 20:37:52.520 root 1414 11351 I resolv : ResNSendHandler::run: 0 / {108 983148 108 983148 1073 1}
android.txt:470633:05-14 20:37:52.521 1073 4145 4145 D TrafficStats: tagSocket(121) with statsTag=0xffffffff, statsUid=-1
android.txt:470634:05-14 20:37:52.521 1073 4145 11345 D NetworkMonitor/108: PROBE_DNS www.google.cn 14ms OK 114.250.65.34
android.txt:470635:05-14 20:37:52.522 1073 4145 4145 D TrafficStats: tagSocket(121) with statsTag=0xffffffff, statsUid=-1
android.txt:470636:05-14 20:37:52.523 1073 4145 11346 D NetworkMonitor/108: PROBE_DNS www.googleapis.cn 15ms OK 114.250.66.34
android.txt:470637:05-14 20:37:52.524 root 1414 11353 I resolv : GetAddrInfoHandler::run: {108 983148 108 983148 1073 1}
android.txt:470638:05-14 20:37:52.524 1073 4145 11348 D NetworkMonitor/108: PROBE_DNS www.google.cn 17ms OK 114.250.65.34
android.txt:470639:05-14 20:37:52.525 root 1414 11354 I resolv : GetAddrInfoHandler::run: {108 983148 108 983148 1073 1}
android.txt:470646:05-14 20:37:52.526 root 1414 11357 I resolv : GetAddrInfoHandler::run: {108 983148 108 983148 1073 1}
android.txt:470647:05-14 20:37:52.527 1073 4145 11346 D TrafficStats: tagSocket(123) with statsTag=0xffffff81, statsUid=-1
android.txt:470648:05-14 20:37:52.527 1073 4145 11345 D TrafficStats: tagSocket(128) with statsTag=0xffffff81, statsUid=-1
android.txt:470652:05-14 20:37:52.528 1073 4145 11348 D TrafficStats: tagSocket(121) with statsTag=0xffffff81, statsUid=-1
android.txt:470655:05-14 20:37:52.578 1073 4145 4145 D TrafficStats: tagSocket(127) with statsTag=0xffffffff, statsUid=-1
android.txt:470656:05-14 20:37:52.582 1073 4145 11347 D NetworkMonitor/108: PROBE_DNS connect.Smart.com 74ms OK 101.42.132.122
android.txt:470657:05-14 20:37:52.586 root 1414 11359 I resolv : GetAddrInfoHandler::run: {108 983148 108 983148 1073 1}
android.txt:470661:05-14 20:37:52.598 1073 4145 11347 D TrafficStats: tagSocket(127) with statsTag=0xffffff81, statsUid=-1
android.txt:470662:05-14 20:37:52.699 1073 4145 11345 D NetworkMonitor/108: PROBE_HTTP http://www.google.cn/generate_204 time=176ms ret=204 request={Connection=[close], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36]} headers={null=[HTTP/1.1 204 No Content], Connection=[close], Content-Length=[0], Cross-Origin-Resource-Policy=[cross-origin], Date=[Tue, 14 May 2024 12:37:52 GMT], X-Android-Received-Millis=[1715690272698], X-Android-Response-Source=[NETWORK 204], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1715690272602]}
android.txt:470663:05-14 20:37:52.793 1073 4145 11347 D NetworkMonitor/108: PROBE_HTTPS http://connect.Smart.com/generate_204 time=209ms ret=204 request={Connection=[close], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36]} headers={null=[HTTP/1.1 204 No Content], Connection=[close], Date=[Tue, 14 May 2024 12:37:52 GMT], Set-Cookie=[tgw_l7_route=aa389d7590692c030521d27c13033ad9; Expires=Tue, 14-May-2024 12:52:52 GMT; Path=/], X-Android-Received-Millis=[1715690272792], X-Android-Response-Source=[NETWORK 204], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1715690272698]}
android.txt:470664:05-14 20:37:52.797 1073 4145 11344 D NetworkMonitor/108: isCaptivePortal: isSuccessful()=true isPortal()=false RedirectUrl=null isPartialConnectivity()=false Time=291ms
android.txt:470667:05-14 20:37:52.879 1073 4145 11348 D NetworkMonitor/108: PROBE_HTTPS https://www.google.cn/generate_204 time=354ms ret=204 request={Connection=[close], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36]} headers={null=[HTTP/1.1 204 No Content], Alt-Svc=[h3=":443"; ma=2592000,h3-29=":443"; ma=2592000], Connection=[close], Content-Length=[0], Cross-Origin-Resource-Policy=[cross-origin], Date=[Tue, 14 May 2024 12:37:52 GMT], X-Android-Received-Millis=[1715690272878], X-Android-Response-Source=[NETWORK 204], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1715690272707]}
android.txt:470668:05-14 20:37:53.767 1000 1563 10738 I sensors-hal: qsh_event_parse:1180, sensor lsm6dso Accelerometer Non-wakeup[1] event_id[1025(std_event)] data [-0.158644 0.123948 9.853405 ] qsh time=10:41:20.727 count 41/0/41
android.txt:470755:05-14 20:38:00.029 1073 4145 11346 D NetworkMonitor/108: PROBE_HTTP http://www.googleapis.cn/generate_204 Probe failed with exception java.net.SocketTimeoutException: failed to connect to www.googleapis.cn/114.250.66.34 (port 80) from /192.168.31.243 (port 35422) after 7500ms
android.txt:470806:05-14 20:38:01.782 1000 1563 10738 I sensors-hal: qsh_event_parse:1180, sensor lsm6dso Accelerometer Non-wakeup[1] event_id[1025(std_event)] data [-0.156491 0.129930 9.852926 ] qsh time=10:41:28.798 count 42/0/42
android.txt:470817:05-14 20:38:02.834 1073 4145 16283 D NetworkMonitor/108: notifyTcpMessage: notify wifi tcp rate failure method timestampMillis 38485720 dnsConsecutiveTimeoutsCount 0 latestPacketFailPercentage 100 latestReceivedCount 0
android.txt:470818:05-14 20:38:02.835 1073 4145 16283 D NetworkMonitor/108: reevaluation network state.
android.txt:470819:05-14 20:38:02.836 1073 4145 16283 D NetworkMonitor/108: Forcing reevaluation for UID 0. Dns signal count: 0
android.txt:470821:05-14 20:38:02.839 1073 4145 11368 D TrafficStats: tagSocket(121) with statsTag=0xffffff81, statsUid=-1
android.txt:470822:05-14 20:38:02.839 1073 4145 11369 D TrafficStats: tagSocket(123) with statsTag=0xffffff81, statsUid=-1
android.txt:470823:05-14 20:38:02.840 1073 4145 11370 D TrafficStats: tagSocket(129) with statsTag=0xffffff81, statsUid=-1
android.txt:470824:05-14 20:38:02.840 1073 4145 11371 D TrafficStats: tagSocket(131) with statsTag=0xffffff81, statsUid=-1
android.txt:417690:05-14 20:23:23.610 1000 2076 3897 D SmartWifiNetworkHandover: process data stall report: detectionMethod is 7
android.txt:471363:05-14 20:38:44.053 1000 2076 3897 D SmartWifiNetworkHandover: process data stall report: detectionMethod is 7
android.txt:471499:05-14 20:38:54.410 1000 2076 3897 D SmartWifiNetworkHandover: process data stall report: detectionMethod is 7