[Xiaomi Redmi Note 5 / 5 Plus ROMs, Kernels, Recove] moralesnery:
Hi there everybody.

In the last two builds for our device, I've been facing a strange issue: Some times, If I enable mobile data and the phone switches from wifi to mobile data, the phone freezes and

a) There's a soft reboot (systemui restarts), or

b) A blank screen of death ensues and a forced reboot is needed (pressing the power button for around 5 seconds)

Is anybody having the same problem?

I'll update this post with log files if it happens again.

Thanks in advance

-------------

UPDATE: Well, it's still happening.

The device is running the latest build, and the latest firmware (Chinese 9/5/30). Checking the logcat I've found this strange exception when the "soft reboot" happens (line 2656 of the logcat txt file I'm attaching)

[06-12 10:15:23.809 1857:2126 E/AndroidRuntime]
*** FATAL EXCEPTION IN SYSTEM PROCESS: ConnectivityServiceThread
java.lang.IllegalStateException: command '119 network permission network clear 102' failed with '400 119 setPermissionForNetworks() failed (No such file or directory)'
at com.android.server.NetworkManagementService.setNetworkPermission(NetworkManagementService.java:2687)
at com.android.server.ConnectivityService.updateCapabilities(ConnectivityService.java:5027)
at com.android.server.ConnectivityService.rematchNetworkAndRequests(ConnectivityService.java:5477)
at com.android.server.ConnectivityService.rematchAllNetworksAndRequests(ConnectivityService.java:5609)
at com.android.server.ConnectivityService.disconnectAndDestroyNetwork(ConnectivityService.java:2587)
at com.android.server.ConnectivityService.updateNetworkInfo(ConnectivityService.java:5740)
at com.android.server.ConnectivityService.access$1500(ConnectivityService.java:202)
at com.android.server.ConnectivityService$NetworkStateTrackerHandler.maybeHandleNetworkAgentMessage(ConnectivityService.java:2253)
at com.android.server.ConnectivityService$NetworkStateTrackerHandler.handleMessage(ConnectivityService.java:2391)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.android.server.NativeDaemonConnector$NativeDaemonFailureException: command '119 network permission network clear 102' failed with '400 119 setPermissionForNetworks() failed (No such file or directory)'
at com.android.server.NativeDaemonConnector.executeForList(NativeDaemonConnector.java:515)
at com.android.server.NativeDaemonConnector.execute(NativeDaemonConnector.java:411)
at com.android.server.NativeDaemonConnector.execute(NativeDaemonConnector.java:406)
at com.android.server.NetworkManagementService.setNetworkPermission(NetworkManagementService.java:2684)
... 11 more

after this exception there's a lot of "debug" traces and "system died" messages in the txt:

[06-12 10:15:24.330 9343:9343 F/DEBUG]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

[06-12 10:15:24.330 9343:9343 F/DEBUG]
Build fingerprint: 'xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V10.0.6.0.OEIMIFH:user/release-keys'
[I][COLOR="DarkRed"](wtf, this is vince not whyred)[/COLOR][/I]

[06-12 10:15:24.330 9343:9343 F/DEBUG]
Revision: '0'

[06-12 10:15:24.330 9343:9343 F/DEBUG]
ABI: 'arm'

[06-12 10:15:24.330 9343:9343 F/DEBUG]
pid: 8446, tid: 8524, name: ChromiumNet >>> com.google.android.youtube <<<

[06-12 10:15:24.330 9343:9343 F/DEBUG]
signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x5500bd3e

[06-12 10:15:24.330 9343:9343 F/DEBUG]
r0 00000000 r1 816e66eb r2 004300e2 r3 00000000

[06-12 10:15:24.330 9343:9343 F/DEBUG]
r4 e2a8ca00 r5 00000009 r6 0000aaaa r7 537e84d8

[06-12 10:15:24.330 9343:9343 F/DEBUG]
r8 ec40be28 r9 537e851c r10 e2a4b800 r11 00000000

[06-12 10:15:24.330 9343:9343 F/DEBUG]
ip 00000025 sp 537e83f8 lr 5500bde9 pc 5500bd3e

after this part of the file, system processes seem to "restart" in the logcat, and the phone can be used normally. This only happens the first time you try to switch from wifi to mobile data, and is not always happening. I've seen the same behavior (systemui crashes) being reported in other ROM threads (without logcats), but idk if those are the same. I hope this info helps solving the issue.