Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mono] enable_checked_build_thread trigger warning as error #90362

Open
srxqds opened this issue Aug 11, 2023 · 9 comments
Open

[mono] enable_checked_build_thread trigger warning as error #90362

srxqds opened this issue Aug 11, 2023 · 9 comments

Comments

@srxqds
Copy link
Contributor

srxqds commented Aug 11, 2023

F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(430) : error C2220: the following warning is treated as an error
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(249) : error C2220: the following warning is treated as an error
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(375) : error C2220: the following warning is treated as an error
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(249) : warning C4715: 'mono_threads_transition_detach': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(552) : error C2220: the following warning is treated as an error
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(430) : warning C4715: 'mono_threads_transition_state_poll': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(602) : warning C4715: 'mono_threads_transition_request_pulse': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(375) : warning C4715: 'mono_threads_transition_peek_blocking_suspend_requested': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(552) : warning C4715: 'mono_threads_transition_request_resume': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(655) : warning C4715: 'mono_threads_transition_abort_async_suspend': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(761) : warning C4715: 'mono_threads_transition_do_blocking': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(809) : warning C4715: 'mono_threads_transition_done_blocking': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(709) : warning C4715: 'mono_threads_transition_finish_async_suspend': not all control paths return a value
F:\dotnet\runtime\src\mono\mono\utils\mono-threads-state-machine.c(887) : warning C4715: 'mono_threads_transition_abort_blocking': not all control paths return a value

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 11, 2023
@srxqds
Copy link
Contributor Author

srxqds commented Aug 14, 2023

when i enable_checked_build_thread flag, it always hit assert, like mono_string_length

Error: Assertion failure in thread 00000000000047FC due to: F:\netease-gitlab\dotnet\runtime\src\mono\mono\metadata\object-internals.h:1965: Expected GC Unsafe mode but was in STATE_BLOCKING state
Last 2 state transitions: (most recent first)
[DONE_BLOCKING] STATE_BLOCKING -> RUNNING (0) 0 at:
	no backtrace available
[DO_BLOCKING] RUNNING -> STATE_BLOCKING (0) 0 at:
	no backtrace available

mono_string_length (MonoString *s)
{
MONO_EXTERNAL_ONLY (int, mono_string_length_internal (s));
}

Should we replace MONO_EXTERNAL_ONLY with MONO_EXTERNAL_ONLY_GC_UNSAFE here?

@lateralusX ,could you have time to toke look it?

@SamMonoRT SamMonoRT removed the untriaged New issue has not been triaged by the area owner label Aug 15, 2023
@SamMonoRT SamMonoRT added this to the 9.0.0 milestone Aug 15, 2023
@lateralusX
Copy link
Member

lateralusX commented Aug 28, 2023

when i enable_checked_build_thread flag, it always hit assert, like mono_string_length

Error: Assertion failure in thread 00000000000047FC due to: F:\netease-gitlab\dotnet\runtime\src\mono\mono\metadata\object-internals.h:1965: Expected GC Unsafe mode but was in STATE_BLOCKING state
Last 2 state transitions: (most recent first)
[DONE_BLOCKING] STATE_BLOCKING -> RUNNING (0) 0 at:
	no backtrace available
[DO_BLOCKING] RUNNING -> STATE_BLOCKING (0) 0 at:
	no backtrace available

mono_string_length (MonoString *s)
{
MONO_EXTERNAL_ONLY (int, mono_string_length_internal (s));
}

Should we replace MONO_EXTERNAL_ONLY with MONO_EXTERNAL_ONLY_GC_UNSAFE here?

@lateralusX ,could you have time to toke look it?

There are several functions in src\native\public\mono\metadata\details\object-functions.h that doesn't do transition to GC unsafe that in turn will call internal functions that will require GC unsafe that will hit same assertion as above. Doing GC transitions is costly, especially for small functions like mono_string_length, mono_string_chars, so not sure if this is an optimization, assuming that caller should already been in GC unsafe mode when calling these methods or if it has been overlooked, @lambdageek do you know if we have taken a decision on some simple functions to put responsibility to transition to GC unsafe on caller before calling these functions, doing a GC unsafe transition as part of mono_string_length seems like a big overhead.

@lateralusX
Copy link
Member

I will take a look at the warnings next time I'm around that code, we don't build the runtime in checked mode on all platforms on CI, so that is why these warnings (treated as errors) have gone undetected.

@srxqds
Copy link
Contributor Author

srxqds commented Aug 29, 2023

@lambdageek do you know if we have taken a decision on some simple functions to put responsibility to transition to GC unsafe on caller before calling these functions, doing a GC unsafe transition as part of mono_string_length seems like a big overhead.

could you take time to check this? how to fix it, remove the assert or add gc transition @lambdageek

@srxqds
Copy link
Contributor Author

srxqds commented Aug 29, 2023

and when I enabled build check, we hit assert_gc_safe_mode, the callstack show blew:

 	coreclr.dll!assert_gc_safe_mode(const char * file, int lineno) 行 379	C
 	coreclr.dll!win32_wait_for_single_object_ex_interrupt_checked(_MonoThreadInfo * info, void * handle, unsigned long timeout, int alertable) 行 126	C
 	coreclr.dll!win32_wait_for_single_object_ex(void * handle, unsigned long timeout, int alertable, int cooperative) 行 143	C
 	coreclr.dll!mono_win32_wait_for_single_object_ex(void * handle, unsigned long timeout, int alertable) 行 155	C
 	coreclr.dll!mono_os_sem_timedwait(void * * sem, unsigned int timeout_ms, MonoSemFlags flags) 行 19	C
 	coreclr.dll!mono_os_sem_wait(void * * sem, MonoSemFlags flags) 行 326	C
 	coreclr.dll!mono_thread_info_wait_for_resume(_MonoThreadInfo * info) 行 238	C
 	coreclr.dll!mono_threads_state_poll_with_info(_MonoThreadInfo * info) 行 152	C
 	coreclr.dll!mono_threads_enter_gc_safe_region_unbalanced_with_info(_MonoThreadInfo * info, _MonoStackData * stackdata) 行 327	C
 	coreclr.dll!mono_threads_enter_gc_safe_region_unbalanced_internal(_MonoStackData * stackdata) 行 289	C
 	coreclr.dll!mono_threads_exit_gc_unsafe_region_unbalanced_internal(void * cookie, _MonoStackData * stackdata) 行 562	C
 	coreclr.dll!mono_threads_exit_gc_unsafe_region_internal(void * cookie, _MonoStackData * stackdata) 行 542	C
 	coreclr.dll!mono_object_get_class(_MonoObject * obj) 行 6521	C
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 426	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 440	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 440	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 440	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoStackTraceWalkWithArgument(void * InFrame, void * ctx, void * UserData) 行 678	C++
 	coreclr.dll!mono_invoke_walk_excepction_stack_hook(MonoStackFrameInfo * frame, void * ctx) 行 134	C
>	coreclr.dll!mono_handle_exception_internal(MonoContext * ctx, _MonoObject * obj, int resume, _MonoJitInfo * * out_ji) 行 2488	C
 	coreclr.dll!mono_handle_exception(MonoContext * ctx, void * void_obj) 行 2831	C

and the thread transitions log:

[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_object_get_class
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_class_is_valuetype
[DO_BLOCKING][000000000000B46C] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[DONE_BLOCKING][000000000000B46C] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_thread_info_suspend_lock_with_info
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_class_get_fields
------ BEGIN GLOBAL OP sp 0 rp 0 ap 0 wd 0 po 0 (sp + rp + ap == wd) (wd == po)
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[STW-BEGIN][000000000000B46C] *** BEGIN SUSPEND *** 
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_field_get_value
[SUSPEND_INIT_REQUESTED][0000000000000A54] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[STW-BEGIN-SUSPEND-0] SUSPEND thread 0000000000000A54 skip false
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_type_is_byref
[SUSPEND_INIT_REQUESTED][0000000000001914] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[STW-BEGIN-SUSPEND-0] SUSPEND thread 0000000000001914 skip false
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_object_get_class
[SUSPEND_INIT_REQUESTED][00000000000019A4] RUNNING . -> ASYNC_SUSPEND_REQUESTED . (0 -> 1) 
[DO_BLOCKING][00000000000019A4] ASYNC_SUSPEND_REQUESTED . -> ASYNC_SUSPEND_REQUESTED . (1 -> 1) 
added 00000000000019A4 to pending suspend
FINISH SELF SUSPEND OF 00000000000019A4
[STW-BEGIN-SUSPEND-0] SUSPEND thread 00000000000019A4 skip false
[STATE_POLL][00000000000019A4] ASYNC_SUSPEND_REQUESTED . -> SELF_SUSPENDED . (1 -> 1) 
[SUSPEND_INIT_REQUESTED][00000000000029A8] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 
[INITIATOR-NOTIFY-SUSPEND] 00000000000019A4
[STW-BEGIN-SUSPEND-0] SUSPEND thread 00000000000029A8 skip false
**WAIT self-resume 00000000000019A4
[SUSPEND_INIT_REQUESTED][0000000000003474] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 

can you tell me what cause this problem?

@srxqds
Copy link
Contributor Author

srxqds commented Aug 29, 2023

I have tried to dump the stack variable when exception occured.
the mono_invoke_walk_excepction_stack_hook code show blew:

void
mono_invoke_walk_excepction_stack_hook (MonoStackFrameInfo *frame, void *ctx)
{
	if (walk_exception_stack_hook) {
		MONO_ENTER_GC_SAFE;
		walk_exception_stack_hook (frame, ctx, walk_exception_stack_hook_data);
		MONO_EXIT_GC_SAFE;
	}
}

and call in mono_handle_exception_internal after get unwinder_unwind_frame:

unwind_res = unwinder_unwind_frame (&unwinder, jit_tls, NULL, ctx, &new_ctx, NULL, &lmf, NULL, &frame);
			if (!unwind_res) {
				*(mono_get_lmf_addr ()) = lmf;

				jit_tls->abort_func (obj);
				g_assert_not_reached ();
			}
			mono_invoke_walk_excepction_stack_hook (&frame, ctx);
			in_interp = FALSE;

@lateralusX
Copy link
Member

and when I enabled build check, we hit assert_gc_safe_mode, the callstack show blew:

 	coreclr.dll!assert_gc_safe_mode(const char * file, int lineno) 行 379	C
 	coreclr.dll!win32_wait_for_single_object_ex_interrupt_checked(_MonoThreadInfo * info, void * handle, unsigned long timeout, int alertable) 行 126	C
 	coreclr.dll!win32_wait_for_single_object_ex(void * handle, unsigned long timeout, int alertable, int cooperative) 行 143	C
 	coreclr.dll!mono_win32_wait_for_single_object_ex(void * handle, unsigned long timeout, int alertable) 行 155	C
 	coreclr.dll!mono_os_sem_timedwait(void * * sem, unsigned int timeout_ms, MonoSemFlags flags) 行 19	C
 	coreclr.dll!mono_os_sem_wait(void * * sem, MonoSemFlags flags) 行 326	C
 	coreclr.dll!mono_thread_info_wait_for_resume(_MonoThreadInfo * info) 行 238	C
 	coreclr.dll!mono_threads_state_poll_with_info(_MonoThreadInfo * info) 行 152	C
 	coreclr.dll!mono_threads_enter_gc_safe_region_unbalanced_with_info(_MonoThreadInfo * info, _MonoStackData * stackdata) 行 327	C
 	coreclr.dll!mono_threads_enter_gc_safe_region_unbalanced_internal(_MonoStackData * stackdata) 行 289	C
 	coreclr.dll!mono_threads_exit_gc_unsafe_region_unbalanced_internal(void * cookie, _MonoStackData * stackdata) 行 562	C
 	coreclr.dll!mono_threads_exit_gc_unsafe_region_internal(void * cookie, _MonoStackData * stackdata) 行 542	C
 	coreclr.dll!mono_object_get_class(_MonoObject * obj) 行 6521	C
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 426	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 440	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 440	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 440	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoVariableDump(_MonoType * t, void * addr, int indent, void * user_data) 行 476	C++
 	UE4Editor-UnrealMonoRuntime.dll!MonoStackTraceWalkWithArgument(void * InFrame, void * ctx, void * UserData) 行 678	C++
 	coreclr.dll!mono_invoke_walk_excepction_stack_hook(MonoStackFrameInfo * frame, void * ctx) 行 134	C
>	coreclr.dll!mono_handle_exception_internal(MonoContext * ctx, _MonoObject * obj, int resume, _MonoJitInfo * * out_ji) 行 2488	C
 	coreclr.dll!mono_handle_exception(MonoContext * ctx, void * void_obj) 行 2831	C

and the thread transitions log:

[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_object_get_class
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_class_is_valuetype
[DO_BLOCKING][000000000000B46C] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[DONE_BLOCKING][000000000000B46C] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_thread_info_suspend_lock_with_info
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_class_get_fields
------ BEGIN GLOBAL OP sp 0 rp 0 ap 0 wd 0 po 0 (sp + rp + ap == wd) (wd == po)
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[STW-BEGIN][000000000000B46C] *** BEGIN SUSPEND *** 
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_field_get_value
[SUSPEND_INIT_REQUESTED][0000000000000A54] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[STW-BEGIN-SUSPEND-0] SUSPEND thread 0000000000000A54 skip false
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_type_is_byref
[SUSPEND_INIT_REQUESTED][0000000000001914] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 
[DO_BLOCKING][00000000000019A4] RUNNING . -> STATE_BLOCKING . (0 -> 0) 
[STW-BEGIN-SUSPEND-0] SUSPEND thread 0000000000001914 skip false
[ABORT_BLOCKING][00000000000019A4] STATE_BLOCKING . -> RUNNING . (0 -> 0) mono_object_get_class
[SUSPEND_INIT_REQUESTED][00000000000019A4] RUNNING . -> ASYNC_SUSPEND_REQUESTED . (0 -> 1) 
[DO_BLOCKING][00000000000019A4] ASYNC_SUSPEND_REQUESTED . -> ASYNC_SUSPEND_REQUESTED . (1 -> 1) 
added 00000000000019A4 to pending suspend
FINISH SELF SUSPEND OF 00000000000019A4
[STW-BEGIN-SUSPEND-0] SUSPEND thread 00000000000019A4 skip false
[STATE_POLL][00000000000019A4] ASYNC_SUSPEND_REQUESTED . -> SELF_SUSPENDED . (1 -> 1) 
[SUSPEND_INIT_REQUESTED][00000000000029A8] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 
[INITIATOR-NOTIFY-SUSPEND] 00000000000019A4
[STW-BEGIN-SUSPEND-0] SUSPEND thread 00000000000029A8 skip false
**WAIT self-resume 00000000000019A4
[SUSPEND_INIT_REQUESTED][0000000000003474] STATE_BLOCKING . -> STATE_BLOCKING_SUSPEND_REQUESTED . (0 -> 1) 

can you tell me what cause this problem?

I believe that happens since win32_wait_for_single_object_ex can be called with a coop flag and depending if we are are calling that function in "coop" mode we will transition to GC safe before calling win32_wait_for_single_object_ex_interrupt_checked, but since that function is called from both code paths and anticipate that we have entered GC safe, that will trigger assert. win32_wait_for_single_object_ex is a low level PAL function, that's why it has an option to call WaitForSingleObjectEx without always doing GC SAFE, since it might be called from code already in GC safe mode, or like in this case, called from code that is in the process of entering GC safe mode.

Fix is probably something along these lines in runtime\src\mono\mono\utils\mono-os-wait-win32.c (changed from win32_wait_for_single_object_ex_interrupt_checked to WaitForSingleObjectEx in case cooperative is FALSE).

static DWORD
win32_wait_for_single_object_ex (HANDLE handle, DWORD timeout, BOOL alertable, BOOL cooperative)
{
	DWORD result = WAIT_FAILED;
	MonoThreadInfo * const info = alertable ? mono_thread_info_current_unchecked () : NULL;

	WIN32_ENTER_ALERTABLE_WAIT (info);

	if (cooperative) {
		MONO_ENTER_GC_SAFE;
		result = win32_wait_for_single_object_ex_interrupt_checked (info, handle, timeout, alertable);
		MONO_EXIT_GC_SAFE;
	} else {
		result = WaitForSingleObjectEx (handle, timeout, alertable);
	}

	WIN32_LEAVE_ALERTABLE_WAIT (info);

	return result;
}

@srxqds
Copy link
Contributor Author

srxqds commented Aug 30, 2023

ok, thanks
another quesion hit on android:

[2023.08.30-10.03.23:727][121]MonoVM: Error: Assertion failure in thread 0x7aac4fbcb0 due to: Received cookie 0x7aafe61800 but expected 0x0

Last 2 state transitions: (most recent first)
[ABORT_BLOCKING] RUNNING -> RUNNING (0) 0 at:
	no backtrace available
[ABORT_BLOCKING] RUNNING -> RUNNING (0) 0 at:
	no backtrace available

the code from:

static void
coop_tls_pop (gpointer received_cookie)
{
	GArray *stack;
	gpointer expected_cookie;

	stack = (GArray*)mono_native_tls_get_value (coop_reset_count_stack_key);
	if (!stack || 0 == stack->len)
		mono_fatal_with_history ("Received cookie %p but found no stack at all\n", received_cookie);

	expected_cookie = g_array_index (stack, gpointer, stack->len - 1);
	stack->len --;

	if (0 == stack->len) {
		g_array_free (stack,TRUE);
		mono_native_tls_set_value (coop_reset_count_stack_key, NULL);
	}

	if (expected_cookie != received_cookie)
		mono_fatal_with_history ("Received cookie %p but expected %p\n", received_cookie, expected_cookie);
}

i have print the push and pop operator:

coop tls push cookie: 0x0 stack len: 3 at thread: 0x7a3736bcb0
coop tls pop cookie: 0x0 stack len: 4 at thread: 0x7a3736bcb0
[ABORT_BLOCKING][0x7a3736bcb0] RUNNING . -> RUNNING . (0 -> 0) (null)
coop tls push cookie: 0x0 stack len: 3 at thread: 0x7a3736bcb0
coop tls pop cookie: 0x0 stack len: 4 at thread: 0x7a3736bcb0
coop tls pop cookie: 0x0 stack len: 3 at thread: 0x7a3736bcb0
coop tls pop cookie: 0x7a4d1f0c00 stack len: 2 at thread: 0x7a3736bcb0

how can I found what problem is it?

@srxqds
Copy link
Contributor Author

srxqds commented Aug 31, 2023

hi,could you help me? @lateralusX

I found some coop tls push 0x0 not pop, show bellow:

coop tls push cookie: 0x7a2a9f9000 stack len: 0 at thread: 0x7a5d1bbcb0
coop tls push cookie: 0x0 stack len: 1 at thread: 0x7a5d1bbcb0 // this line not pop bofore 0x7a2a9f9000

coop tls push cookie: 0x0 stack len: 2 at thread: 0x7a5d1bbcb0
coop tls pop cookie: 0x0 stack len: 3 at thread: 0x7a5d1bbcb0
coop tls pop cookie: 0x7a2a9f9000 stack len: 2 at thread: 0x7a5d1bbcb0

maybe it occured when gc

It is diffcult to find the problem due to there are many push/pop operator.

@mangod9 mangod9 modified the milestones: 9.0.0, Future Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants