[AWS] memory leak in AWS-based application

Pascal Obry pascal at obry.net
Thu Jan 8 18:18:33 CET 2009


Petr,

> sure, here are the details including simple valgrind run with client doing
> tens of calls to the server. The leak that builds up over time is the one
> denoted as 4/4 in the log below (resulting in 390kB leak at the end of
> this run).
> 
> ==11047== 390,928 bytes in 14,650 blocks are definitely lost in loss record 4 of 4
> ==11047==    at 0x4C22FAB: malloc (vg_replace_malloc.c:207)
> ==11047==    by 0x65C297A: __gnat_malloc (in
> /home/hopet/gnat-2008/lib/gcc/x86_64-pc-linux-gnu/4.1.3/rts-native/adalib/libgnat-6.2.so)
> ==11047==    by 0x649CB0F: ada__strings__unbounded__adjust__2 (in
> /home/hopet/gnat-2008/lib/gcc/x86_64-pc-linux-gnu/4.1.3/rts-native/adalib/libgnat-6.2.so)
> ==11047==    by 0x649CDFD: ada__strings__unbounded__to_unbounded_string (in
> /home/hopet/gnat-2008/lib/gcc/x86_64-pc-linux-gnu/4.1.3/rts-native/adalib/libgnat-6.2.so)
> ==11047==    by 0x564ADEF: soap__name_space__create (in /home/hopet/gnat-2008/lib/aws/relocatable/libaws.so)
> ==11047==    by 0x54D4370: soap__message__xml__parse_namespaces (in /home/hopet/gnat-2008/lib/aws/relocatable/libaws.so)
> ==11047==    by 0x54D7E66: soap__message__xml__parse_body (in /home/hopet/gnat-2008/lib/aws/relocatable/libaws.so)
> ==11047==    by 0x54D8BB0: soap__message__xml__parse_document (in /home/hopet/gnat-2008/lib/aws/relocatable/libaws.so)
> ==11047==    by 0x54D9001: soap__message__xml__load_payload (in /home/hopet/gnat-2008/lib/aws/relocatable/libaws.so)
> ==11047==    by 0x444694: slartibartfast_server_cb__soap_addhosts_wrapper (soap-utils.adb:288)
> ==11047==    by 0x44977B: slartibartfast_server_cb__aws_callback (slartibartfast_server_cb.adb:183)
> ==11047==    by 0x557408A: aws__server__http_utils__answer_to_client (in /home/hopet/gnat-2008/lib/aws/relocatable/libaws.so)

Which seems to be exactly the problem I was talking about (GNAT bug on
aggregate with controlled objects). One option is to upgrade to a more
recent AWS version (containing the workaround) or live with this memory
leak until a new compiler or official AWS package is available.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595


More information about the AWS mailing list