Segmentation fault - mapserver - postgis

Frank Warmerdam warmerdam at POBOX.COM
Fri Sep 14 05:41:12 PDT 2007


Nilsson Bengt wrote:
>  Hi,
> 
> I'm not sure that it's a fastcgi problem.
> 
> As you can see from the postgresql log, postgresql reports a 
> warning: 'WARNING:  25001: there is already a transaction in progress'.
> 
> The cause of that, I guess, is that mapserver, in mappostgis.c, sends 
> (another) 'BEGIN'. During the first call it also sent a BEGIN. In
> mappostgis.c 
> there is a check on the outcome of the BEGIN (if(!result ||
> PQresultStatus
> (result) != PGRES_COMMAND_OK) { ) and I guess that it won't be OK
> because 
> of the warning.
> 
> Digging around in the postgresql.conf file gave me an idea of changing 
> the '#client_min_messages = notice' to 'client_min_messages = error'. As
> I 
> understand that means that postgresql won't report warnings back to the 
> client, mappostgis, and thus the test won't fail.
> 
> I haven't got any 'Segmentation faults' from the application when
> running it as a static server since my change so I guess I'm on the
> right track. 
> 
> I wonder why mapserver sends repeating BEGINs and no ENDs. I 
> can't find any code for sending an END. Normally, no fastcgi with
> persistant 
> connections, it won't matter since I guess that a closed connection also
> 
> means 'END'.

Bengt,

Good analysis!

This should certainly be filed as a bug report and I'd appreciate
being added in the cc: list.  Likely it should be primarily assigned
to whoever owns the postgis component.

I classify this as loosely a fastcgi problem since it is a problem
that would only come out in fastcgi use (or perhaps long running
mapscript applications).

I *did* use fastcgi with postgis a few years ago so either things
have regressed or there is some specific aspect of your configuration
that tickles the problem.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the MapServer-users mailing list