apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41243] New: - Several apr_thread_cond_signal() may wake up only one waiting thread
Date Tue, 26 Dec 2006 13:41:45 GMT
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=41243>.
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=41243

           Summary: Several apr_thread_cond_signal() may wake up only one
                    waiting thread
           Product: APR
           Version: 1.2.8
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: salikh.zakirov@intel.com


the current implementation of apr_thread_cond_signal() on Windows
has a deficiency: it may lose several concurrent or sequential
apr_thread_cond_signal() calls if more than one thread is waiting on a condition
variable, because there is no count of the number of signal() calls,
and only one woken up thread will really come out of the loop.

As far as I can see, APR condition variables are meant as a portable
replacement for pthread condition variable, however, the lost signal()
behaviour is not compliant with pthread_cond_signal() specification [1]:

	The pthread_cond_signal() function shall unblock at least one of the
	threads that are blocked on the specified condition variable cond
	(if any threads are blocked on cond).

DRLVM [2] is using APR as its porting layer, however, due to the lost signal()
issue it is forced to use its own implementation of conditional variables,
currently arranged as an APR patch [3] (not really a patch, but a couple of
files replaced).

[1] http://www.unix.org/single_unix_specification/, pthread_cond_signal() page
[2] http://harmony.apache.org/subcomponents/drlvm/index.html
[3]
http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c?view=markup
http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h?view=markup

-- 
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@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message