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

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Oct 12 06:38:05 PDT 2020


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
> 
>



More information about the MapServer-users mailing list