Open zizhiyoumu-fuzz opened 5 years ago
The ktsan task data structures are cleaned up (destroyed) by ktsan_task_destroy
function. Please check its implementation.
This function is called in finish_task_switch
in case if the process is in DEAD state and its context need to be cleaned up.
Does it answer you question?
The function finish_task_switch I can found.But I find that in finish_task_switch function, it's unlikely prev_state is TASK_DEAD.When I fork and exit processes frequently, the ktsan_task_destroy is slower than create, the maximum number of threads is reached。How can I deal with it?
While testing , I found sometimes ktsan task is not destroy.At this time, task state is TASK_DEAD, but not enter finish_task_switch function.After adding some log, I found during context switch, task is switch.Why?When does ktsan task destroy?