Bug 11997 - NT MPM assertion "(rv >= 0) && (rv < threads_created)" failed
Summary: NT MPM assertion "(rv >= 0) && (rv < threads_created)" failed
Status: RESOLVED WORKSFORME
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_winnt (show other bugs)
Version: 2.0.59
Hardware: PC Windows Server 2003
: P1 major with 3 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://www.dmatech.net/ http://www.co...
Keywords:
: 34627 41591 42581 42858 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-08-23 22:11 UTC by David M. Andersen
Modified: 2012-10-26 18:31 UTC (History)
9 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David M. Andersen 2002-08-23 22:11:09 UTC
I have been getting strange errors in my log file.
I have my server-info at http://www.coe.uncc.edu/~danderse/serv-info.html

[Fri Aug 23 16:23:53 2002] [crit] [Fri Aug 23 16:23:53 2002] 
file .\server\mpm\winnt\child.c, line 994, assertion "(rv >= 0) && (rv < 
threads_created)" failed
[Fri Aug 23 16:24:21 2002] [error] [client 152.15.230.111] File does not exist: 
E:/htdocs/icons, referer: http://www.dmatech.net/ut/
[Fri Aug 23 16:24:50 2002] [notice] Child 1676: Terminating 1878053456 threads 
that failed to exit.
[Fri Aug 23 16:38:47 2002] [warn] (22564)The specified network name is no 
longer available.  : winnt_accept: Asynchronous AcceptEx failed.
[Fri Aug 23 16:40:25 2002] [error] [client 152.15.230.111] File does not exist: 
E:/Program Files/Apache Group/Apache/icons/unkpgif, referer: 
http://www.dmatech.net/ut/
[Fri Aug 23 16:40:29 2002] [error] [client 152.15.230.111] File does not exist: 
E:/Program Files/Apache Group/Apache/icons/unkpgif, referer: 
http://www.dmatech.net/ut/

The address http://www.dmatech.net/ut/ seems to have trouble in IE if refreshed 
a few times.  This might be due to the corruption of unknown.gif as shown in 
the log entry above.

The mpm_winnt module seems to be involved in one of these problems.  On Win98 
(using 2.0.39), none of these problems seemed to exist.

In addition, my throughput sometimes gets limited to about 30kB/sec even on the 
loopback interface.  Does anyone know what is causing this?

   - David M. Andersen
     danderse@uncc.edu
Comment 1 David M. Andersen 2002-08-23 22:36:27 UTC
(David M. Andersen) I have also gotten periodic crashes that appear to be null 
pointers being dereferenced.

Application popup: Apache.exe - Application Error : The instruction 
at "0x6ff1a35c" referenced memory at "0x00000000". The memory could not 
be "read".

Application popup: Apache.exe - Application Error : The exception Breakpoint
A breakpoint has been reached.
 (0x80000003) occurred in the application at location 0x77f7f570.

Comment 2 David M. Andersen 2002-08-24 03:36:25 UTC
At least some of these fatal errors have been generated in libhttpd.
Comment 3 William A. Rowe Jr. 2002-10-13 20:13:34 UTC
  I suspect this is related to a bug in the 2.0.40 release, specifically
  we failed to translate the current working environment table into utf-8,
  but upon invocation of the child process, CGIs etc... we attempt to
  translate an (anticipated) utf-8 environment into unicode.

  Try 2.0.43 and reopen this report if your strange bugs don't go away.

  Also note that the files' HREF names must be utf-8 encoded when requesting
  pages from Apache 2.0/Windows NT/2000/XP.  While the non-ascii filenames
  have never been defined formally, the Win32 port uses utf-8 filenames in
  order to serve all files, consistently between any installed Apache/NT server.
Comment 4 Acerola 2005-02-27 07:09:41 UTC
I just got a brand new server at servermatrix yesterday:

Celeron 2.4
Windows 2003 standart
Apache 2.0.53
PHP 4.3.10
eAccelerator (latest CVS)

Today I got on my log several times:

[Sun Feb 27 02:42:53 2005] [crit] [Sun Feb 27 02:42:53 2005] file C:
\\asf-build\\build-2.0.53\\server\\mpm\\winnt\\child.c, line 1074, assertion 
"(rv >= 0) && (rv < threads_created)" failed

My system also seemed to suffer from bug 21425. I applied the work around 
proposed there, but these log entries above still show up on the log once in a 
while.

Comment 5 Pavel Rubin 2005-04-27 07:33:39 UTC
*** Bug 34627 has been marked as a duplicate of this bug. ***
Comment 6 Leon 2006-01-28 18:58:40 UTC
Same error:
Xeon 2x2.8
Apache 2.0.55
Windows 2003 standart
php 5.0.5

[Mon Jan 23 00:32:13 2006] [notice] Parent: Received restart signal -- 
Restarting the server.
[Mon Jan 23 00:32:14 2006] [notice] Child 5912: Exit event signaled. Child 
process is ending.
[Mon Jan 23 00:32:15 2006] [notice] Child 5912: Released the start mutex
[Mon Jan 23 00:32:15 2006] [notice] Child 5912: Waiting for 129 worker threads 
to exit.
[Mon Jan 23 00:32:15 2006] [crit] [Mon Jan 23 00:32:15 2006] file C:\\asf-
build\\build-2.0.55\\server\\mpm\\winnt\\child.c, line 1078, assertion "(rv >= 
0) && (rv < threads_created)" failed
Comment 7 Razvan Marescu 2006-02-13 09:23:34 UTC
Hello,

I have the same bug
Dual 3.6 GHz Intel P4 Xeon
3584 RAM
Windows Server 2003 Standard Edition
--
Apache 2.0.55
PHP 5.0.5

[Sun Feb 12 23:19:43 2006] [notice] Child 7752: Waiting for 197 worker threads
to exit.
[Sun Feb 12 23:19:43 2006] [crit] [Sun Feb 12 23:19:43 2006] file
D:\\src\\win\\httpd-2.0.x\\server\\mpm\\winnt\\child.c, line 1078, assertion
"(rv >= 0) && (rv < threads_created)" failed
[Sun Feb 12 23:19:49 2006] [notice] Parent: Child process exited successfully.
[Sun Feb 12 23:19:57 2006] [notice] Digest: generating secret for digest
authentication ...
[Sun Feb 12 23:19:57 2006] [notice] Digest: done
[Sun Feb 12 23:19:57 2006] [notice] Apache configured -- resuming normal operations

While I get this error, the server it's still working. What this error involves?

Does anyone knows when this bug will be fixed?

Thanks
Comment 8 Liber Chen 2006-04-03 07:12:32 UTC
I have the same problem on Windows 2000 Server
P4 2.8Ghz, 512MB ram
Apache 2.0.55


[Tue Mar 21 15:53:17 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -
- resuming normal operations
[Tue Mar 21 15:53:17 2006] [notice] Server built: Oct  9 2005 19:16:56
[Tue Mar 21 15:53:17 2006] [notice] Parent: Created child process 3752
[Tue Mar 21 15:53:17 2006] [notice] Child 3752: Child process is running
[Tue Mar 21 15:53:17 2006] [notice] Child 3752: Acquired the start mutex.
[Tue Mar 21 15:53:17 2006] [notice] Child 3752: Starting 250 worker threads.
[Tue Mar 21 15:53:43 2006] [warn] (OS 121)Måj“™‘Ò祎žB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 15:53:43 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 15:53:48 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 15:53:55 2006] [error] [client 192.168.4.155] File does not exist: 
C:/Program Files/HomeMeeting/MMC Server/webapp/web/data
[Tue Mar 21 15:53:55 2006] [error] [client 192.168.4.155] File does not exist: 
C:/Program Files/HomeMeeting/MMC Server/webapp/web/wizard_m.jnj
[Tue Mar 21 15:53:56 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 15:53:57 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 15:53:59 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 15:54:04 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 16:16:01 2006] [notice] Parent: Received shutdown signal -- 
Shutting down the server.
[Tue Mar 21 16:16:01 2006] [notice] Child 3752: Exit event signaled. Child 
process is ending.
[Tue Mar 21 16:16:02 2006] [notice] Child 3752: Released the start mutex
[Tue Mar 21 16:16:03 2006] [notice] Child 3752: Waiting for 250 worker threads 
to exit.
[Tue Mar 21 16:16:03 2006] [notice] Child 3752: All worker threads have exited.
[Tue Mar 21 16:16:03 2006] [notice] Child 3752: Child process is exiting
[Tue Mar 21 16:16:03 2006] [notice] Parent: Child process exited successfully.
[Tue Mar 21 16:16:39 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -
- resuming normal operations
[Tue Mar 21 16:16:39 2006] [notice] Server built: Oct  9 2005 19:16:56
[Tue Mar 21 16:16:39 2006] [notice] Parent: Created child process 3052
[Tue Mar 21 16:16:39 2006] [notice] Child 3052: Child process is running
[Tue Mar 21 16:16:39 2006] [notice] Child 3052: Acquired the start mutex.
[Tue Mar 21 16:16:39 2006] [notice] Child 3052: Starting 250 worker threads.
[Tue Mar 21 16:21:43 2006] [notice] Parent: Received restart signal -- 
Restarting the server.
[Tue Mar 21 16:21:43 2006] [notice] Child 3052: Exit event signaled. Child 
process is ending.
[Tue Mar 21 16:21:43 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -
- resuming normal operations
[Tue Mar 21 16:21:43 2006] [notice] Server built: Oct  9 2005 19:16:56
[Tue Mar 21 16:21:43 2006] [notice] Parent: Created child process 1968
[Tue Mar 21 16:21:43 2006] [notice] Child 1968: Child process is running
[Tue Mar 21 16:21:44 2006] [notice] Child 3052: Released the start mutex
[Tue Mar 21 16:21:44 2006] [notice] Child 1968: Acquired the start mutex.
[Tue Mar 21 16:21:44 2006] [notice] Child 1968: Starting 250 worker threads.
[Tue Mar 21 16:21:45 2006] [notice] Child 3052: Waiting for 250 worker threads 
to exit.
[Tue Mar 21 16:21:45 2006] [notice] Child 3052: All worker threads have exited.
[Tue Mar 21 16:21:45 2006] [notice] Child 3052: Child process is exiting
[Tue Mar 21 17:13:27 2006] [notice] Parent: Received restart signal -- 
Restarting the server.
[Tue Mar 21 17:13:27 2006] [notice] Child 1968: Exit event signaled. Child 
process is ending.
[Tue Mar 21 17:13:27 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -
- resuming normal operations
[Tue Mar 21 17:13:27 2006] [notice] Server built: Oct  9 2005 19:16:56
[Tue Mar 21 17:13:28 2006] [notice] Parent: Created child process 2936
[Tue Mar 21 17:13:28 2006] [notice] Child 2936: Child process is running
[Tue Mar 21 17:13:28 2006] [notice] Child 1968: Released the start mutex
[Tue Mar 21 17:13:28 2006] [notice] Child 2936: Acquired the start mutex.
[Tue Mar 21 17:13:28 2006] [notice] Child 2936: Starting 250 worker threads.
[Tue Mar 21 17:13:29 2006] [notice] Child 1968: Waiting for 250 worker threads 
to exit.
[Tue Mar 21 17:13:29 2006] [notice] Child 1968: All worker threads have exited.
[Tue Mar 21 17:13:29 2006] [notice] Child 1968: Child process is exiting
[Tue Mar 21 17:20:43 2006] [error] [client 192.168.2.53] File does not exist: 
C:/Program Files/HomeMeeting/MMC Server/webapp/web/favicon.ico
[Tue Mar 21 17:20:46 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 17:20:50 2006] [warn] (OS 64)Žw’è“I–Ô˜H–¼âi–³–@Žg—pB  : winnt_accept: 
Asynchronous AcceptEx failed.
[Tue Mar 21 17:30:26 2006] [error] [client 192.168.2.53] File does not exist: 
C:/Program Files/HomeMeeting/MMC Server/webapp/web/favicon.ico
[Tue Mar 21 21:22:30 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -
- resuming normal operations
[Tue Mar 21 21:22:31 2006] [notice] Server built: Oct  9 2005 19:16:56
[Tue Mar 21 21:22:31 2006] [notice] Parent: Created child process 820
[Tue Mar 21 21:22:31 2006] [notice] Child 820: Child process is running
[Tue Mar 21 21:22:31 2006] [notice] Child 820: Acquired the start mutex.
[Tue Mar 21 21:22:31 2006] [notice] Child 820: Starting 250 worker threads.
[Wed Mar 22 09:29:33 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2 configured -
- resuming normal operations
[Wed Mar 22 09:29:33 2006] [notice] Server built: Oct  9 2005 19:16:56
[Wed Mar 22 09:29:33 2006] [notice] Parent: Created child process 836
[Wed Mar 22 09:29:33 2006] [notice] Child 836: Child process is running
[Wed Mar 22 09:29:34 2006] [notice] Child 836: Acquired the start mutex.
[Wed Mar 22 09:29:34 2006] [notice] Child 836: Starting 250 worker threads.
[Wed Mar 22 10:04:32 2006] [notice] Parent: Received shutdown signal -- 
Shutting down the server.
[Wed Mar 22 10:04:32 2006] [notice] Child 836: Exit event signaled. Child 
process is ending.
[Wed Mar 22 10:04:33 2006] [notice] Child 836: Released the start mutex
[Wed Mar 22 10:04:34 2006] [notice] Child 836: Waiting for 250 worker threads 
to exit.
[Wed Mar 22 10:04:34 2006] [notice] Child 836: All worker threads have exited.
[Wed Mar 22 10:04:34 2006] [notice] Child 836: Child process is exiting
[Wed Mar 22 10:04:34 2006] [notice] Parent: Child process exited successfully.
Comment 9 Peter Newman 2006-06-15 00:04:46 UTC
Windows 2000.
There is a known issue on this server, somehow there is a limit on the number of
concurrent processes (per user account, not sure). This stops us using piped
logs (thus the midnight restart signal). This could be related.
I guess that would make it not a bug in Apache, if thats shown to be the case.

[Wed Jun 14 00:00:01 2006] [notice] Parent: Received restart signal --
Restarting the server.
[Wed Jun 14 00:00:01 2006] [notice] Digest: generating secret for digest
authentication ...
[Wed Jun 14 00:00:01 2006] [notice] Digest: done
[Wed Jun 14 00:00:01 2006] [notice] Apache/2.0.55 (Win32) PHP/4.4.1 configured
-- resuming normal operations
[Wed Jun 14 00:00:01 2006] [notice] Server built: Oct  9 2005 19:16:56
[Wed Jun 14 00:00:01 2006] [notice] Parent: Created child process 968
[Wed Jun 14 00:00:02 2006] [notice] Child 1320: Exit event signaled. Child
process is ending.
[Wed Jun 14 00:00:03 2006] [notice] Child 1320: Released the start mutex
[Wed Jun 14 00:00:03 2006] [crit] master_main: create child process failed. Exiting.
[Wed Jun 14 00:00:03 2006] [notice] Parent: Forcing termination of child process
2341856 
[Wed Jun 14 00:00:04 2006] [notice] Child 1320: Waiting for 79 worker threads to
exit.
[Wed Jun 14 00:00:04 2006] [crit] [Wed Jun 14 00:00:04 2006] file
C:\\asf-build\\build-2.0.55\\server\\mpm\\winnt\\child.c, line 1078, assertion
"(rv >= 0) && (rv < threads_created)" failed
Comment 10 Alexander Alfimov 2007-06-01 00:31:57 UTC
The same situation for me.
Error log contains: file .\\server\mpm\winnt\child.c, line 1120, assertion "(rv 
>= 0) && (threads_created)" failed - right after (or before) I get winxp 
exception and suggestion to send report to MS.

The most annoting thing is that httpd process grows from 30Mb up to 200Mb after 
that, stops destroying threads even if I have these settings in config:

<IfModule mpm_winnt.c>
ThreadsPerChild 300
MaxRequestsPerChild  1
</IfModule>

EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx

Another annoying thing is that it starts to wait too much before starting to 
transfer any file (image, css) after such sort of crash in cases if I have 
MaxRequestsPerChild other than 1.

Thank you.
Comment 11 Ruediger Pluem 2007-06-01 02:42:55 UTC
*** Bug 41591 has been marked as a duplicate of this bug. ***
Comment 12 Davi Arnaut 2007-06-04 16:44:21 UTC
*** Bug 42581 has been marked as a duplicate of this bug. ***
Comment 13 Davi Arnaut 2007-06-08 09:38:32 UTC
(In reply to comment #10)
> The same situation for me.
> Error log contains: file .\\server\mpm\winnt\child.c, line 1120, assertion "(rv 
> >= 0) && (threads_created)" failed - right after (or before) I get winxp 
> exception and suggestion to send report to MS.
> 
> The most annoting thing is that httpd process grows from 30Mb up to 200Mb after 
> that, stops destroying threads even if I have these settings in config:
> 
> <IfModule mpm_winnt.c>
> ThreadsPerChild 300
> MaxRequestsPerChild  1
> </IfModule>
> 
> EnableMMAP off
> EnableSendfile off
> Win32DisableAcceptEx
> 
> Another annoying thing is that it starts to wait too much before starting to 
> transfer any file (image, css) after such sort of crash in cases if I have 
> MaxRequestsPerChild other than 1.
> 
> Thank you.

Could you try the patch at http://issues.apache.org/bugzilla/show_bug.cgi?id=11427#c7
and report back if it works. Thanks.
Comment 14 Stephen Johnston 2007-07-04 06:30:53 UTC
We are seeing the same problem with 2.0.59. We have been encountering steadily 
bloating threads on Windows. This seems to make sense if you consider that 
Apache threads grow to the size of what they server and do not release the 
memory. 

In an attempt to manage that problem we set MaxRequestsPerChild to 100 
temporarily so we could watch the effect on the server before setting it to a 
more reasonable number. Upon the first "exit due to maxrequestsperchild" this 
error was thrown and the server stopped serving threads.

While the bloat may be a bug or a design with unintended consquences, the real 
issue is that now on Windows there seems to be no effective way to recycle the 
server and free up the memory short of regular service restarts.

Comment 15 Ruben de Graaf 2007-07-12 07:17:03 UTC
*** Bug 42858 has been marked as a duplicate of this bug. ***
Comment 16 XiaoJunFeng 2007-09-28 05:32:24 UTC
&#20107;&#20214;&#31867;&#22411;:	&#38169;&#35823;
&#20107;&#20214;&#26469;&#28304;:	Application Error
&#20107;&#20214;&#31181;&#31867;:	(100)
&#20107;&#20214; ID:	1000
&#26085;&#26399;:		2007-9-28
&#20107;&#20214;:		20:18:23
&#29992;&#25143;:		N/A
&#35745;&#31639;&#26426;:	163JSP-CTC01
&#25551;&#36848;:
&#38169;&#35823;&#24212;&#29992;&#31243;&#24207; Apache.exe&#65292;&#29256;&#26412; 2.0.61.200&#65292;&#38169;&#35823;&#27169;&#22359; ntdll.dll&#65292;&#29256;&#26412;
5.2.3790.3959&#65292;&#38169;&#35823;&#22320;&#22336; 0x0001a3e1&#12290;

&#26377;&#20851;&#26356;&#22810;&#20449;&#24687;&#65292;&#35831;&#21442;&#38405;&#22312; http://go.microsoft.com/fwlink/events.asp &#30340;&#24110;&#21161;&#21644;&#25903;&#25345;&#20013;&#24515;&#12290;
&#25968;&#25454;:
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 41 70 61   ure  Apa
0018: 63 68 65 2e 65 78 65 20   che.exe 
0020: 32 2e 30 2e 36 31 2e 32   2.0.61.2
0028: 30 30 20 69 6e 20 6e 74   00 in nt
0030: 64 6c 6c 2e 64 6c 6c 20   dll.dll 
0038: 35 2e 32 2e 33 37 39 30   5.2.3790
0040: 2e 33 39 35 39 20 61 74   .3959 at
0048: 20 6f 66 66 73 65 74 20    offset 
0050: 30 30 30 31 61 33 65 31   0001a3e1

Comment 17 William A. Rowe Jr. 2007-12-30 23:27:45 UTC
There may be a bug (recorded in another incident) with respect to the
win32disableacceptex feature.

Is anyone who is using a proper socket stack, and has enablesendfile, mmap both
on, and did not disable acceptex still observing this bug?
Comment 18 William A. Rowe Jr. 2008-01-30 19:40:00 UTC
This bug should be addressed in 2.0.63 and 2.2.8, we trust.

Please, if one of the cc's to this bug report can verify that upgrading
eliminated this error, or failed to close the bug, please report back.

Otherwise leaving this open for feedback for just a while longer before
closing as 'no response'.
Comment 19 Wes Dyk 2008-03-25 07:55:29 UTC
I have upgraded to 2.2.8 and am still experiencing memory usage out of control.  One instance of httpd.exe gradually increases its memory usage until all memory is exhausted.
Comment 20 Dan Poirier 2009-05-21 07:50:21 UTC
More than a year with no more problem reports.  Is this still an issue, or has it been resolved?
Comment 21 Dan Poirier 2009-06-11 05:30:07 UTC
Closing due to lack of updates in more than a year.  Can be re-opened if the problem still occurs.
Comment 22 Feb 2012-10-26 18:31:15 UTC
Hello All,

I have the same problem on the Windows 2003 Server x86. Here is the error from Apache's logs:

[Fri Oct 26 10:07:14 2012] [crit] [Fri Oct 26 10:07:14 2012] file D:\\asf-build\\build-2.0.58\\server\\mpm\\winnt\\child.c, line 1078, assertion "(rv >= 0) && (rv < threads_created)" failed

And here is the error from Window's event:

Faulting application Apache.exe, version 2.0.58.200, faulting module ntdll.dll, version 5.2.3790.4937, fault address 0x0001a229.

I increased ThreadsPerChild for a while for testing. I will keep an eye on it.

I am guessing this is a bug, but I need to make sure that there is no any solutions before proceed on upgrading.

Any solutions?

Best Regards,

Feb