Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache httpd 2.2.4 assertion error using ApacheMonitor |
|
Author |
|
otnateos
Joined: 15 Mar 2007 Posts: 2
|
Posted: Thu 15 Mar '07 2:10 Post subject: Apache httpd 2.2.4 assertion error using ApacheMonitor |
|
|
Hi All,
I got a Microsoft Visual C++ Debug Library error when running Apache httpd 2.2.4 that I built saying
Debug Assertion Failed!
Program: C:\Apache2.2\bin\httpd.exe
File: commit.c
Line: 69
Expression: ("Invalid file descriptor. File possibly closed by a different thread",0)
The weird thing is that error only happens if I run the Apache server as windows service, if I run it using command line no error happens. Anyone has encounter this kind of error?
I built the server from source with Zlib & SSL using Visual Studio 2005 on Pentium 4 HT |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Thu 15 Mar '07 6:05 Post subject: |
|
|
It sounds like you built Apache as a Debug build instead of as a Release build, and then tried to run it as a service.
In general, you don't want to do that. A Debug build should be run from the command line or in the debugger, usually with the -X switch.
A Release build is appropriate for running as a service.
In fact, it is probably a very benign bug. See Apache bug #37776.
FYI - the code at server\mpm\winnt\nt_eventlog.c line 169 which calls _commit() is expected to fail
- except when running on NT4. That's why it doesn't check for errors.
No problem when running a Debug build from the command-line (or running on NT4),
but if you run a Debug build as a service there is no stderr file descriptor.
The Debug rutime library complains that this call fails - even though Apache itself doesn't check for errors.
The Release runtime library should not complain.
-tom- |
|
Back to top |
|
otnateos
Joined: 15 Mar 2007 Posts: 2
|
Posted: Wed 21 Mar '07 4:12 Post subject: |
|
|
However I did build it with Release build, although everytime I build it, the first time always fail, and when success it generates a lot of .pdb file in Apache22 directory.
When I delete these .pdb file, everytime I start Apache httpd as a service it shows the assertion error, if I leave .pdb files untouched Apache httpd can run properly without any major dramas.
Does that mean I build the server as Debug ? |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Wed 21 Mar '07 15:06 Post subject: |
|
|
The original error you described, "Debug Assertion Failed! ", is exactly the error which a Debug build shows when you try to run it as a service.
Apache produces many .pdb files with either build - Debug or Release. These are symbol files, and they can be deleted in a production environment.
I cannot reproduce the behavior you describe where deleting the .pdb files causes an error, so I don't know what that is all about.
-tom- |
|
Back to top |
|
|
|
|
|
|