[Tilecache] Tilecache 2.0.1 Segfault

Steve Lime Steve.Lime at dnr.state.mn.us
Tue Mar 18 17:48:34 EDT 2008



>>> On 3/18/2008 at 2:24 PM, in message <20080318192428.GA16166 at metacarta.com>,
Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Mon, Mar 17, 2008 at 03:58:44PM -0500, Steve Lime wrote:
>> Hi all: I'm using tilecache with a MapServer layer and running into problems 
> when seeding the cache. In this instance
>> all the layers in the mapfile are STATUS DEFAULT, on all the time. Running 
> the seeding program seems to work ok
>> with 2 exceptions:
>> 
>>   1) for every tile I get a WMS exception
>> 
>>   <CTYPE ServiceExceptionReport SYSTEM 
> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
>>     <ServiceExceptionReport version="1.1.1">
>>       <ServiceException code="LayerNotDefined">
>>         msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in 
> the LAYERS parameter.
>>       </ServiceException>
>>   </ServiceExceptionReport>
>> 
>> This is expected I guess since there is no layer specified in the 
> tilcache.cfg file (since all are on by default). The
>> tiles ARE created despite the error message. Would be nice to suppress that 
> if it's benign.
> 
> Since TileCache uses the owsParams way of loading a mapobj, it has the
> same requirements that a WMS Request does, so this is 'automatic': I'm
> not sure how you're getting a WMS Exception but still getting tiles
> created? That definitely seems weird to me.

Actually I figured this out. The MapServer layer calls the msWMSLoadGetMapParams()
function through MapScript to populate the mapObj. That function is throwing the
WMS exception but nothing is detecting the exception so the draw() method is
being executed. It may just be luck that this works so don't change anything. Using
all default layers seems a reasonable use case to me.

>>   2) after every 500 to 1,000 tiles or I get a segmentation fault. No other 
> error information
>> 
>> If I re-run the seed command it picks up again from where it dies, although I 
> sometimes have to run it twice to clear
>> our any file locks. It'll run another 500 to 1,000 or so and it dies again.
>> 
>> Could be a MapServer issue or TileCache, not sure. The debugger gives me:
>> 
>>   Program received signal SIGSEGV, Segmentation fault.
>>   [Switching to Thread 1075357376 (LWP 31768)]
>>   0x400d8f4c in mempcpy () from /lib/tls/libc.so.6
>> 
>> Has anyone else into anything like this?
> 
> I've seen this on a SuSE box as well. (Specifically, 'hypersphere', a
> telasciecne/OSGeo machine.) As far as I know, this is a MapServer
> segfault of some kind: does a backtrace help you here? I've never had
> the desire to debug it, to be honest. I've never had it happen on
> Debian.  

I'm sitting here watching "top" output will running the seeding and the python
process is gobbling up memory like crazy (1.3Gb at the moment and climbing). 
For grins I explicitly set the mapObj to None in  the mapserver layer code after
a tile is generated and while memory use is still sky high I've generated 3,000
tiles without a segfault.

> Regards,

Steve




More information about the Tilecache mailing list