Currently, there are two easy ways to solve this question.
1, Add some output information in each function before that phenomena happens so that you can find what kind of events may trigger it. However, sometimes, in complex system (like Linux kernel), something happens with no clues and we may lose in the sky. Way 2 will make this solution better.
2, Call the function to output the call stack before the phenomena. In Linux kernel, just call dump_stack() function and you will find your way. Dump_stack() in Linux Kernel is used to output call stack information when there is a kernel crash/panic but we can also use it for debugging/tracing.