[OnePlus 5 Questions & Answers] yubimusubi:
Got hit again... something like 45% packet loss over 5+ minutes. Ran a logcat while I was hitting the issue... these lines maybe look interesting (I stripped out identifiable network information as well as the lines I think don't matter, also sorry for the formatting):

06-29 14:54:59.750 892 7861 W SocketClient: write error (Broken pipe)
06-29 14:54:59.764 892 7864 W SocketClient: write error (Broken pipe)
06-29 14:54:59.777 892 7863 W SocketClient: write error (Broken pipe)
06-29 14:54:59.810 1420 2157 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.810 1420 2157 D ConnectivityService: registerNetworkAgent NetworkAgentInfo{ ni{[type: WIFI[], state: CONNECTING/CONNECTING, reason: (unspecified), extra: "MY_SSID_HERE", failover: false, available: true, roaming: false, metered: false]} network{103} nethandle{442398067422} lp{{LinkAddresses: [] Routes: [] DnsAddresses: [] Domains: null MTU: 0}} nc{[ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps]} Score{20} everValidated{false} lastValidated{false} created{false} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} }
06-29 14:54:59.810 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.810 1420 2163 D ConnectivityService: NetworkAgentInfo [WIFI () - 103] EVENT_NETWORK_INFO_CHANGED, going from null to CONNECTING
06-29 14:54:59.819 1420 2159 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.833 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.833 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.833 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.833 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.834 1420 2159 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.953 1420 2159 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.954 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.954 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.958 1420 2159 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.961 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.961 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:54:59.961 1420 2163 D ConnectivityService: NetworkAgentInfo [WIFI () - 103] EVENT_NETWORK_INFO_CHANGED, going from CONNECTING to CONNECTED
06-29 14:54:59.962 1420 2163 D ConnectivityService: Adding iface wlan0 to network 103
06-29 14:54:59.990 1420 2163 D ConnectivityService: Setting DNS servers for network 103 to [/10.x.x.x]
06-29 14:54:59.994 1420 2163 I Nat464Xlat: Android Xlat is disabled

06-29 14:55:00.019 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.020 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.020 1420 2163 D ConnectivityService: Switching to new default network: NetworkAgentInfo{ ni{[type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: "MY_SSID_HERE", failover: false, available: true, roaming: false, metered: false]} network{103} nethandle{442398067422} lp{{InterfaceName: wlan0 LinkAddresses: [10.X.X.X/24,] Routes: [fe80::/64 -> :: wlan0,10.X.X.0/24 -> 0.0.0.0 wlan0,0.0.0.0/0 -> 10.X.X.X wlan0,] DnsAddresses: [10.X.X.X,] Domains: SEARCH_DOMAIN_HERE MTU: 0 TcpBufferSizes: 524288,1048576,2097152,262144,524288,1048576}} nc{[ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&FOREGROUND LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -49]} Score{20} everValidated{false} lastValidated{false} created{true} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} }
06-29 14:55:00.079 1420 3015 I ActivityManager: Killing 7228:com.google.android.talk/u0a140 (adj 906): empty #17
06-29 14:55:00.079 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.080 1420 2163 D ConnectivityService: Sending CONNECTED broadcast for type 1 NetworkAgentInfo [WIFI () - 103] isDefaultNetwork=true
06-29 14:55:00.081 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.081 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.124 3881 3881 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1374 android.content.Cont
extWrapper.startService:614 com.oneplus.opbackup.service.BackupService.startService:42 com.oneplus.opbackup.receiver.CheckUpdateReceiver.startOTAService:109 com.oneplus.opba
ckup.receiver.NetworkListenerService$NetworkChangeReceive.onReceive:40
06-29 14:55:00.134 1420 3576 D ActivityManager: cleanUpApplicationRecord -- 7228
06-29 14:55:00.136 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.137 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.137 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.151 1420 1420 V NotificationService: pkg=com.tmobile.digits canInterrupt=false intercept=true
06-29 14:55:00.176 1420 3634 I ActivityManager: Killing 7640:net.oneplus.weather/u0a95 (adj 906): empty #17
06-29 14:55:00.227 1420 2234 D ActivityManager: cleanUpApplicationRecord -- 7640
06-29 14:55:00.236 1420 2163 D NetworkNotificationManager: clearNotification id=103
06-29 14:55:00.236 1420 2163 D ConnectivityService: NetworkAgentInfo [WIFI () - 103] validation passed
06-29 14:55:00.236 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:00.355 1420 2163 I Nat464Xlat: Android Xlat is disabled
06-29 14:55:00.652 1420 3517 I ActivityManager: Killing 7690:org.adaway/u0a212 (adj 906): empty #17

06-29 14:55:01.084 3931 4044 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1374 android.content.Cont
extWrapper.startService:614 com.oneplus.security.firewall.NetworkRestrictService.applyRules:154 com.oneplus.security.receiver.NetworkStateUtils.onReceiveNetWorkStateChanged:127 com.oneplus.security.SecureService$AsynHandler.handleMessage:64

06-29 14:55:01.254 1420 2159 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 14:55:01.255 1420 2163 I Nat464Xlat: Android Xlat is disabled

06-29 14:55:15.518 1420 1477 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=22, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@a1a4dc3)
06-29 14:55:15.518 1420 6053 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=25, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@8b6b640)
06-29 14:55:15.518 1420 3628 D ActivityManager: cleanUpApplicationRecord -- 7988
06-29 14:55:15.519 1420 2163 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=22, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
06-29 14:55:15.520 1420 2163 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=25, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
06-29 14:56:04.396 1420 2163 D ConnectivityService: releasing NetworkRequest [ REQUEST id=35, legacyType=3, [ Transports: CELLULAR Capabilities: SUPL&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
06-29 14:56:05.321 1420 1420 D ConnectivityService: requestNetwork for uid/pid:1000/1420 NetworkRequest [ REQUEST id=36, legacyType=3, [ Transports: CELLULAR Capabilities: SUPL&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
06-29 14:56:19.275 1420 2163 D ConnectivityService: releasing NetworkRequest [ REQUEST id=36, legacyType=3, [ Transports: CELLULAR Capabilities: SUPL&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
06-29 14:57:11.077 1420 3553 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=15, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@c3cbd29)
06-29 14:57:11.078 1420 3576 D ActivityManager: cleanUpApplicationRecord -- 6355
06-29 14:57:11.078 1420 2163 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=15, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
06-29 14:57:24.568 1420 6053 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=31, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@b2db074)
06-29 14:57:24.568 1420 3576 D ActivityManager: cleanUpApplicationRecord -- 9858
06-29 14:57:24.569 1420 2163 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=31, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
06-29 14:59:18.140 1420 2234 W MmsServiceBroker: MmsService not connected. Try connecting...
06-29 14:59:18.140 1420 1420 I MmsServiceBroker: Connecting to MmsService
06-29 14:59:18.141 1420 1420 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1438 com.android.server.MmsServiceBroker.tryConnecting:240 com.android.server.MmsServiceBroker.-wrap3:-1 com.android.server.MmsServiceBroker$1.handleMessage:82 android.os.Handler.dispatchMessage:102
06-29 14:59:18.167 1420 1420 I MmsServiceBroker: MmsService connected
06-29 14:59:50.777 1420 2163 D ConnectivityService: releasing NetworkRequest [ REQUEST id=10, [ Transports: CELLULAR Capabilities: IMS&TRUSTED&NOT_VPN Specifier: <1>] ]
06-29 14:59:50.778 1420 2163 D ConnectivityService: no live requests for NetworkAgentInfo [MOBILE (IWLAN) - 102]; disconnecting
06-29 14:59:50.779 1420 2163 D ConnectivityService: NetworkAgentInfo [MOBILE (IWLAN) - 102] got DISCONNECTED, was satisfying 4
06-29 15:00:09.543 3931 4212 D NetworkStateUtils: netWorkState=1
06-29 15:00:15.090 10769 12127 E NetworkUtils: Error checking internet connection
06-29 15:00:13.876 696 3254 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [3, 0]
06-29 15:00:14.368 696 3254 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [3, 0]
06-29 15:00:14.503 897 897 I cnss-daemon: RTM_NEWNEIGH message received: 28
06-29 15:00:14.503 897 897 E cnss-daemon: Stale or unreachable neighbors, ndm state: 4
06-29 15:00:15.090 10769 12127 E NetworkUtils: Error checking internet connection

06-29 15:01:03.054 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 15:01:03.055 1420 2163 D ConnectivityService: Sending CONNECTED broadcast for type 1 NetworkAgentInfo [WIFI () - 105] isDefaultNetwork=true
06-29 15:01:03.056 2387 2446 W QCNEJ : |CORE| network available: 105
06-29 15:01:03.057 880 1122 D APM_AudioPolicyManager: stopOutput() output 13, stream 1, session 33
06-29 15:01:03.057 880 1122 D AudioPolicyManagerCustom: getNewOutputDevice() selected device 0
06-29 15:01:03.057 880 1122 D APM_AudioPolicyManager: setOutputDevice() device 0000 delayMs 96
06-29 15:01:03.057 2387 2446 W QCNEJ : |CORE| onAvailable: bind the process to WIFI
06-29 15:01:03.065 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 15:01:03.066 2301 2585 D NetworkController: updateConnectivity: mConnectedTransports={1}
06-29 15:01:03.066 2301 2585 D NetworkController: updateConnectivity: mValidatedTransports={}
06-29 15:01:03.069 11936 11936 D CB.ConnectivityManager: onReceived() called; noConnectivity? false; isFailover? false
06-29 15:01:03.080 3635 3635 D WelcomePanel: Network has been turned on

06-29 15:01:03.094 3881 3881 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1374 android.content.ContextWrapper.startService:614 com.oneplus.opbackup.service.BackupService.startService:42 com.oneplus.opbackup.receiver.CheckUpdateReceiver.startOTAService:109 com.oneplus.opbackup.receiver.NetworkListenerService$NetworkChangeReceive.onReceive:40
06-29 15:01:03.100 3881 3881 D AbstractProcessor: onConnectChange Type:1
06-29 15:01:03.116 1420 3553 I chatty : uid=1000(system) Binder:1420_D expire 3 lines
06-29 15:01:03.123 1420 3634 I chatty : uid=1000(system) Binder:1420_11 expire 6 lines
06-29 15:01:03.124 3789 3789 V MmsSystemEventReceiver: onReceive(): mNetworkInfo=[type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: "MY_SSID_HERE", failover: false, available: true, roaming: false, metered: false]
06-29 15:01:03.124 3434 4723 I DeviceScanner: [MDNS] startScan: scannerFlags: 2 criteria=%urn:x-cast:com.google.cast.media
06-29 15:01:03.125 1420 2163 D NetworkNotificationManager: clearNotification id=105
06-29 15:01:03.125 1420 2163 D ConnectivityService: NetworkAgentInfo [WIFI () - 105] validation passed
06-29 15:01:03.125 1420 2163 D AvoidBadWifiTracker: force disable bad wifi tracker
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: new score 60 for exisiting request NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTE
D&TRUSTED&NOT_VPN] ]
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: my score=101, my filter=[ Transports: CELLULAR Capabilities: MMS&SUPL&DUN&FOTA&IMS&CBS&IA&RCS&XCAP&EIM
S&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN Specifier: <*>]
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: evalRequest
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: done
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: new score 60 for exisiting request NetworkRequest [ TRACK_DEFAULT id=7, [ Capabilities: INTERNET&NOT_RES
TRICTED&TRUSTED&NOT_VPN] ]
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: my score=101, my filter=[ Transports: CELLULAR Capabilities: MMS&SUPL&DUN&FOTA&IMS&CBS&IA&RCS&XCAP&EIM
S&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN Specifier: <*>]
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: evalRequest
06-29 15:01:03.128 2401 2401 D PhoneSwitcherNetworkRequstListener: done
06-29 15:01:03.130 3434 4723 W MdnsClient_Cast: #acquireLock. Multicast lock not held. Acquiring. Subtypes:"%9E5E7C8F47989526C9BCD95D24084F6F0B27C5ED"
06-29 15:01:03.132 2301 2585 D NetworkController: updateConnectivity: mConnectedTransports={1}
06-29 15:01:03.132 2301 2585 D NetworkController: updateConnectivity: mValidatedTransports={1}
06-29 15:01:03.137 3434 4723 I DeviceScanner: [GuestMode] startScan: scannerFlags: 2 criteria=%urn:x-cast:com.google.cast.media
06-29 15:01:03.137 3789 3789 D SmsBroadcastReceiver: SmsBroadcastReceiver: onReceive:....
06-29 15:01:03.137 3789 3789 D SmsBroadcastReceiver: SMS received:.... Action:android.net.conn.CONNECTIVITY_CHANGE

I basically looked for things that said e.g., "network" or "connectivity". There were a lot more lines so I might have missed the smoking gun, but I *bet* it has something to do with the fact that my mobile coverage is *awful* here. I also have mobile data turned off while I'm at home, so even if it does switch to mobile network, it should still block data. I have "Smart Wi-Fi switcher" toggled on (I assume that's what's spamming "AvoidBadWifiTracker" lines), so I turned it off to see if that makes a difference.

Update: No, disabling "Smart Wi-Fi switcher" didn't stop the massive packet loss - it did make the "AvoidBadWifiTracker" lines go away though.