httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Croteau, Beau" <Beau.Crot...@ca.com>
Subject RE: Apache Thread Creation/Destroy Problem
Date Fri, 15 Jun 2007 21:47:03 GMT
I did some more investigating and found the following behavior.

If I load the mod_ssl apache module then the thread handle leak occurs.  If I don't then the
leak doesn't appear to occur.

The code I'm using to test:
void nothing(void*input)
{
	printf("Nothing - %d\n",::GetCurrentThreadId());
	return;
}
unsigned __stdcall test2(void *data)
{
	testClass *a = (testClass*)data;
	printf("test1 - %d\n",::GetCurrentThreadId());
	//testDLL testdll;
	while(1)
	{
		printf("Spawning a new thread.\n");
		_beginthread(nothing,0,NULL);
		Sleep(5000);
	}
	delete a;
	return 0;
}

test2 is a thread called by the main soap call.

If I comment out the line in httpd.conf:
LoadModule ssl_module modules/mod_ssl.so

Then the thread handle leak doesn't appear to occur, but when I load the module the thread
count increases by one each iteration.  Once again, this is inside of the mod_gsoap module
as well, but if the only thing I change is mod_ssl being loaded then the thread leak doesn't
occur.

Does anybody have any thoughts on this?  I'm a bit confused by how this could happen.  Keep
in mind I'm a bit out of my realm as I know next to nothing about the Apache OR SSL code bases.

Thanks.



-----Original Message-----
From: Joe Lewis [mailto:joe@joe-lewis.com]
Sent: Thu 6/14/2007 12:22 PM
To: modules-dev@httpd.apache.org
Subject: Re: Apache Thread Creation/Destroy Problem
 
Croteau, Beau wrote:
> The thread is created inside of the gsoap_handler.  Though these threads
> aren't necessarily mapped to a one to one gsoap_handler call.  We have a
> web service 'startup' function that creates several background threads
> to do the processing and from there don't necessary have to have the
> gsoap_handler called again for the thread leak to start happening.
>
> --Beau
>   
Thanks! Someone who is more familiar with SOAP and threads should be
able to chime in with more info at this point. Again, thanks for
identifying the hook that this is happening in.

-- 
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus



Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message