You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/02/01 14:05:12 UTC

DO NOT REPLY [Bug 38410] - apr/win32 misinterpreted the meaning of WAIT_ABANDONED

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38410>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38410





------- Additional Comments From kiyolee@hotmail.com  2006-02-01 14:05 -------
I am sure that's not the case.
Normally WaitForSingleObject() will return WAIT_OBJECT_0 and get out of the loop.
Only when the current owner got terminated (usually abnormally like crashing),
then it will return WAIT_ABANDONED and try again.
It is very unlikely all other potential owners got terminated so abnormally all
at the same time. Even when that happens, the current loop would become the
owner and no way it will get WAIT_ABANDONED and definitely it will break out of
the loop.
In other words, the loop will loop only for at maximum the number of processes
using the mutex minus 1.
Reminded WAIT_ABANDONED is an abnormal case and should rarely happen and the
loop is mainly to handle that properly. Anyway, the current implementation is
definitely wrong (returning APR_SUCCESS when the mutex is not actually
signalled) when that happens.
If APR_EAGAIN means that the user needs to call mutex_lock() again to really
acquire the mutex, then that is logically correct.
However, I would rather like to have the lower level code handle the abnormal
case. The application code calling mutex_lock() would be much simplier to worry
about only 2 return codes (APR_SUCCESS or APR_BUSY) instead of 3 (plus
APR_EAGAIN). Also consider everywhere calling mutex_lock() would then need to
have a loop handling APR_EAGAIN as the error code just can't be ignored.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org