Usually when this happens part of the sensor stack died (LHD (location hub) , GPS or sensor drivers itself) if any of these fail your sensors will fail, if it just happened out of no where with no changes to the OS it might be a sensorhub firmware bug, i doubt a hardware issue would just kill sensors, i would reflash without the 10bit rollback fix, if the issue persists, flash back oreo and reboot it couple times so the bcm firmware is forcefully updated on your device, assuming you boot it and sensors are broken.
rollover bug patch was fine last time i checked in this aspect, granted i have not been on the S7 in a while, being unable to update anything on it due to time constraints, not sure if/when ill ever get a chance to attempt to fix the remaining issues, it is annoying as they are hard to replicate, and affect random devices. (i.e camera random crash, audio mute, device freeze) something critical is broken in V6 that was escalated in V7 and im dumbfounded on what it is sadly.
i do still suspect it is something ****ed up in my kernel as i use pretty much the "same" ROM on my note 8 and that has been working flawlessly for over a year, as i still use it. so i dont know, i have to re-do the kernel at some point to try and get any results probably. which is a massive undertaking.