[mapserver-users] mapserver 6.4.1 crash on raster query
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Jul 13 12:41:50 PDT 2016
Hi all,
I am getting a crash with memory corruption in mapserver 6.4.1 when
doing a query. The strange this is that I have two identical mapfiles
where the only difference is the tif files being referenced by it and
while they both crash the errors are slightly different as can be seen
in the gdb backtrace below.
Any thoughts on how to fix this?
-Steve W
# /usr/lib/cgi-bin/mapserv -v
MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO
SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
The details follow:
LAYER
NAME "query"
STATUS ON
TYPE raster
PROJECTION "init=epsg:4326" END
TOLERANCE 0
TOLERANCEUNITS pixels
DATA "/maps/wms/data/HYCOM/HYCOM-today-currents.tif"
#PROCESSING "NODATA=10000"
PROCESSING "NODATA=1.2676506002282e+30"
TEMPLATE "/maps/wms/pixel.list.html"
END
# /usr/lib/cgi-bin/mapserv
QUERY_STRING='map=/maps/wms/hycom_currents_1.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125'
Content-Type: text/html
0.0090429913,0.11866909,0.003122841,-0.013737384,-0.0049919467,-0.024963228,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30
*** Error in `/usr/lib/cgi-bin/mapserv': double free or corruption
(out): 0x00000000006768a0 ***
Aborted (core dumped)
# /usr/lib/cgi-bin/mapserv
QUERY_STRING='map=/maps/wms/hycom_currents_2.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125'
*** Error in `/usr/lib/cgi-bin/mapserv': malloc(): memory corruption:
0x00000000006781e0 ***
Aborted (core dumped)
If I run it in gdb I get the following backtraces:
(gdb) run
QUERY_STRING='map=/maps/wms/hycom_currents_1.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125'
Starting program: /usr/lib/cgi-bin/mapserv
QUERY_STRING='map=/maps/wms/hycom_currents_1.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Content-Type: text/html
0.0090429913,0.11866909,0.003122841,-0.013737384,-0.0049919467,-0.024963228,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30
*** Error in `/usr/lib/cgi-bin/mapserv': double free or corruption
(out): 0x00000000006768b0 ***
Program received signal SIGABRT, Aborted.
0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff7465028 in __GI_abort () at abort.c:89
#2 0x00007ffff749e2a4 in __libc_message (do_abort=do_abort at entry=1,
fmt=fmt at entry=0x7ffff75ac6b0 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff74aa55e in malloc_printerr (ptr=<optimized out>,
str=0x7ffff75ac7e0 "double free or corruption (out)", action=1)
at malloc.c:4996
#4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0)
at malloc.c:3840
#5 0x00007ffff7ae810c in msFreeCharArray ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#6 0x00007ffff7a9a86a in msLayerClose ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#7 0x00007ffff7aef300 in freeLayer ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#8 0x00007ffff7ace33e in msFreeMap ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#9 0x00007ffff7a8576f in msFreeMapServObj ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#10 0x000000000040120e in main ()
(gdb) run
QUERY_STRING='map=/maps/wms/hycom_currents_2.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125'
Starting program: /usr/lib/cgi-bin/mapserv
QUERY_STRING='map=/maps/wms/hycom_currents_2.map&mode=query&depth=0&layers=query&mapxy=-77.534375+34.003125'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*** Error in `/usr/lib/cgi-bin/mapserv': malloc(): memory corruption:
0x00000000006781f0 ***
Program received signal SIGABRT, Aborted.
0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7461c37 in __GI_raise (sig=sig at entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff7465028 in __GI_abort () at abort.c:89
#2 0x00007ffff749e2a4 in __libc_message (do_abort=1,
fmt=fmt at entry=0x7ffff75ac6b0 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff74abe26 in malloc_printerr (ptr=0x6781f0,
str=0x7ffff75a8882 "malloc(): memory corruption", action=<optimized
out>)
at malloc.c:4996
#4 _int_malloc (av=0x7ffff77e9760 <main_arena>, bytes=4) at malloc.c:3447
#5 0x00007ffff74ad6c0 in __GI___libc_malloc (bytes=4) at malloc.c:2891
#6 0x00007ffff74b372a in __GI___strdup (s=0x7ffff7b6c3b3 "gif") at
strdup.c:42
#7 0x00007ffff7a663aa in msStrdup ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#8 0x00007ffff7a46a01 in msCreateDefaultOutputFormat ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#9 0x00007ffff7a47712 in msSelectOutputFormat ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#10 0x00007ffff7a47768 in msApplyDefaultOutputFormats ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#11 0x00007ffff7a85cb6 in msReturnTemplateQuery ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#12 0x00007ffff7a55a7c in msCGIDispatchQueryRequest ()
from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#13 0x000000000040118f in main ()
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the MapServer-users
mailing list