Forum Discussion
I further used gdb to tracy the state of the autorun kernels as the following pic shows. Totally, six threads are running in the same time, one date loader, one consumer, four autorun kernels.
It can been seen that whenever the autorun kernel restarts, a new thread is created, and when it finishes, the corresponding thread will exits (as the blue and green markers shows).
It looks like that in the final round of execution, the red threads (two autorun kernels) successfully exits while the yellow threads restarted but did not exist (because in the last round of execution, they are not needed.)
And when I re-start the data loaders and consumer, only two threads are created for the two autorun kernels that have successfully existed (red ones) in previous computations. Two are already there running (the yellow ones). In this case, the simulation hang up waiting for the yellow ones to execute.