[mapserver-users] Mapserver crashing on CentOS 7 displaying jp2 files
Stephen Woodbridge
stephenwoodbridge37 at gmail.com
Fri Jun 15 10:32:12 PDT 2018
Hi all,
I've run into a problem with mapserver crashing processing a jp2 file.
In gdb (no symbols), it say the crash is in libgdal. I didn't download
these rpms or build mapserver on this server but this is the list that
appears to be here:
[root at gis2 ~]# ls mapserver
armadillo-8.300.0-1.el7.x86_64.rpm libaec-1.0.2-1.el7.x86_64.rpm
arpack-3.1.3-2.el7.x86_64.rpm libdap-3.13.1-2.el7.x86_64.rpm
cfitsio-3.370-10.el7.x86_64.rpm libgeotiff-1.2.5-14.el7.x86_64.rpm
CharLS-1.0-5.el7.x86_64.rpm libgta-1.0.4-1.el7.x86_64.rpm
epel-release-7-11.noarch.rpm mapcache-1.4.1
fcgi-2.4.0-25.el7.x86_64.rpm mapcache-1.4.1.tar.gz
fcgi-devel-2.4.0-25.el7.x86_64.rpm mapserver-7.0.1
freexl-1.0.5-1.el7.x86_64.rpm mapserver-7.0.1.tar.gz
fribidi-0.19.4-6.el7.x86_64.rpm netcdf-4.3.3.1-5.el7.x86_64.rpm
fribidi-devel-0.19.4-6.el7.x86_64.rpm ogdi-3.2.0-0.19.beta2.el7.x86_64.rpm
gdal-1.11.4-3.el7.x86_64.rpm openblas-openmp-0.2.20-6.el7.x86_64.rpm
gdal-devel-1.11.4-3.el7.x86_64.rpm openjpeg2-2.3.0-6.el7.x86_64.rpm
gdal-libs-1.11.4-3.el7.x86_64.rpm proj-4.8.0-4.el7.x86_64.rpm
geos-3.4.2-2.el7.x86_64.rpm proj-devel-4.8.0-4.el7.x86_64.rpm
geos-devel-3.4.2-2.el7.x86_64.rpm proj-epsg-4.8.0-4.el7.x86_64.rpm
geos-php-3.4.2-2.el7.x86_64.rpm proj-nad-4.8.0-4.el7.x86_64.rpm
geos-python-3.4.2-2.el7.x86_64.rpm proj-static-4.8.0-4.el7.x86_64.rpm
giflib-devel-4.1.6-9.el7.x86_64.rpm SuperLU-5.2.0-5.el7.x86_64.rpm
hdf5-1.8.12-10.el7.x86_64.rpm
and it appears that mapserver was compiled and install locally:
[root at gis2 ~]# ls mapserver/mapserver-7.0.1/build
CMakeCache.txt libmapserver.so mapserver-config.cmake
msencrypt shptreevis
CMakeFiles libmapserver.so.2 mapserver-config.h
scalebar sortshp
cmake_install.cmake libmapserver.so.7.0.1
mapserver-config-version.cmake shp2img tile4ms
install_manifest.txt Makefile mapserverTargets.cmake shptree
legend mapserv mapserver-version.h shptreetst
Is there a good CentOS el7 repository that has mapserver and dependency
in it? Where?
[root at gis2 ~]# mapserv -v
MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER
SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
MAP
NAME one_jp2
STATUS ON
CONFIG "ON_MISSING_DATA" "IGNORE"
EXTENT 42.595661 12.307802 54.566347 19.0
UNITS dd
PROJECTION
"init=epsg:4326"
END
MAXSIZE 4096
SIZE 2400 1000
IMAGECOLOR 255 255 255
IMAGETYPE png
OUTPUTFORMAT
NAME "png"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "png"
IMAGEMODE RGBA
TRANSPARENT on
FORMATOPTION "INTERLACE=OFF"
#FORMATOPTION "QUANTIZE_FORCE=on"
#FORMATOPTION "QUANTIZE_COLORS=256"
#FORMATOPTION "QUANTIZE_NEW=on"
END
OUTPUTFORMAT
NAME gif
EXTENSION gif
MIMETYPE "image/gif"
DRIVER "GD/GIF"
FORMATOPTION "INTERLACE=OFF"
IMAGEMODE PC256
TRANSPARENT on
END
OUTPUTFORMAT
NAME jpeg
EXTENSION jpg
MIMETYPE "image/jpeg"
DRIVER "AGG/JPEG"
FORMATOPTION "QUALITY=70"
IMAGEMODE RGB
FORMATOPTION "INTERLACE=OFF"
END
WEB
#IMAGEPATH "/maps/images.tmp/"
#IMAGEURL "/images.tmp/"
METADATA
"wms_title" "Testing"
"wms_srs" "EPSG:4326"
"wms_onlineresource"
"http://localhost/cgi-bin/mapserv?map=/home/techapps/maps/one.map"
"ows_enable_request" "*"
END
END
#####################################################################################
SHAPEPATH "/home/techapps/satmap/"
LAYER
NAME "one"
STATUS ON
DATA "850011.jp2"
TYPE RASTER
END
END
[root at gis2 maps]# shp2img -m one.map -l one -o junk.png -i jpeg -all_debug 5
OUTPUTFORMAT gif has TRANSPARENT set ON, but an IMAGEMODE
of RGB instead of RGBA. Changing imagemode to RGBA.
msLoadMap(): 0.000s
msDrawMap(): rendering using outputformat named jpeg (AGG/JPEG).
msDrawRasterLayerLow(one): entering.
msDrawRasterLayerGDAL(): Entering transform.
msDrawRasterLayerGDAL(): src=0,0,29364,25856, dst=1533,89,89,79
msDrawRasterLayerGDAL(): source raster PL (-1.516,-24.173) for dst PL
(1533,89).
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,0
Segmentation fault (core dumped)
[root at gis2 satmap]# gdalinfo 850011.jp2
Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
Files: 850011.jp2
850011.j2w
Size is 29364, 25856
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (50.811767578125000,18.406654712112974)
Pixel Size = (0.000020390753690,-0.000020390753690)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 50.8117676, 18.4066547) ( 50d48'42.36"E, 18d24'23.96"N)
Lower Left ( 50.8117676, 17.8794314) ( 50d48'42.36"E, 17d52'45.95"N)
Upper Right ( 51.4105217, 18.4066547) ( 51d24'37.88"E, 18d24'23.96"N)
Lower Right ( 51.4105217, 17.8794314) ( 51d24'37.88"E, 17d52'45.95"N)
Center ( 51.1111446, 18.1430430) ( 51d 6'40.12"E, 18d 8'34.95"N)
Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red
Overviews: 14682x12928, 7341x6464, 3670x3232, 1835x1616, 917x808
Overviews: arbitrary
Band 2 Block=1024x1024 Type=Byte, ColorInterp=Green
Overviews: 14682x12928, 7341x6464, 3670x3232, 1835x1616, 917x808
Overviews: arbitrary
Band 3 Block=1024x1024 Type=Byte, ColorInterp=Blue
Overviews: 14682x12928, 7341x6464, 3670x3232, 1835x1616, 917x808
Overviews: arbitrary
[root at gis2 satmap]# gdalinfo -stats 850011.jp2
Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
Files: 850011.jp2
850011.j2w
Size is 29364, 25856
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (50.811767578125000,18.406654712112974)
Pixel Size = (0.000020390753690,-0.000020390753690)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 50.8117676, 18.4066547) ( 50d48'42.36"E, 18d24'23.96"N)
Lower Left ( 50.8117676, 17.8794314) ( 50d48'42.36"E, 17d52'45.95"N)
Upper Right ( 51.4105217, 18.4066547) ( 51d24'37.88"E, 18d24'23.96"N)
Lower Right ( 51.4105217, 17.8794314) ( 51d24'37.88"E, 17d52'45.95"N)
Center ( 51.1111446, 18.1430430) ( 51d 6'40.12"E, 18d 8'34.95"N)
Band 1 Block=1024x1024 Type=Byte, ColorInterp=Red
Segmentation fault (core dumped)
ok, this seems to be the problem. gdal can actually read the band data.
So now I'm not sure what the issue/fix for this is.
Any ideas appreciated.
-Steve W
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the MapServer-users
mailing list