mapserv segfaults
John C Cartwright
John.C.Cartwright at NOAA.GOV
Thu Feb 10 10:04:26 PST 2005
sorry - betraying my ignorance of gdb! Here it is:
=========================================================================
(gdb) run
Starting program: /extra/contrib/apache/cgi-bin/mapserv-debug
[Thread debugging using libthread_db enabled]
[New Thread -1218604192 (LWP 19920)]
[Thu Feb 10 10:56:18 2005].796695 msWMSLoadGetMapParams(): enabling
non-square pixels.[Thu Feb 10 10:56:18 2005].799902 msDrawMap(): kicking
into non-square pixel preserving mode.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218604192 (LWP 19920)]
0x006a10d1 in realloc () from /lib/tls/libc.so.6
(gdb) where
#0 0x006a10d1 in realloc () from /lib/tls/libc.so.6
#1 0x007bb3dd in _TIFFrealloc () from
/extra/contrib/esri/sdeexe90/lib/libtiff.so
#2 0x00ffca3f in TIFFMergeFieldInfo () from
/extra/contrib/gdal-1.2.5/lib/libgdal.so.1
#3 0x0102fd2c in _XTIFFLocalDefaultDirectory ()
from /extra/contrib/gdal-1.2.5/lib/libgdal.so.1
#4 0x0102fd51 in _XTIFFDefaultDirectory () from
/extra/contrib/gdal-1.2.5/lib/libgdal.so.1
#5 0x007a24ae in TIFFDefaultDirectory () from
/extra/contrib/esri/sdeexe90/lib/libtiff.so
#6 0x007a3098 in TIFFReadDirectory () from
/extra/contrib/esri/sdeexe90/lib/libtiff.so
#7 0x007b718c in TIFFClientOpen () from
/extra/contrib/esri/sdeexe90/lib/libtiff.so
#8 0x007bb2dc in TIFFFdOpen () from
/extra/contrib/esri/sdeexe90/lib/libtiff.so
#9 0x007bb36b in TIFFOpen () from
/extra/contrib/esri/sdeexe90/lib/libtiff.so
#10 0x0102fddc in XTIFFOpen () from
/extra/contrib/gdal-1.2.5/lib/libgdal.so.1
#11 0x00f7fd04 in GTiffDataset::Open () from
/extra/contrib/gdal-1.2.5/lib/libgdal.so.1
#12 0x010361c9 in GDALOpen () from
/extra/contrib/gdal-1.2.5/lib/libgdal.so.1
#13 0x08079ff3 in msDrawRasterLayerLow (map=0xb75a3008, layer=0x93a32e8,
image=0x9512f48)
at mapraster.c:1450
#14 0x0808ce85 in msDrawRasterLayer (map=0xb75a3008, layer=0x763538,
image=0x0)
at mapdraw.c:1145
#15 0x0808bf3b in msDrawLayer (map=0xb75a3008, layer=0x93a32e8,
image=0x9512f48)
at mapdraw.c:781
#16 0x0808b62f in msDrawMap (map=0xb75a3008) at mapdraw.c:446
#17 0x080ce044 in msWMSGetMap (map=0xb75a3008, nVersion=65793,
names=0x938b578,
values=0x93951c0, numentries=7) at mapwms.c:2156
#18 0x080cfab2 in msWMSDispatch (map=0xb75a3008, req=0x938b558) at
mapwms.c:2920
#19 0x080a13ce in msOWSDispatch (map=0xb75a3008, request=0x938b558) at
mapows.c:245
#20 0x0805234d in main (argc=0, argv=0xbfffb644) at mapserv.c:1165
(gdb)
=========================================================================
Looks like a problem with TIFF support, but here's the output from
gdal-info:
gdal-config --formats
gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem
jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk airsar rs2 bsb gif
jpeg png netcdf zlib
The mapfile (supplied by Perry Nacionales) is attached.
Thanks!
-- john
Sean Gillies wrote:
> Type "where" at the gdb prompt after the segfault and post the result
> for us. Sorry, I should have mentioned this before.
>
> As you are not specifying height/width and bbox in your query string,
> the default values specified in your map config file will be very
> important. Can you attach your map file as well?
>
> cheers,
> Sean
>
> On Feb 10, 2005, at 9:47 AM, John C Cartwright wrote:
>
>> Hi Sean,
>>
>> thanks for the suggestion. here's the output:
>>
>> (gdb) run
>> Starting program: /extra/contrib/apache/cgi-bin/mapserv-debug
>> [Thread debugging using libthread_db enabled]
>> [New Thread -1218604192 (LWP 19250)]
>> [Thu Feb 10 09:40:19 2005].204455 msWMSLoadGetMapParams(): enabling
>> non-square pixels.[Thu Feb 10 09:40:19 2005].208427 msDrawMap(): kicking
>> into non-square pixel preserving mode.
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread -1218604192 (LWP 19250)]
>> 0x0095b0d1 in realloc () from /lib/tls/libc.so.6
>>
>> Here's the query string:
>>
>> map=/extra/contrib/apache/htdocs/mapserver/wms_wfs/
>> wms.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=relief,cities_p
>> oly,counties,states,roads
>>
>> and this is a RedHat ES 3 system (kernel 2.4.21-27.0.1.ELsmp)
>>
>> Where should I go from here?
>>
>> Thanks again!
>>
>> -- john
>>
>>
>> Sean Gillies wrote:
>>
>>> John, add a
>>>
>>> DEBUG ON
>>>
>>> to the Map-level block in your map config file. This will write
>>> messages to stderr, including names of layers being accessed. This
>>> should let you know which layer (if any) is associated with the
>>> segfault.
>>>
>>> Now that you've recompiled, run mapserv under gdb exactly as Steve
>>> Woodbridge described. This time gdb should give a more detailed
>>> description of the location of the memory error including all the
>>> MapServer functions that have been called. Give us a look at that and
>>> we can try to figure out what's going on.
>>>
>>> cheers,
>>> Sean
>>>
>>> On Feb 9, 2005, at 5:28 PM, John C Cartwright wrote:
>>>
>>>> Thanks, Sean. I recompiled with debugging, can you provide me a little
>>>> guidance on what would be helpful to get out of gdb?
>>>>
>>>> ...
>>>> Thanks again for your patience and help!
>>>>
>>>> -- john
>>>>
>>>
>>>> Sean Gillies wrote:
>>>>
>>>>> John,
>>>>> Looks to me like you need to re-config mapserver with
>>>>> --enable-debug so
>>>>> that gdb can tell us more about the calling stack.
>>>>> cheers,
>>>>> Sean
>>>>> On Feb 9, 2005, at 5:08 PM, John C Cartwright wrote:
>>>>>
>>>>>> Hi Steve,
>>>>>>
>>>>>> thanks for the prompt response and the suggestion.
>>>>>>
>>>>>> gdb is just telling me the error occurred in memory allocation, but
>>>>>> this
>>>>>> is not helping me much:
>>>>>>
>>>>>> (gdb) run
>>>>>> Starting program: /extra/contrib/apache/cgi-bin/mapserver-4.4.1
>>>>>> [Thread debugging using libthread_db enabled]
>>>>>> [New Thread -1218617216 (LWP 8708)]
>>>>>>
>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>> [Switching to Thread -1218617216 (LWP 8708)]
>>>>>> 0x039ba0d1 in realloc () from /lib/tls/libc.so.6
>>>>>>
>>>>>> I was hoping to tell what request parameter or map configuration
>>>>>> element
>>>>>> might be causing trouble. Can you think of any way for me to pursue
>>>>>> this
>>>>>> at a higher level?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> -- john
>>>>>>
>>>>>>
>>>>>>
>>>>>> Stephen Woodbridge wrote:
>>>>>>
>>>>>>> John,
>>>>>>>
>>>>>>> You can run mapserver cgi at the command line, but you need to
>>>>>>> set up
>>>>>>> the environment variables first, like
>>>>>>>
>>>>>>> export REQUEST_METHOD=GET
>>>>>>> export QUERY_STRING="...."
>>>>>>> gdb mapserv
>>>>>>> run
>>>>>>>
>>>>>>> set your QUERY_STRING appropriately
>>>>>>>
>>>>>>> -Steve W.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>>
> --
> Sean Gillies
> sgillies at frii dot com
> http://users.frii.com/sgillies
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wms.map
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050210/670ffd62/attachment.ksh>
More information about the MapServer-users
mailing list