Mapserver memory leaks

44 views
Skip to first unread message

Ian Walberg

unread,
Feb 1, 2012, 3:44:10 PM2/1/12
to mapser...@lists.osgeo.org, SpatiaLite Users
Folks,

We have a mapscript (6.x) application which runs as a process so the php
script does not exit.

What we appear to be seeing (using valgrind) is a surprisingly large
number of memory leaks.

Our next step is to look into each one and try and determine the cause
but they appear to be in multiple places.

Does anyone have any experience of similar conditions?

Many thanks

Ian

a.fu...@lqt.it

unread,
Feb 1, 2012, 5:30:59 PM2/1/12
to spatiali...@googlegroups.com, mapser...@lists.osgeo.org
On Wed, 1 Feb 2012 15:44:10 -0500, Ian Walberg wrote

> What we appear to be seeing (using valgrind) is a surprisingly
> large number of memory leaks.
>

Hi Ian,

which spatialite's version are you using ?

Brad Hards during the latest months has developed
an extensive test coverage: and several memory
leaks were identified (and resolved) using valgrind.

so I suppose that the recent v.3.0.0 and v.3.0.1 are
much less prone to memory leaks than any other previous
version.

bye Sandro

Ian Walberg

unread,
Feb 1, 2012, 6:11:52 PM2/1/12
to spatiali...@googlegroups.com
Sandro,

We actually now thing spatialite is ok as we were not using the final
release in error this week for our testing.

Thanks

Ian

Hi Ian,

bye Sandro

--
You received this message because you are subscribed to the Google
Groups "SpatiaLite Users" group.
To post to this group, send email to spatiali...@googlegroups.com.
To unsubscribe from this group, send email to
spatialite-use...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/spatialite-users?hl=en.

Brad Hards

unread,
Feb 2, 2012, 2:14:04 AM2/2/12
to spatiali...@googlegroups.com
On Thursday 02 February 2012 07:44:10 Ian Walberg wrote:
> Does anyone have any experience of similar conditions?
We found some leaks in pre-3.0.0 versions of spatialite. Which version(s) are
you using? Perhaps you can post (or post a link to) the valgrind summaries?

Brad

Ian Walberg

unread,
Feb 2, 2012, 9:43:06 AM2/2/12
to spatiali...@googlegroups.com
Here is what we are seeing with the latest version we are using, the
previous post was premature as we were using an older version in error.

This appears to be a minor issue.

Regards

Ian

==31460== 44 bytes in 1 blocks are definitely lost in loss record 4,799
of 8,192
==31460== at 0x4006D69: malloc (vg_replace_malloc.c:236)
==31460== by 0x521247D: gaiaAllocPoint (gg_geometries.c:65)
==31460== by 0x524B0CF: vanuatuParse (gg_vanuatu.c:292)
==31460== by 0x524DBD8: gaiaParseWkt (lex.VanuatuWkt.c:2212)
==31460== by 0x5273814: geom_from_text2 (spatialite.c:6850)
==31460== by 0x812B1B5: sqlite3Step
(/data/php-5.3.6/ext/sqlite3/libsqlite/sqlite3.c:61665)
==31460== by 0x8120049: sqlite3_step
(/data/php-5.3.6/ext/sqlite3/libsqlite/sqlite3.c:58776)
==31460== by 0x8120307: sqlite3_exec
(/data/php-5.3.6/ext/sqlite3/libsqlite/sqlite3.c:84169)
==31460== by 0x80D7691: zim_sqlite3_exec
(/data/php-5.3.6/ext/sqlite3/sqlite3.c:223)
==31460== by 0x836BFED: zend_do_fcall_common_helper_SPEC
(/data/php-5.3.6/Zend/zend_vm_execute.h:316)
==31460== by 0x836B525: execute
(/data/php-5.3.6/Zend/zend_vm_execute.h:107)
==31460== by 0x834AAA8: zend_execute_scripts
(/data/php-5.3.6/Zend/zend.c:1194)

-----Original Message-----
From: spatiali...@googlegroups.com
[mailto:spatiali...@googlegroups.com] On Behalf Of Brad Hards
Sent: Wednesday, February 01, 2012 11:14 PM
To: spatiali...@googlegroups.com
Subject: Re: [SpatiaLite-Users] Mapserver memory leaks

Brad

--

Brad Hards

unread,
Feb 4, 2012, 5:59:12 PM2/4/12
to spatiali...@googlegroups.com, Ian Walberg
On Friday 03 February 2012 01:43:06 Ian Walberg wrote:
> ==31460== 44 bytes in 1 blocks are definitely lost in loss record 4,799
> of 8,192
> ==31460== at 0x4006D69: malloc (vg_replace_malloc.c:236)
> ==31460== by 0x521247D: gaiaAllocPoint (gg_geometries.c:65)
> ==31460== by 0x524B0CF: vanuatuParse (gg_vanuatu.c:292)
> ==31460== by 0x524DBD8: gaiaParseWkt (lex.VanuatuWkt.c:2212)
> ==31460== by 0x5273814: geom_from_text2 (spatialite.c:6850)
I see a quite similar problem while valgrind'ing the unit tests. I'm still not
sure how it can occur - possibly a failure path that we aren't treating
correctly.

There are a few other memory leaks shown in the unit tests. I'm currently
working on those, and expect to commit fixes for (at least) some of them soon.

Brad

Reply all
Reply to author
Forward
0 new messages