Skip to content
Commit 375d780c authored by Ken Chen's avatar Ken Chen
Browse files

Add SkDestroyListener log in dumpsys netstats

When sockets are destroyed, the SkDestroyListener receives a
NETLINK_INET_DIAG message informing it to delete the socket cookie from
the BPF CookieTagMap. However, under unknown conditions, all 10,000
spaces on the map were still observed to be filled. SkDestroyListener
and its parent classes, NetlinkMonitor, and FdEventsReader will log
errors. But due to the time required to fill the 10,000 fields is long,
traces in the device log are likely to have been overwritten and cannot
be observed.
This commit enables dumpsys netstats to print the last 20 traces of the
SkDestroyListener. If the issue is caused by the SkDestroyListener,
this will help in obtaining further clues when the issue is reported
again.

Bug: 306919485
Bug: 319348954
Test: atest FrameworksNetTests:android.net.connectivity.com.android.serv
      er.net.NetworkStatsServiceTest#testDumpSkDestroyListenerLogs
Test: manually add mLog.e(...) in
      SkDestroyListener#processNetlinkMessage and check dumpsys netstats
Change-Id: I5bbfe07e05cf959f809f28a7633ee5f99e29f641
parent c45efc31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment