mapserv segfaults

Sean Gillies sgillies at FRII.COM
Wed Feb 9 21:44:15 EST 2005


John, add a

   DEBUG ON

to the Map-level block in your map config file.  This will write
messages to stderr, including names of layers being accessed.  This
should let you know which layer (if any) is associated with the
segfault.

Now that you've recompiled, run mapserv under gdb exactly as Steve
Woodbridge described.  This time gdb should give a more detailed
description of the location of the memory error including all the
MapServer functions that have been called.  Give us a look at that and
we can try to figure out what's going on.

cheers,
Sean

On Feb 9, 2005, at 5:28 PM, John C Cartwright wrote:

> Thanks, Sean. I recompiled with debugging, can you provide me a little
> guidance on what would be helpful to get out of gdb?
>
> ...
> Thanks again for your patience and help!
>
> -- john
>

> Sean Gillies wrote:
>> John,
>> Looks to me like you need to re-config mapserver with --enable-debug
>> so
>> that gdb can tell us more about the calling stack.
>> cheers,
>> Sean
>> On Feb 9, 2005, at 5:08 PM, John C Cartwright wrote:
>>> Hi Steve,
>>>
>>> thanks for the prompt response and the suggestion.
>>>
>>> gdb is just telling me the error occurred in memory allocation, but
>>> this
>>> is not helping me much:
>>>
>>> (gdb) run
>>> Starting program: /extra/contrib/apache/cgi-bin/mapserver-4.4.1
>>> [Thread debugging using libthread_db enabled]
>>> [New Thread -1218617216 (LWP 8708)]
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> [Switching to Thread -1218617216 (LWP 8708)]
>>> 0x039ba0d1 in realloc () from /lib/tls/libc.so.6
>>>
>>> I was hoping to tell what request parameter or map configuration
>>> element
>>> might be causing trouble. Can you think of any way for me to pursue
>>> this
>>> at a higher level?
>>>
>>> Thanks!
>>>
>>> -- john
>>>
>>>
>>>
>>> Stephen Woodbridge wrote:
>>>
>>>> John,
>>>>
>>>> You can run mapserver cgi at the command line, but you need to set
>>>> up
>>>> the environment variables first, like
>>>>
>>>> export REQUEST_METHOD=GET
>>>> export QUERY_STRING="...."
>>>> gdb mapserv
>>>> run
>>>>
>>>> set your QUERY_STRING appropriately
>>>>
>>>> -Steve W.
>>>
>>>
>



More information about the mapserver-users mailing list