You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While most of the methods in fdhandle.c release the mutex lock after getting an error, such as mono_fdhandle_try_insert, mono_fdhandle_lookup_and_ref, mono_fdhandle_close, etc... the mono_fdhandle_insert doesn't do it, so if for some reason I got a duplicated socket error, the mono_fdhandle_insert will fail calling the g_error without releasing the mutex lock. Consequently, after that I'm getting the error mono_os_mutex_trylock: pthread_mutex_trylock failed with "Error code '142'", since it seems that other threads cannot lock the mutex since it is already locked.
To summarize, I would like to understand if not releasing the mutex lock after getting an error in the mono_fdhandle_insert is intentional, in that case, why we cannot release the mutex as we do in the other functions. Since it's a core method, I guess that it should be made intentionally @luhenry.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
While most of the methods in
fdhandle.c
release the mutex lock after getting an error, such asmono_fdhandle_try_insert
,mono_fdhandle_lookup_and_ref
,mono_fdhandle_close
, etc... themono_fdhandle_insert
doesn't do it, so if for some reason I got a duplicated socket error, themono_fdhandle_insert
will fail calling the g_error without releasing the mutex lock. Consequently, after that I'm getting the errormono_os_mutex_trylock
:pthread_mutex_trylock failed with "Error code '142'"
, since it seems that other threads cannot lock the mutex since it is already locked.To summarize, I would like to understand if not releasing the mutex lock after getting an error in the
mono_fdhandle_insert
is intentional, in that case, why we cannot release the mutex as we do in the other functions. Since it's a core method, I guess that it should be made intentionally @luhenry.Beta Was this translation helpful? Give feedback.
All reactions