[mapserver-users] PHP MapScript request handling gives seg fault error in libgdal

Rob Marjot rob.marjot at gmail.com
Mon Oct 12 10:24:54 PDT 2020


Yes, I will.

Any additional background information you can share on the adviced PROJ<6
(or PROJ<=6, e.g. the current 6.3.2)

Thanks,
Rob

Op ma 12 okt. 2020 om 19:17 schreef Jeff McKenna <
jmckenna at gatewaygeomatics.com>:

> Hi Rob,
>
> Next I would remove the ECW support/reliance and try to trigger the
> error without ECW data (yes with a local mapfile called from shp2img).
>
> Maybe others have ideas.
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2020-10-12 2:11 p.m., Rob Marjot wrote:
> > Hi Jeff, all,
> >
> > Thank you for your thoughts on this. Can you elaborate on the PROJ<6
> > remark; serious performance hits?
> >
> > Indeed, I am on the NG (SWIG) MapScript. Trying with shp2img and mapserv
> > -nh will require to have the equivalent .map file on disk; I will work
> > on that soon.
> >
> > Taking a complete different approach, I have been able to reproduce the
> > same problem by:
> > 1. Installing *binaries* for MapServer 7.6.1, GDAL 3.1.3 and PROJ 7.1.1
> > from UbuntuGIS Unstable
> > 2. Add ECW support through compiling the simple GDAL-plugin (tested:
> > gdal_translate from ECW to GTiff works brilliantly)
> > 3. Configured this to run in the context of 7.4 PHP-FPM
> >
> > Again the seg fault. Connecting to PHP-FPM from either Apache or NGINX
> > does not make a difference, but that's no surprise.
> >
> > Rob
> >
> > Op ma 12 okt. 2020 om 15:38 schreef Jeff McKenna
> > <jmckenna at gatewaygeomatics.com <mailto:jmckenna at gatewaygeomatics.com>>:
> >
> >     Hi Rob,
> >
> >     I'm not sure what is happening in your case, but make sure that you
> are
> >     using the recommended PHP SWIG MapScript in your build
> >     (-DWITH_PHPNG=1),
> >     as the old PHP MapScript is unmaintained.
> >
> >     Some other thoughts:
> >
> >     - can you trigger this with shp2img at the commandline? (this will
> >     remove MapScript/Apache/WMS from the equation)
> >     https://mapserver.org/utilities/shp2img.html
> >
> >     - also, try your GetMap request at the commandline with:
> >
> >           mapserv -nh
> >
>  "QUERY_STRING=map=/ms4w/apps/local-demo/local-demo.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&..."
> >
> >       > ttt.png
> >
> >     But if I can speak openly here, I believe most production instances
> are
> >     still running PROJ<6, so everyone is beginning to experiment with
> >     settings of FCGI/PHP-FPM for GDAL3+PROJ7 (as there is a noticeable
> >     performance hit with the new PROJ).
> >
> >     In other words, keep us posted here on your testing and
> configuration;
> >     also, do consider documenting your configuration and workaround on
> the
> >     MapServer wiki, so others can follow:
> >     https://github.com/MapServer/MapServer/wiki
> >
> >     Thanks Rob!
> >
> >     -jeff
> >
> >
> >
> >     --
> >     Jeff McKenna
> >     MapServer Consulting and Training Services
> >     co-founder of FOSS4G
> >     http://gatewaygeo.com/
> >
> >
> >
> >     On 2020-10-09 9:44 p.m., Rob Marjot wrote:
> >      > Hi All,
> >      >
> >      > I am running latest MapServer 7.6.1 compiled from source on
> >     Ubuntu 20.04
> >      > with (also from source):
> >      > - proj-7.1.0
> >      > - gdal-3.1.2
> >      >
> >      > Using the ppa:ondrej/php repo, I installed the following PHP
> >     packages:
> >      > php7.4 php7.4-fpm php7.4-dev
> >      > Apache/2.4.41 proxies into the FPM over unix socket
> >      >
> >      > Compiling MapServer went smoothly and through the configuration
> >     of the
> >      > extension in PHP, MapScript is available. When I call (HTTP GET)
> >     my PHP
> >      > script to handle a WMS-formatted request [ OWSDispatch() ], the
> >     first 2
> >      > requests are handled fine (returns a rendered map image), but the
> >     next
> >      > two make the PHP-FPM crash:
> >      > /var/log/syslog:
> >      > Oct 10 01:59:25 as02 kernel: [3663532.034251] php-fpm7.4[1260175]:
> >      > segfault at 28 ip 00007fbce21fb3eb sp 00007ffe87f600e0 error 6 in
> >      > libgdal.so.27.0.2[7fbce152e000+d50000]
> >      > Oct 10 01:59:25 as02 kernel: [3663532.034262] Code: 8b 15 81 de
> >     56 00 e9
> >      > 24 2d 38 ff 0f 1f 40 00 f3 0f 1e fa 41 54 49 89 f4 55 48 89 d5 53
> >     89 fb
> >      > 48 89 cf e8 e8 f0 ff ff 48 63 fb <4c> 89 24 f8 48 89 ac f8 00 01
> >     00 00
> >      > 5b 5d 41 5c c3 0f 1f 40 00 f3
> >      >
> >      > What could be the problem? Any help is much appreciated.
> >      >
> >      > Best,
> >      > Rob Marjot
> >      >
> >      >
> >     _______________________________________________
> >     mapserver-users mailing list
> >     mapserver-users at lists.osgeo.org <mailto:
> mapserver-users at lists.osgeo.org>
> >     https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20201012/7190a61c/attachment.html>


More information about the mapserver-users mailing list