Mapserver 4.4 CGI segfaults

Nick Johnson arachnid at NOTDOT.NET
Fri Dec 24 02:59:54 PST 2004


Hi,

I've downloaded and compiled Mapserver 4.4, and whilst the PHP module
seems to work fine (PHP5 on Apache 2), the CGI program consistently
segfaults.

For example:
arachnid at calculon mapserver-4.4.0 $ ./mapserv
"QUERY_STRING=map=hellow.map&mode=map"
Segmentation fault

The map file in this case is the trivial example 'hello world' one from
the mapserver examples in the docs section, but the segfault occurs on
any map file - it even occurs if the map file doesn't even exist!

Running mapserver under gdb:
arachnid at calculon mapserver-4.4.0 $ gdb ./mapserv
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run "QUERY_STRING=map=hellow.map&mode=map"
Starting program: /mnt/content/home/arachnid/mapserver-4.4.0/mapserv
"QUERY_STRING=map=hellow.map&mode=map"
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 18391)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 18391)]
0x08069565 in loadMapInternal ()

(gdb) backtrace
#0  0x08069565 in loadMapInternal ()
#1  0x0804e641 in loadMap ()
#2  0x0805128b in main ()

Unfortunately, I don't have the standard libraries compiled with debug
flags, so that's all I get.
My configure arguments were:

'--with-proj=/usr/local' '--with-geos=/usr/local/bin/geos-confi
g' '--with-ogr=/usr/local/bin/gdal-config'
'--with-gdal=/usr/local/bin/gdal-conf
ig' '--with-postgis=yes' '--with-ming=/usr/lib/ming'
'--with-httpd=/usr/sbin/apa
che2' '--with-php=/usr/include/php'
'--with-php-regex-dir=/var/tmp/portage/php-5
.0.2-r1/work/php-5.0.2/regex'

Is anyone able to suggest why this might be segfaulting? The CGI isn't
vitally important to me, but it'd still be nice if it actually worked...

-Nick Johnson



More information about the MapServer-users mailing list