[Xiaomi Mi 4i] arafsheikh:
The ROM does have a battery drain issue. I did some digging and the problem is most probably linked to mm-pp-daemon. The daemon tries to link libcamera_shim.so which doesn't exist, so it recursively keeps on trying and spawns infinite processes.

This error repeats indefinitely in the logcat:

12-22 03:56:24.055 11511 11511 F libc : CANNOT LINK EXECUTABLE "/system/bin/mm-pp-daemon": library "libcamera_shim.so" not found
12-22 03:56:24.055 11511 11511 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 11511 (mm-pp-daemon)
12-22 03:56:24.056 254 254 W : debuggerd: handling request: pid=11511 uid=1000 gid=1000 tid=11511
12-22 03:56:24.112 11512 11512 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-22 03:56:24.120 11512 11512 F DEBUG : CM Version: '14.1-20161217-UNOFFICIAL-ferrari'
12-22 03:56:24.120 11512 11512 F DEBUG : Build fingerprint: 'Xiaomi/cm_ferrari/ferrari:7.1.1/NMF26Q/ca37441bf2:userdebug/test-keys'
12-22 03:56:24.120 11512 11512 F DEBUG : Revision: '0'
12-22 03:56:24.120 11512 11512 F DEBUG : ABI: 'arm64'
12-22 03:56:24.120 11512 11512 F DEBUG : pid: 11511, tid: 11511, name: mm-pp-daemon >>> /system/bin/mm-pp-daemon <<<
12-22 03:56:24.120 11512 11512 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
12-22 03:56:24.121 11512 11512 F DEBUG : x0 0000000000000000 x1 0000000000002cf7 x2 0000000000000006 x3 0000000000000008
12-22 03:56:24.121 11512 11512 F DEBUG : x4 0000000000000000 x5 0000000000000060 x6 fefeff7e8e0bc93c x7 7f7f7f7fff7fff7f
12-22 03:56:24.121 11512 11512 F DEBUG : x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
12-22 03:56:24.121 11512 11512 F DEBUG : x12 0000000000000018 x13 0000000000000000 x14 0000000000000000 x15 000350616bbfe254
12-22 03:56:24.121 11512 11512 F DEBUG : x16 0000000000000003 x17 12eeee1a8db2ca50 x18 000000000000003a x19 0000007f8f0f6b40
12-22 03:56:24.121 11512 11512 F DEBUG : x20 0000000000000006 x21 0000007f8f0f6a98 x22 0000000000000002 x23 0000007f8f02d020
12-22 03:56:24.121 11512 11512 F DEBUG : x24 0000000000000016 x25 0000007fe63e1600 x26 0000007f8f0341b8 x27 0000007f8f0cc956
12-22 03:56:24.121 11512 11512 F DEBUG : x28 0000007f8f034010 x29 0000007fe63e1470 x30 0000007f8f0b58a0
12-22 03:56:24.121 11512 11512 F DEBUG : sp 0000007fe63e1450 pc 0000007f8f0b6414 pstate 0000000060000000
12-22 03:56:24.125 11512 11512 F DEBUG :
12-22 03:56:24.125 11512 11512 F DEBUG : backtrace:
12-22 03:56:24.126 11512 11512 F DEBUG : #00 pc 0000000000077414 /system/bin/linker64 (__dl_tgkill+8)
12-22 03:56:24.126 11512 11512 F DEBUG : #01 pc 000000000007689c /system/bin/linker64 (__dl_pthread_kill+64)
12-22 03:56:24.126 11512 11512 F DEBUG : #02 pc 0000000000069f8c /system/bin/linker64 (__dl_raise+24)
12-22 03:56:24.126 11512 11512 F DEBUG : #03 pc 0000000000067930 /system/bin/linker64 (__dl_abort+52)
12-22 03:56:24.126 11512 11512 F DEBUG : #04 pc 0000000000069b1c /system/bin/linker64 (__dl___libc_fatal+104)
12-22 03:56:24.126 11512 11512 F DEBUG : #05 pc 0000000000010fdc /system/bin/linker64 (__dl__ZL29__linker_init_post_relocationR19KernelArgumentBlocky+6296)
12-22 03:56:24.126 11512 11512 F DEBUG : #06 pc 000000000000f6a4 /system/bin/linker64 (__dl___linker_init+528)
12-22 03:56:24.126 11512 11512 F DEBUG : #07 pc 0000000000006cec /system/bin/linker64 (_start+4)
12-22 03:56:24.177 1447 2831 W NativeCrashListener: Couldn't find ProcessRecord for pid 11511
12-22 03:56:24.179 254 254 W : debuggerd: resuming target 11511
12-22 03:56:24.179 254 254 E : debuggerd: failed to send signal 18 to target: No such process
12-22 03:56:24.181 1447 1541 I BootReceiver: Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)

Is this a known issue?