[AWS] memory leak in AWS-based application
Petr Holub
hopet at ics.muni.cz
Thu Jan 8 00:51:49 CET 2009
Hi all,
I'm using the following SOAP_Wrapper-based code to produce one service:
function SOAP_RequestVLAN is new Slartibartfast_Server_Operations_Service.Server.RequestVLAN_CB (RequestVLAN);
function SOAP_RequestVLAN_Wrapper is new SOAP.Utils.SOAP_Wrapper (SOAP_RequestVLAN);
function SOAP_GetVLANTag is new Slartibartfast_Server_Operations_Service.Server.GetVLANTag_CB (GetVLANTag);
function SOAP_GetVLANTag_Wrapper is new SOAP.Utils.SOAP_Wrapper (SOAP_GetVLANTag);
function SOAP_ReleaseVLAN is new Slartibartfast_Server_Operations_Service.Server.ReleaseVLAN_CB (ReleaseVLAN);
function SOAP_ReleaseVLAN_Wrapper is new SOAP.Utils.SOAP_Wrapper (SOAP_ReleaseVLAN);
function SOAP_AddHosts is new Slartibartfast_Server_Operations_Service.Server.AddHosts_CB (AddHosts);
function SOAP_AddHosts_Wrapper is new SOAP.Utils.SOAP_Wrapper (SOAP_AddHosts);
function SOAP_RemoveHosts is new Slartibartfast_Server_Operations_Service.Server.RemoveHosts_CB (RemoveHosts);
function SOAP_RemoveHosts_Wrapper is new SOAP.Utils.SOAP_Wrapper (SOAP_RemoveHosts);
-- generic callback that calls individual callbacks based on
-- SOAPAction request
function AWS_CallBack (Request : in AWS.Status.Data) return AWS.Response.Data is
SOAPAction : constant String := AWS.Status.SOAPAction (Request);
begin
-- XXX: call to every SOAP.Utils.SOAP_Wrapper produces some memory leak
if SOAPAction = "RequestVLAN" then
return SOAP_RequestVLAN_Wrapper (Request);
elsif SOAPAction = "GetVLANTag" then
return SOAP_GetVLANTag_Wrapper (Request);
elsif SOAPAction = "AddHosts" then
return SOAP_AddHosts_Wrapper (Request);
elsif SOAPAction = "RemoveHosts" then
return SOAP_RemoveHosts_Wrapper (Request);
elsif SOAPAction = "ReleaseVLAN" then
return SOAP_ReleaseVLAN_Wrapper (Request);
else
return AWS.Response.Build (AWS.MIME.Text_HTML, "<p>Not an appropriate SOAP request!</p>");
end if;
end AWS_CallBack;
It looks like each call to the SOAP_*_Wrapper produces some memory leak that
builds up over the time. The reasoning why I think so is as follows:
1) watching the server slowly increases memory usage when there are
incoming requests coming
2) when I call my own functions like RequestVLAN, GetVLANTag, etc., no
leaks are produced even after thousands of calls
3) when the AWS_CallBack is modified as follows:
function AWS_CallBack (Request : in AWS.Status.Data) return AWS.Response.Data is
SOAPAction : constant String := AWS.Status.SOAPAction (Request);
begin
return AWS.Response.Build (AWS.MIME.Text_HTML, "<p>Not an appropriate SOAP request!</p>");
end AWS_CallBack;
(i.e., it doesn't do anything useful any more, just rejecting the requests),
I can't see any memory leaks even after thousands of calls
So this leads me to believe there is some leak either in
Slartibartfast_Server_Operations_Service.Server.*_CB (autmatically generated by wsdl2ada)
or in
SOAP.Utils.SOAP_Wrapper
Any experiences with this? (Just want to avoid discovering a wheel ;) ).
Thanks a lot,
Petr
More information about the AWS
mailing list