[Xiaomi Redmi Note 5 Pro ROMs, Kernels, Recoveries,] cdutsov:
I have a serious problem with Bluetooth. If I turn it off it can't be turned on again and it keeps crashing. Logcat:

05-21 11:59:27.361 778 4806 E vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
05-21 11:59:33.021 778 4806 E vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
05-21 11:59:38.182 1268 1370 E LightsService: Light requested not available on this device. 2
05-21 11:59:38.559 1268 1558 E LightsService: Light requested not available on this device. 2
05-21 11:59:38.629 4774 4795 E bt_btif : btif_hf_upstreams_evt: Invalid index 18007
05-21 11:59:38.648 4774 4774 E BluetoothMapService: mSessionStatusHandler.sendMessage() dispatched shutdown message
05-21 11:59:38.656 4774 4911 E bt_btif : SOCK_LIST: free(id = 2) - NO app_fd!
05-21 11:59:38.693 4774 4795 E bt_btif : btif_in_execute_service_request: Unknown service 27 being disabled
05-21 11:59:38.702 4774 4911 E bt_btif : SOCK_LIST: free(id = 1) - NO app_fd!
05-21 11:59:38.709 4774 4911 E bt_btif : SOCK_LIST: free(id = 3) - NO app_fd!
05-21 11:59:38.721 4774 4795 E BtGatt.ContextMap: Context not found for ID 5
05-21 11:59:38.739 4774 4880 E bt_btif : bta_gattc_deregister: Deregister Failed unknown client cif
05-21 11:59:38.769 4774 4880 E bt_btif : bta_jv_disable
05-21 11:59:40.024 4774 4795 E bt_btif : btif_sm_get_state : Invalid handle
05-21 11:59:40.940 778 4806 E vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
05-21 11:59:41.217 778 778 E vendor.qti.bluetooth@1.0-power_manager:
05-21 11:59:41.217 778 778 E vendor.qti.bluetooth@1.0-power_manager: bt_power_cherokee enable (0)
05-21 11:59:41.225 778 778 E vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
05-21 11:59:41.263 4774 4790 E BluetoothServiceJni: Callback: 'callback_thread_event' is not called on the correct thread
05-21 11:59:43.751 1268 23179 E LightsService: Light requested not available on this device. 2
05-21 11:59:48.681 1268 1357 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=1818768 mSleepTimeMs=33297 mIdleTimeMs=-1602 mTxTimeMs[]=[245, 181, 8, 0, 0] mRxTimeMs=5397 mEnergyUsed=0}
05-21 11:59:49.241 1268 1558 E LightsService: Light requested not available on this device. 2
05-21 11:59:49.519 23189 23206 E bt_osi_alarm: timer_create_internal unable to create timer with clock 7: Operation not permitted
05-21 11:59:49.519 23189 23206 F : [0521/115949:FATAL:alarm.cc(178)] Check failed: false.
05-21 11:59:49.522 23189 23206 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 23206 (stack_manager), pid 23189 (droid.bluetooth)
05-21 11:59:49.598 23210 23210 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-21 11:59:49.599 23210 23210 F DEBUG : LineageOS Version: '15.1-20180509-UNOFFICIAL-whyred'
05-21 11:59:49.599 23210 23210 F DEBUG : Build fingerprint: 'xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.6.0.OEIMIFA:user/release-keys'
05-21 11:59:49.599 23210 23210 F DEBUG : Revision: '0'
05-21 11:59:49.599 23210 23210 F DEBUG : ABI: 'arm64'
05-21 11:59:49.599 23210 23210 F DEBUG : pid: 23189, tid: 23206, name: stack_manager >>> com.android.bluetooth <<<
05-21 11:59:49.599 23210 23210 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
05-21 11:59:49.604 23210 23210 F DEBUG : Abort message: '[0521/115949:FATAL:alarm.cc(178)] Check failed: false.
05-21 11:59:49.604 23210 23210 F DEBUG : '
05-21 11:59:49.604 23210 23210 F DEBUG : x0 0000000000000000 x1 0000000000005aa6 x2 0000000000000006 x3 0000000000000008
05-21 11:59:49.604 23210 23210 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000080
05-21 11:59:49.604 23210 23210 F DEBUG : x8 0000000000000083 x9 feeff9eaffb84d46 x10 0000000000000000 x11 ffffffffffffffff
05-21 11:59:49.604 23210 23210 F DEBUG : x12 0101010101010101 x13 0000000000000038 x14 ffffffffffffffff x15 0000c36e50696a79
05-21 11:59:49.604 23210 23210 F DEBUG : x16 0000000289ce6fa8 x17 000000770670a598 x18 0000000000000044 x19 0000000000005a95
05-21 11:59:49.604 23210 23210 F DEBUG : x20 0000000000005aa6 x21 0000000000000083 x22 000000766b5d0588 x23 000000766b8aa000
05-21 11:59:49.604 23210 23210 F DEBUG : x24 000000766b5cf2c1 x25 0000007684cc0da8 x26 0000000000000000 x27 000000766b5cf8e1
05-21 11:59:49.604 23210 23210 F DEBUG : x28 0000000000000000 x29 000000766b5cf280 x30 00000077066bdb3c
05-21 11:59:49.604 23210 23210 F DEBUG : sp 000000766b5cf240 pc 00000077066bdb5c pstate 0000000060000000
05-21 11:59:49.658 23210 23210 F DEBUG :
05-21 11:59:49.658 23210 23210 F DEBUG : backtrace:
05-21 11:59:49.658 23210 23210 F DEBUG : #00 pc 000000000001db5c /system/lib64/libc.so (abort+112)
05-21 11:59:49.658 23210 23210 F DEBUG : #01 pc 0000000000083660 /system/lib64/libchrome.so (base::debug::BreakDebugger()+20)
05-21 11:59:49.658 23210 23210 F DEBUG : #02 pc 000000000009b498 /system/lib64/libchrome.so (logging::LogMessage::~LogMessage()+1060)
05-21 11:59:49.658 23210 23210 F DEBUG : #03 pc 000000000019c518 /system/lib64/hw/bluetooth.default.so (alarm_new_internal(char const*, bool)+692)
05-21 11:59:49.658 23210 23210 F DEBUG : #04 pc 000000000008bd68 /system/lib64/hw/bluetooth.default.so (init()+1220)
05-21 11:59:49.658 23210 23210 F DEBUG : #05 pc 000000000019b5f8 /system/lib64/hw/bluetooth.default.so (module_init(module_t const*)+132)
05-21 11:59:49.658 23210 23210 F DEBUG : #06 pc 00000000000cf6fc /system/lib64/hw/bluetooth.default.so (event_init_stack(void*)+148)
05-21 11:59:49.658 23210 23210 F DEBUG : #07 pc 00000000001a7fc8 /system/lib64/hw/bluetooth.default.so (work_queue_read_cb(void*)+92)
05-21 11:59:49.658 23210 23210 F DEBUG : #08 pc 00000000001a61b8 /system/lib64/hw/bluetooth.default.so (run_reactor(reactor_t*, int)+320)
05-21 11:59:49.658 23210 23210 F DEBUG : #09 pc 00000000001a604c /system/lib64/hw/bluetooth.default.so (reactor_start(reactor_t*)+84)
05-21 11:59:49.658 23210 23210 F DEBUG : #10 pc 00000000001a7a60 /system/lib64/hw/bluetooth.default.so (run_thread(void*)+176)
05-21 11:59:49.658 23210 23210 F DEBUG : #11 pc 0000000000069dfc /system/lib64/libc.so (__pthread_start(void*)+36)
05-21 11:59:49.658 23210 23210 F DEBUG : #12 pc 000000000001effc /system/lib64/libc.so (__start_thread+68)
05-21 11:59:50.382 966 966 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_10
05-21 11:59:51.628 23220 23236 E bt_osi_alarm: timer_create_internal unable to create timer with clock 7: Operation not permitted
05-21 11:59:51.630 23220 23236 F : [0521/115951:FATAL:alarm.cc(178)] Check failed: false.
05-21 11:59:51.630 23220 23236 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 23236 (stack_manager), pid 23220 (droid.bluetooth)
05-21 11:59:51.701 23240 23240 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-21 11:59:51.701 23240 23240 F DEBUG : LineageOS Version: '15.1-20180509-UNOFFICIAL-whyred'
05-21 11:59:51.701 23240 23240 F DEBUG : Build fingerprint: 'xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.6.0.OEIMIFA:user/release-keys'
05-21 11:59:51.701 23240 23240 F DEBUG : Revision: '0'
05-21 11:59:51.701 23240 23240 F DEBUG : ABI: 'arm64'
05-21 11:59:51.701 23240 23240 F DEBUG : pid: 23220, tid: 23236, name: stack_manager >>> com.android.bluetooth <<<
05-21 11:59:51.701 23240 23240 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
05-21 11:59:51.705 23240 23240 F DEBUG : Abort message: '[0521/115951:FATAL:alarm.cc(178)] Check failed: false.
05-21 11:59:51.705 23240 23240 F DEBUG : '
05-21 11:59:51.705 23240 23240 F DEBUG : x0 0000000000000000 x1 0000000000005ac4 x2 0000000000000006 x3 0000000000000008
05-21 11:59:51.705 23240 23240 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000080
05-21 11:59:51.705 23240 23240 F DEBUG : x8 0000000000000083 x9 feeff9eaffb84d46 x10 0000000000000000 x11 ffffffffffffffff
05-21 11:59:51.705 23240 23240 F DEBUG : x12 0101010101010101 x13 0000000000000038 x14 ffffffffffffffff x15 0000c9a754e96047
05-21 11:59:51.705 23240 23240 F DEBUG : x16 0000000289ce6fa8 x17 000000770670a598 x18 0000000000000044 x19 0000000000005ab4
05-21 11:59:51.705 23240 23240 F DEBUG : x20 0000000000005ac4 x21 0000000000000083 x22 000000766b5c9588 x23 000000766bc64000
05-21 11:59:51.705 23240 23240 F DEBUG : x24 000000766b5c82c1 x25 0000007684cc0da8 x26 0000000000000000 x27 000000766b5c88e1
05-21 11:59:51.705 23240 23240 F DEBUG : x28 0000000000000000 x29 000000766b5c8280 x30 00000077066bdb3c
05-21 11:59:51.705 23240 23240 F DEBUG : sp 000000766b5c8240 pc 00000077066bdb5c pstate 0000000060000000
05-21 11:59:51.748 23240 23240 F DEBUG :
05-21 11:59:51.748 23240 23240 F DEBUG : backtrace:
05-21 11:59:51.748 23240 23240 F DEBUG : #00 pc 000000000001db5c /system/lib64/libc.so (abort+112)
05-21 11:59:51.748 23240 23240 F DEBUG : #01 pc 0000000000083660 /system/lib64/libchrome.so (base::debug::BreakDebugger()+20)
05-21 11:59:51.748 23240 23240 F DEBUG : #02 pc 000000000009b498 /system/lib64/libchrome.so (logging::LogMessage::~LogMessage()+1060)
05-21 11:59:51.748 23240 23240 F DEBUG : #03 pc 000000000019c518 /system/lib64/hw/bluetooth.default.so (alarm_new_internal(char const*, bool)+692)
05-21 11:59:51.748 23240 23240 F DEBUG : #04 pc 000000000008bd68 /system/lib64/hw/bluetooth.default.so (init()+1220)
05-21 11:59:51.748 23240 23240 F DEBUG : #05 pc 000000000019b5f8 /system/lib64/hw/bluetooth.default.so (module_init(module_t const*)+132)
05-21 11:59:51.748 23240 23240 F DEBUG : #06 pc 00000000000cf6fc /system/lib64/hw/bluetooth.default.so (event_init_stack(void*)+148)
05-21 11:59:51.748 23240 23240 F DEBUG : #07 pc 00000000001a7fc8 /system/lib64/hw/bluetooth.default.so (work_queue_read_cb(void*)+92)
05-21 11:59:51.748 23240 23240 F DEBUG : #08 pc 00000000001a61b8 /system/lib64/hw/bluetooth.default.so (run_reactor(reactor_t*, int)+320)
05-21 11:59:51.748 23240 23240 F DEBUG : #09 pc 00000000001a604c /system/lib64/hw/bluetooth.default.so (reactor_start(reactor_t*)+84)
05-21 11:59:51.748 23240 23240 F DEBUG : #10 pc 00000000001a7a60 /system/lib64/hw/bluetooth.default.so (run_thread(void*)+176)
05-21 11:59:51.748 23240 23240 F DEBUG : #11 pc 0000000000069dfc /system/lib64/libc.so (__pthread_start(void*)+36)
05-21 11:59:51.748 23240 23240 F DEBUG : #12 pc 000000000001effc /system/lib64/libc.so (__start_thread+68)
05-21 11:59:52.272 966 966 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_11
05-21 11:59:52.313 1268 1367 E BluetoothManagerService: MESSAGE_TIMEOUT_BIND
05-21 11:59:54.246 1268 1370 E LightsService: Light requested not available on this device. 2
05-21 11:59:56.616 23248 23264 E bt_osi_alarm: timer_create_internal unable to create timer with clock 7: Operation not permitted
05-21 11:59:56.617 23248 23264 F : [0521/115956:FATAL:alarm.cc(178)] Check failed: false.
05-21 11:59:56.617 23248 23264 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 23264 (stack_manager), pid 23248 (droid.bluetooth)
05-21 11:59:56.696 23269 23269 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-21 11:59:56.696 23269 23269 F DEBUG : LineageOS Version: '15.1-20180509-UNOFFICIAL-whyred'
05-21 11:59:56.696 23269 23269 F DEBUG : Build fingerprint: 'xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V9.5.6.0.OEIMIFA:user/release-keys'
05-21 11:59:56.696 23269 23269 F DEBUG : Revision: '0'
05-21 11:59:56.696 23269 23269 F DEBUG : ABI: 'arm64'
05-21 11:59:56.696 23269 23269 F DEBUG : pid: 23248, tid: 23264, name: stack_manager >>> com.android.bluetooth <<<
05-21 11:59:56.696 23269 23269 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
05-21 11:59:56.700 23269 23269 F DEBUG : Abort message: '[0521/115956:FATAL:alarm.cc(178)] Check failed: false.
05-21 11:59:56.700 23269 23269 F DEBUG : '
05-21 11:59:56.700 23269 23269 F DEBUG : x0 0000000000000000 x1 0000000000005ae0 x2 0000000000000006 x3 0000000000000008
05-21 11:59:56.700 23269 23269 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000080
05-21 11:59:56.700 23269 23269 F DEBUG : x8 0000000000000083 x9 feeff9eaffb84d46 x10 0000000000000000 x11 ffffffffffffffff
05-21 11:59:56.700 23269 23269 F DEBUG : x12 0101010101010101 x13 0000000000000038 x14 ffffffffffffffff x15 00009e6fe55451c0
05-21 11:59:56.700 23269 23269 F DEBUG : x16 0000000289ce6fa8 x17 000000770670a598 x18 0000000000000044 x19 0000000000005ad0
05-21 11:59:56.700 23269 23269 F DEBUG : x20 0000000000005ae0 x21 0000000000000083 x22 000000766b6c2588 x23 000000766b9db000
05-21 11:59:56.700 23269 23269 F DEBUG : x24 000000766b6c12c1 x25 000000767c814698 x26 0000000000000000 x27 000000766b6c18e1
05-21 11:59:56.700 23269 23269 F DEBUG : x28 0000000000000000 x29 000000766b6c1280 x30 00000077066bdb3c
05-21 11:59:56.700 23269 23269 F DEBUG : sp 000000766b6c1240 pc 00000077066bdb5c pstate 0000000060000000
05-21 11:59:56.745 23269 23269 F DEBUG :
05-21 11:59:56.745 23269 23269 F DEBUG : backtrace:
05-21 11:59:56.745 23269 23269 F DEBUG : #00 pc 000000000001db5c /system/lib64/libc.so (abort+112)
05-21 11:59:56.745 23269 23269 F DEBUG : #01 pc 0000000000083660 /system/lib64/libchrome.so (base::debug::BreakDebugger()+20)
05-21 11:59:56.745 23269 23269 F DEBUG : #02 pc 000000000009b498 /system/lib64/libchrome.so (logging::LogMessage::~LogMessage()+1060)
05-21 11:59:56.745 23269 23269 F DEBUG : #03 pc 000000000019c518 /system/lib64/hw/bluetooth.default.so (alarm_new_internal(char const*, bool)+692)
05-21 11:59:56.745 23269 23269 F DEBUG : #04 pc 000000000008bd68 /system/lib64/hw/bluetooth.default.so (init()+1220)
05-21 11:59:56.746 23269 23269 F DEBUG : #05 pc 000000000019b5f8 /system/lib64/hw/bluetooth.default.so (module_init(module_t const*)+132)
05-21 11:59:56.746 23269 23269 F DEBUG : #06 pc 00000000000cf6fc /system/lib64/hw/bluetooth.default.so (event_init_stack(void*)+148)
05-21 11:59:56.746 23269 23269 F DEBUG : #07 pc 00000000001a7fc8 /system/lib64/hw/bluetooth.default.so (work_queue_read_cb(void*)+92)
05-21 11:59:56.746 23269 23269 F DEBUG : #08 pc 00000000001a61b8 /system/lib64/hw/bluetooth.default.so (run_reactor(reactor_t*, int)+320)
05-21 11:59:56.746 23269 23269 F DEBUG : #09 pc 00000000001a604c /system/lib64/hw/bluetooth.default.so (reactor_start(reactor_t*)+84)
05-21 11:59:56.746 23269 23269 F DEBUG : #10 pc 00000000001a7a60 /system/lib64/hw/bluetooth.default.so (run_thread(void*)+176)
05-21 11:59:56.746 23269 23269 F DEBUG : #11 pc 0000000000069dfc /system/lib64/libc.so (__pthread_start(void*)+36)
05-21 11:59:56.746 23269 23269 F DEBUG : #12 pc 000000000001effc /system/lib64/libc.so (__start_thread+68)
05-21 11:59:57.245 966 966 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_12