logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Apache httpd 2.2.4 assertion error using ApacheMonitor

 
Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads



View previous topic :: View next topic  
Author Message
otnateos



Joined: 15 Mar 2007
Posts: 2

PostPosted: Thu 15 Mar '07 2:10    Post subject: Apache httpd 2.2.4 assertion error using ApacheMonitor Reply with quote

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: 610
Location: Milford, MA, USA

PostPosted: Thu 15 Mar '07 6:05    Post subject: Reply with quote

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

PostPosted: Wed 21 Mar '07 4:12    Post subject: Reply with quote

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: 610
Location: Milford, MA, USA

PostPosted: Wed 21 Mar '07 15:06    Post subject: Reply with quote

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


Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads
Page 1 of 1