Lsm6dsox interrupt task

What’s the callstack / backtrace ? Find out which call of your code finally caused the assertion to maybe get an idea what’s wrong.
However, I guess you didn’t setup the NVIC interrupt priority correctly as I already mentioned. Did you verify your chosen priority ?
When in doubt, have a look at this related documentation:

and this very good forum posts: