[Xiaomi Mi Pad 4 ROMs, Kernels, Recoveries, & Other] S-trace:
Wi-Fi tethering problem on lineage-17.1-20200106

Hello.

I have installed lineage-17.1-20200106-UNOFFICIAL-clover.zip on my MiPad4-LTE yesterday and found a Wi-Fi Access Point mode issue - when i switch Wi-Fi tethering on - other devices can connect to the network, but can't connect to the Internet, and then after ~1.5 minutes MiPad4 falls in soft reboot with following logcat messages:

02-10 08:34:12.095 8245 8344 I ConnectivityManager: startTethering caller:com.android.systemui
02-10 08:34:12.096 7985 9936 I WifiService: startSoftAp uid=1000
02-10 08:34:12.096 7985 8202 D WifiActiveModeWarden: Starting SoftApModeManager
02-10 08:34:12.098 7985 8202 I android_os_HwBinder: HwBinder: Starting thread pool for getting: android.hardware.wifi@1.0::IWifi/default
02-10 08:34:12.102 2588 2588 W libc : Unable to set property "wifi.active.interface" to "": error code: 0x18
02-10 08:34:12.102 2588 2588 E android.hardware.wifi@1.0-service: Failed to set active wlan iface name property: Operation not permitted
02-10 08:34:12.102 2588 2588 I android.hardware.wifi@1.0-service: Wifi HAL started
02-10 08:34:12.102 7985 8202 I WifiVendorHal: Vendor Hal started successfully
02-10 08:34:12.103 7985 8203 I WifiP2pNative: Registering for interface available listener
02-10 08:34:12.104 7985 8202 D HostapdHal: Successfully triggered start of hostapd using HIDL
02-10 08:34:12.107 7985 8203 I WifiP2pNative: Registering for interface available listener
02-10 08:34:12.107 7985 8203 D WifiP2pNative: P2P InterfaceAvailableListener true
02-10 08:34:12.107 7985 8203 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true, Number of clients=0
02-10 08:34:12.107 7985 8203 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
02-10 08:34:12.146 14908 14908 I hostapd : Processing hidl events on FD 3
02-10 08:34:12.147 14908 14908 I ServiceManagement: Registered android.hardware.wifi.hostapd@1.1::IHostapd/default (start delay of 43ms)
02-10 08:34:12.149 7985 8219 I android_os_HwBinder: HwBinder: Starting thread pool for getting: android.hardware.wifi.hostapd@1.0::IHostapd/default
02-10 08:34:12.150 7985 8219 I HostapdHal: Completed initialization of IHostapd.
02-10 08:34:12.333 2820 11839 I cnss-daemon: WLPS service connected
02-10 08:34:12.398 7985 8011 I EthernetTracker: interfaceLinkStateChanged, iface: wlan0, up: false
02-10 08:34:12.398 2588 2588 I WifiHAL : Initializing wifi
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: initialized exit socket pair
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: nlctrl family id: 16 group: host_logs mcast_id: 10
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: nlctrl family id: 16 group: fw_logs mcast_id: 11
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: nlctrl family id: 16 group: per_pkt_stats mcast_id: 12
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: nlctrl family id: 16 group: diag_events mcast_id: 13
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: nlctrl family id: 16 group: fatal_events mcast_id: 14
02-10 08:34:12.399 2588 2588 I CLD80211: /vendor/bin/hw/android.hardware.wifi@1.0-service: nlctrl family id: 16 group: oem_msgs mcast_id: 15
02-10 08:34:12.407 2820 2820 I cnss-daemon: nl80211 response handler invoked
02-10 08:34:12.407 2820 2820 I cnss-daemon: nl80211_response_handler: cmd 103, vendorID 4980, subcmd 10 received
02-10 08:34:12.408 2588 2588 D WifiHAL : wlan_service_read_sys_param: /proc/sys/net/ipv4/tcp_limit_output_bytes 506072
02-10 08:34:12.408 2588 2588 D WifiHAL : wlan_service_read_sys_param: /proc/sys/net/ipv4/tcp_adv_win_scale 2
02-10 08:34:12.409 2588 2588 I android.hardware.wifi@1.0-service: Adding interface handle for wlan0
02-10 08:34:12.409 2588 14913 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa
02-10 08:34:12.409 2588 2588 I android.hardware.wifi@1.0-service: Adding interface handle for wlan1
02-10 08:34:12.409 2588 2588 I android.hardware.wifi@1.0-service: Adding interface handle for p2p0
02-10 08:34:12.409 2588 2588 W android.hardware.wifi@1.0-service: No active wlan interfaces in use! Using default
02-10 08:34:12.409 2588 2588 W android.hardware.wifi@1.0-service: No active wlan interfaces in use! Using default
02-10 08:34:12.413 2588 2588 I android.hardware.wifi@1.0-service: Configured chip in mode 3
02-10 08:34:12.413 2588 2588 W android.hardware.wifi@1.0-service: No active wlan interfaces in use! Using default
02-10 08:34:12.413 2588 2588 W libc : Unable to set property "wifi.active.interface" to "wlan0": error code: 0x18
02-10 08:34:12.413 2588 2588 E android.hardware.wifi@1.0-service: Failed to set active wlan iface name property: Operation not permitted
02-10 08:34:12.414 7985 8202 D HalDevMgr: updateRttController: no one is interested in RTT controllers
02-10 08:34:12.414 2588 2588 I android.hardware.wifi@1.0-service: AP MAC randomization enabled
02-10 08:34:12.415 7985 8011 I EthernetTracker: interfaceLinkStateChanged, iface: wlan1, up: false
02-10 08:34:12.417 7985 8011 I EthernetTracker: interfaceLinkStateChanged, iface: wlan1, up: false
02-10 08:34:12.419 2588 2588 W libc : Unable to set property "wifi.active.interface" to "wlan1": error code: 0x18
02-10 08:34:12.419 2588 2588 E android.hardware.wifi@1.0-service: Failed to set active wlan iface name property: Operation not permitted
02-10 08:34:12.423 7985 8203 D WifiP2pNative: P2P InterfaceAvailableListener false
02-10 08:34:12.423 7985 8203 D WifiP2pService: Wifi enabled=false, P2P Interface availability=false
02-10 08:34:12.424 7985 8202 D WificondControl: Setting up interface for soft ap mode
02-10 08:34:12.426 7834 7856 I netd : interfaceGetCfg("wlan1") <0.38ms>
02-10 08:34:12.426 7985 8202 I WifiNative: Interface state changed on Iface:{Name=wlan1,Id=1,Type=AP}, isUp=true
02-10 08:34:12.426 7985 8202 I WifiNative: Successfully setup Iface:{Name=wlan1,Id=1,Type=AP}
02-10 08:34:12.427 7985 8202 E SupplicantStaIfaceHal: checkHalVersionByInterfaceName: called but mServiceManager is null
02-10 08:34:12.427 7985 8202 E SupplicantStaIfaceHal: Method getKeyMgmtCapabilities is not supported in existing HAL
02-10 08:34:12.432 7985 8022 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.net.wifi.WIFI_AP_STATE_CHANGED flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
02-10 08:34:12.433 7985 7985 D WifiService: handleWifiApStateChange: currentState=12 previousState=11 errorCode= -1 ifaceName=wlan1 mode=1
02-10 08:34:12.440 8543 9052 D QCNEJ/WlanSapInfoRelay: WIFI_AP_STATE_CHANGED_ACTION received with wifiApState = 12prevApState = 11
02-10 08:34:12.440 8543 9052 I QCNEJ/NativeHalConnector: -> SND notifyWifiApStateChanged(12, 11)
02-10 08:34:12.491 14908 14908 I hostapd : Add interface 'wlan1'
02-10 08:34:12.509 14908 14908 I hostapd : rfkill: Cannot open RFKILL control device
02-10 08:34:12.510 14908 14908 E hostapd : Using interface wlan1 with hwaddr c6:71:4b:21:8e:02 and ssid "AndroidAP"
02-10 08:34:12.520 7835 7835 I wificond: New channel on frequency: 5560 with bandwidth: 20MHz with HT
02-10 08:34:12.585 2588 14913 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa5
02-10 08:34:12.586 2820 2820 I cnss-daemon: nl80211 response handler invoked
02-10 08:34:12.587 2820 2820 I cnss-daemon: nl80211_response_handler: cmd 103, vendorID 4980, subcmd 165 received
02-10 08:34:12.589 2820 2820 E cnss-daemon: wlan_service_rps_enable: unable to open /sys/class/net/wlan1/queues/rx-0/rps_cpus
02-10 08:34:12.592 7985 8011 I EthernetTracker: interfaceLinkStateChanged, iface: wlan1, up: true
02-10 08:34:12.594 7985 8011 I EthernetTracker: interfaceLinkStateChanged, iface: wlan1, up: true
02-10 08:34:12.597 14908 14908 I hostapd : wlan1: interface state UNINITIALIZED->ENABLED
02-10 08:34:12.597 2588 14913 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0x65
02-10 08:34:12.597 14908 14908 I hostapd : wlan1: AP-ENABLED
02-10 08:34:12.598 14908 14908 I hostapd : wlan1: IEEE 802.11 driver had channel switch: freq=5560, ht=1, vht_ch=0x0, offset=0, width=1 (20 MHz), cf1=5560, cf2=0
02-10 08:34:12.598 14908 14908 I hostapd : wlan1: IEEE 802.11 driver had channel switch: freq=5560, ht=1, vht_ch=0x0, offset=0, width=1 (20 MHz), cf1=5560, cf2=0
02-10 08:34:12.598 14908 14908 I hostapd : wlan1: AP-CSA-FINISHED freq=5560 dfs=0
02-10 08:34:12.599 2820 2820 I cnss-daemon: nl80211 response handler invoked
02-10 08:34:12.599 2820 2820 I cnss-daemon: nl80211_response_handler: cmd 103, vendorID 4980, subcmd 101 received
02-10 08:34:12.602 7985 8202 I WifiVendorHal: Driver: 5.1.1.75M Firmware: FW:1.0.1.496.0 HW:HW_VERSION=40050000.
02-10 08:34:12.608 7985 8202 D WifiDiags: startLogging() iface list is {wlan1} after adding wlan1
02-10 08:34:12.608 7985 8202 D SoftApManager: Soft AP is started
02-10 08:34:12.609 7834 7856 I netd : interfaceGetCfg("wlan1") <0.37ms>
02-10 08:34:12.609 7985 8202 D SoftApManager: SoftAp is ready for use
02-10 08:34:12.611 7985 7985 D WifiService: handleWifiApStateChange: currentState=13 previousState=12 errorCode= -1 ifaceName=wlan1 mode=1
02-10 08:34:12.611 7985 8202 D SoftApManager: Timeout delay: 600000
02-10 08:34:12.612 7985 8022 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.net.wifi.WIFI_AP_STATE_CHANGED flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
02-10 08:34:12.612 8543 9052 D QCNEJ/WlanSapInfoRelay: WIFI_AP_STATE_CHANGED_ACTION received with wifiApState = 13prevApState = 12
02-10 08:34:12.613 8543 9052 I QCNEJ/NativeHalConnector: -> SND notifyWifiApStateChanged(13, 12)
02-10 08:34:12.616 7985 8202 D SoftApManager: Resetting num stations on start
02-10 08:34:12.617 7985 8202 E WifiNative: Could not get Iface object for interface null
02-10 08:34:12.618 7985 8202 D SoftApManager: Channel switched. Frequency: 5560 Bandwidth: 2
02-10 08:34:12.618 7834 7856 I netd : interfaceGetCfg("wlan1") <0.33ms>
02-10 08:34:12.619 7834 7856 I netd : interfaceGetCfg("wlan1") <0.19ms>
02-10 08:34:12.620 7834 7856 I netd : interfaceGetCfg("wlan1") <0.17ms>
02-10 08:34:12.625 9136 9136 D DPMJ : |SERVICE| DPM received action android.net.conn.TETHER_STATE_CHANGED
02-10 08:34:12.625 7834 7846 E Netd : Removing unknown address 192.168.43.101/24 from ifindex 45
02-10 08:34:12.625 9136 9136 D DPMJ : |SERVICE| available = 1 active = 0 errored = 0
02-10 08:34:12.629 7834 7856 I netd : interfaceSetCfg() <4.86ms>
02-10 08:34:12.631 9136 9136 D DPMJ : |SERVICE| Tethering disabled
02-10 08:34:12.632 7834 7856 D TetherController: tetherInterface(wlan1)
02-10 08:34:12.640 7834 7856 I netd : tetherInterfaceAdd("wlan1") <7.87ms>
02-10 08:34:12.642 7834 7856 I netd : interfaceGetCfg("wlan1") <0.57ms>
02-10 08:34:12.649 7834 7850 I netd : tetherGetStats() <7.88ms>
02-10 08:34:12.656 7834 7834 E Netd : getIfIndex: cannot find interface wlan1
02-10 08:34:12.656 7834 7834 E Netd : inconceivable! added interface wlan1 with no index
02-10 08:34:12.656 7834 7834 I netd : networkAddInterface(99, "wlan1") <13.39ms>
02-10 08:34:12.661 7834 14919 I netd : networkAddRoute(99, "wlan1", "192.168.43.0/24", "") <0.35ms>
02-10 08:34:12.663 7834 14919 I netd : networkAddRoute(99, "wlan1", "fe80::/64", "") <0.45ms>
02-10 08:34:12.667 7985 8485 I WifiService: acquireMulticastLock uid=10139
02-10 08:34:12.675 9136 9136 D DPMJ : |SERVICE| DPM received action android.net.conn.TETHER_STATE_CHANGED
02-10 08:34:12.675 9136 9136 D DPMJ : |SERVICE| available = 0 active = 1 errored = 0
02-10 08:34:12.677 7985 8013 I WifiService: updateInterfaceIpState uid=1000
02-10 08:34:12.677 7985 8202 D WifiService: updateInterfaceIpState: ifaceName=wlan1 mode=1 previous mode= null
02-10 08:34:12.677 7834 14919 D TetherController: Setting IP forward enable = 1
02-10 08:34:12.678 7834 14919 I netd : ipfwdEnableForwarding("tethering") <0.23ms>
02-10 08:34:12.678 7834 14919 D TetherController: Starting tethering services
02-10 08:34:12.681 7834 14919 D TetherController: Tethering services running
02-10 08:34:12.682 7834 14919 I netd : tetherStart([]) <3.27ms>
02-10 08:34:12.683 7834 7834 I netd : tetherGetStats() <3.58ms>
02-10 08:34:12.700 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
02-10 08:34:12.714 14924 14924 I dnsmasq : started, version 2.51 cachesize 150
02-10 08:34:12.714 14924 14924 I dnsmasq : compile time options: IPv6 GNU-getopt no-I18N DHCP no-scripts
02-10 08:34:12.714 14924 14924 W dnsmasq : warning: no upstream servers configured
02-10 08:34:12.714 14924 14924 I dnsmasq : read /etc/hosts - 2 addresses
02-10 08:34:12.714 14924 14924 I dnsmasq : Closing wildcard listener family=2
02-10 08:34:12.714 14924 14924 I dnsmasq : Closing wildcard listener family=10
02-10 08:34:12.899 2588 14913 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xa
02-10 08:34:12.899 2820 2820 I cnss-daemon: nl80211 response handler invoked
02-10 08:34:12.899 2820 2820 I cnss-daemon: nl80211_response_handler: cmd 103, vendorID 4980, subcmd 10 received
02-10 08:34:13.700 7985 8013 W ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
02-10 08:34:13.702 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
02-10 08:34:14.702 7985 8013 W ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
02-10 08:34:14.703 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
...
ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default and ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default... repeats several times.
...
02-10 08:35:26.890 7985 8013 W ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
02-10 08:35:26.892 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
02-10 08:35:27.894 7985 8013 W ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
02-10 08:35:27.896 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
02-10 08:35:28.898 7985 8013 W ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
02-10 08:35:28.900 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
02-10 08:35:29.901 7985 8013 W ServiceManagement: Waited one second for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default
02-10 08:35:29.904 7985 8013 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
02-10 08:35:30.324 7985 8018 W Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in handler on i/o thread (android.io)
02-10 08:35:30.328 7985 8018 W Watchdog: android.io annotated stack trace:
02-10 08:35:30.332 7985 8022 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
02-10 08:35:30.334 7985 8018 W Watchdog: at com.android.server.connectivity.tethering.OffloadHardwareInterface.configOffload(Native Method)
02-10 08:35:30.334 7985 8018 W Watchdog: at com.android.server.connectivity.tethering.OffloadHardwareInterface.initOffloadConfig(OffloadHardwareInterface.java:99)
02-10 08:35:30.335 7985 8018 W Watchdog: at com.android.server.connectivity.tethering.OffloadController.start(OffloadController.java:140)
02-10 08:35:30.335 7985 8018 W Watchdog: at com.android.server.connectivity.Tethering$TetherMasterSM$OffloadWrapper.start(Tethering.java:1623)
02-10 08:35:30.336 7985 8018 W Watchdog: at com.android.server.connectivity.Tethering$TetherMasterSM$TetherModeAliveState.enter(Tethering.java:1416)
02-10 08:35:30.336 7985 8018 W Watchdog: at com.android.internal.util.StateMachine$SmHandler.invokeEnterMethods(StateMachine.java:1037)
02-10 08:35:30.336 7985 8018 W Watchdog: at com.android.internal.util.StateMachine$SmHandler.performTransitions(StateMachine.java:879)
02-10 08:35:30.337 7985 8018 W Watchdog: at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:819)
02-10 08:35:30.344 7985 8018 W Watchdog: at android.os.Handler.dispatchMessage(Handler.java:107)
02-10 08:35:30.344 7985 8018 W Watchdog: at android.os.Looper.loop(Looper.java:214)
02-10 08:35:30.344 7985 8018 W Watchdog: at android.os.HandlerThread.run(HandlerThread.java:67)
02-10 08:35:30.344 7985 8018 W Watchdog: at com.android.server.ServiceThread.run(ServiceThread.java:44)
02-10 08:35:30.344 7985 8018 W Watchdog: *** GOODBYE!

I tried to disable Tethering hardware acceleration in Developer options and it fixed this issue.

Could you please check this and fix tethering offload or make it disabled by default if it can't be fixed?

Thank you!