The line I modified is the place that entering and line exit.
And when step into the function main_loop_wait(false);
the stack-trace are like this:

NtWaitForMultipleObjects (@NtWaitForMultipleObjects:8)
WaitForMultipleObjectsEx (@WaitForMultipleObjectsEx:59)
g_pattern_match_simple (@g_pattern_match_simple:221)
g_pattern_match_simple (@g_pattern_match_simple:336)
g_poll (@g_poll:207)
qemu_poll_ns (c:\work\xemu\qemu\util\qemu-timer.c:350)
os_host_main_loop_wait (c:\work\xemu\qemu\util\main-loop.c:452)
main_loop_wait (c:\work\xemu\qemu\util\main-loop.c:520)
char_socket_server_test (c:\work\xemu\qemu\tests\test-char.c:862)
g_test_summary (@g_test_summary:353)
g_test_summary (@g_test_summary:247)
g_test_summary (@g_test_summary:247)
g_test_summary (@g_test_summary:247)
g_test_summary (@g_test_summary:247)
g_test_run_suite (@g_test_run_suite:54)
g_test_run (@g_test_run:9)
main (c:\work\xemu\qemu\tests\test-char.c:1563)
__tmainCRTStartup (@__tmainCRTStartup:142)
mainCRTStartup (@1400014f6..140001539:3)
BaseThreadInitThunk (@BaseThreadInitThunk:9)

I submit this patch is looking for reviewer to help me fixes this randomly issue

Signed-off-by: Yonggang Luo <luoyongg...@gmail.com>
---
 tests/test-char.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-char.c b/tests/test-char.c
index 80e5bac61a..207004f38c 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -1065,6 +1065,7 @@ static void char_socket_client_test(gconstpointer opaque)
 
     /* Wait for the server to go away */
     while (data.event == -1) {
+        /* This is the place getting stuck */
         main_loop_wait(false);
     }
     g_assert(data.event == CHR_EVENT_CLOSED);
-- 
2.28.0.windows.1


Reply via email to