-
Notifications
You must be signed in to change notification settings - Fork 509
sched_yield infinite loop #7816
Comments
The application lost its response, and it was observed with strace that an infinite loop occurred during the call to sched_yield, suspected to occur during the GC. |
Might this be due to #7807 (comment) ? |
Thank you. The specific cause of this problem has not yet been found. In my source code, all loops have other calls, but the problem thread that has an infinite loop has only sched_yield calls. |
Could you please share the stacktrace that leads to the |
The stack information obtained using GDB is as follows:
After the thread 7 completes the program transaction, it triggers the GC action. After suspending all the threads, PalSwitchToThread() --> sched_yield () enters the infinite loop. |
This thread is waiting for other threads to reach GC safe point. Could you please check the stacktraces of the the other threads? You should fine a thread that is running inside a managed code and that this thread is waiting on. That other thread running inside managed code is the problem. |
This app is a web service program. It runs very stable on the mono and .net core platforms. Since the GC keeps all threads in a suspended state, other threads cannot continue to work.
|
Hmm, the stack traces do not ring any bells. It looks all normal. Could you please step through the loop in |
thank you for your help. |
Do you see that the loop inside Would you mind sharing the bit of code in |
This problem was temporarily resolved by modifying the epoll_wait call parameter. During the stress test, the program was not found to be stuck. Old code:
New code:
Whether this improvement can completely solve the problem, still need to continue to observe. |
The sched_yield()==0 infinite loop occurred during the running of the application, causing the process to block and fail to work.
The text was updated successfully, but these errors were encountered: