SM-T320 randomly fatal crashes then bootloops for a bit Samsung Galaxy Tab Pro 8.4 Wi-Fi (SM-T320 or mondrianwifiue)
Rooted with cf auto root using superSu v2.82
custom recovery TWRP 3.1.1-0
Android version stock 4.4.2
Kernel version 3.4.0-4441590


Within android OS the tablet randomly crashes and then bootloops when disconnected from the charger. Intrestingly though during the bootloop sometimes the screen flickers before shutting down and rebooting. 

The bootloop stops after being shutdown for a while or if the charger get's plugged into the tablet.

Oddly however, when booted into the custom recovery TWRP there is no issue. Even if entering TWRP during the bootloop. The bootloop stop until trying to boot back into the system.

I recorded a logcat of an initial crash.
As far as kernel logs here is the Dmesg after the bootloop. The last_kmsg was blank.

I suspect the battery connection is the culprit but I do not know why there is no issues within TWRP.

Does this look like a software issue or a hardware issue?

Thank you
You are right about the battery connection; try this trick: 1. Hold down power button for 10-15 sec while keeping it plugged in 2. When the tablet powers down and shows charging indicator, remove the cable and it should simulate removing the battery.

There was a constant error with sec_fuelgauge which is a process that regulates battery on hardware level. Check to see error at line 955 and so on later.