You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2006/08/02 20:40:44 UTC
Re: svn commit: r428008 - /httpd/httpd/trunk/server/mpm/winnt/child.c
mturk@apache.org wrote:
>
> URL: http://svn.apache.org/viewvc?rev=428008&view=rev
> Log:
> Fix the assertion if the WaitForMutipleObjects
> returns WAIT_ABANDONED_NN instead presumed
> WAIT_OBJECT_NN. This will correctly close the thread
> handle without using invalid thread handle array index.
>
> Spotted when large balancer timeout was set
> and all the threads were busy waiting for the
> connection:
> [Wed Aug 02 14:29:58 2006] [crit] [Wed Aug 02 14:29:58 2006] file \\build-2.2.2\\server\\mpm\\winnt\\child.c, line 1120, assertion "(rv >= 0) && (rv < threads_created)" failed
I believe this patch is incorrect. Study the commit to the win32 poll
in apr which modified this behavior and the long dialog about that issue
on list and in http://issues.apache.org/bugzilla/show_bug.cgi?id=38410
It seems that WAIT_ABANDONED should simply result in a continue
here reiterating over wait_for_many_objects.
Thoughts?
Bill
> --- httpd/httpd/trunk/server/mpm/winnt/child.c (original)
> +++ httpd/httpd/trunk/server/mpm/winnt/child.c Wed Aug 2 07:36:24 2006
> @@ -1120,7 +1120,10 @@
> while (threads_created) {
> rv = wait_for_many_objects(threads_created, child_handles, (DWORD)(end_time - time(NULL)));
> if (rv != WAIT_TIMEOUT) {
> - rv = rv - WAIT_OBJECT_0;
> + if (rv >= WAIT_ABANDONED_0)
> + rv = rv - WAIT_ABANDONED_0;
> + else
> + rv = rv - WAIT_OBJECT_0;
Re: svn commit: r428008 - /httpd/httpd/trunk/server/mpm/winnt/child.c
Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
>
> It seems that WAIT_ABANDONED should simply result in a continue
> here reiterating over wait_for_many_objects.
>
> Thoughts?
>
I'll try and see if that fixes the ABANDONED.
According to the MSDN it should.
Anyhow even for the normal WAIT_OBJECT_NN the
wait_for_many_objects returned wrong index, because
the dwIndex was not taken into account, so for
thread #64 signaled, the #0 was returned, and so forth.
--
Mladen.