legend template crash with fast CGI
Daniel Morissette
dmorissette at MAPGEARS.COM
Thu Aug 24 09:16:54 PDT 2006
Um.. it seems that Valgrind is finding something but we can't tell much
from this Valgrind output. Perhaps try using 'valgrind --num-callers=20'
to get a more complete call stack in the Valgrind output (note that
since the error is reported inside valgrind's libc_freeres_wrapper that
probably won't tell us much anyway, but we can try).
Would it be possible for you to package a test case (mapfile, data, html
templates, etc.) to send us to reproduce this issue? Since this is
happening when generating in mode=legend, we may be able get away with a
test case with just the mapfile and templates (without the data) but I'm
not sure.
Daniel
miguel coladas wrote:
> Thanks for your answer Daniel.
>
> I'm testing with latest 4.10 beta and I'm having some problems
>
> [miguel at mcoladas miguel]$ /usr/local/apache/fcgi-bin/mapserv -v
> MapServer version 4.10.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
> OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI INPUT=EPPL7
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> With this version of mapserver I have run Valgrind at the command line
> as you tell me:
>
> [miguel at mcoladas miguel]$ valgrind /usr/local/apache/fcgi-bin/mapserv
> QUERY_STRING="map=/usr/local/apache/htdocs/mapserver/map/client-draw.map&mode=legend&layers=provincias&mapext=458350+4613016+704030+4858696&mapsize=350+350&map_legend_template=../templates/legend.html"
>
> ==5322== Memcheck, a memory error detector for x86-linux.
> ==5322== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
> ==5322== Using valgrind-2.1.0, a program supervision framework for
> x86-linux.
> ==5322== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
> ==5322== Estimated CPU clock rate is 1923 MHz
> ==5322== For more details, rerun with: -v
> ==5322==
> ==5322== Invalid free() / delete / delete[]
> ==5322== at 0x4002B455: free (vg_replace_malloc.c:186)
> ==5322== by 0x40BC4CBB: (within /lib/i686/libc-2.3.3.so)
> ==5322== by 0x40BC4951: __libc_freeres (in /lib/i686/libc-2.3.3.so)
> ==5322== by 0x4016AACC: vgPlain___libc_freeres_wrapper
> (vg_intercept.c:172)
> ==5322== Address 0x410897F8 is not stack'd, malloc'd or free'd
> ==5322==
> ==5322== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
> ==5322== malloc/free: in use at exit: 58517 bytes in 129 blocks.
> ==5322== malloc/free: 14327 allocs, 14199 frees, 4390277 bytes allocated.
> ==5322== For a detailed leak analysis, rerun with: --leak-check=yes
> ==5322== For counts of detected errors, rerun with: -v
>
> any idea?
>
>
> Daniel Morissette escribió:
>
>> If you are on Linux then you could perhaps capture the URL of the
>> request that causes the crash, and then run it under Valgrind
>> (http://valgrind.org/) at the command line using something like:
>>
>> valgrind ./mapserv QUERY_STRING="map=....."
>>
>> You get the value of QUERY_STRING from the URL that causes the crash.
>>
>> If Valgrind reports errors then I suggest you create a bug report with
>> the Valgrind output and a test case to reproduce (including mapfile,
>> test dataset, etc. and the query_string that causes the crash).
>>
>> BTW, I would suggest that you test this against the latest 4.10 beta
>> before reporting a bug.
>>
>> Daniel
>>
>>
>>
>> miguel coladas wrote:
>>
>>> Hi everyone,
>>>
>>> first i'm spanish, so sorry for my english.
>>> I'm using mapserver (4.8.3) in fast CGI mode (apache 2.0.59,
>>> mod_fastcgi/2.4.2). I'm having some problems with this configuration
>>> when i want use the legend template option.
>>> In the legend template file, when I put "[leg_layer_html opt_flag=1]"
>>> the legend works correctly. However, when I put "[leg_layer_html
>>> opt_flag=2]" mapserver crashes. In CGI mode, the same legend works
>>> correctly. Other modes (map, query... works correctly too).
>>>
>>> The error_log of apache server:
>>>
>>> [Mon Aug 21 18:16:43 2006] [error] [client 192.168.1.3] Premature end
>>> of script headers: mapserv
>>>
>>> I think this is a bug with mapserver in fast CGI mode. Can anyone
>>> help me out with this?
>>>
>>> Many thanks,
>>>
>>> Miguel Coladas
>>
>>
>>
>
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list