[MAPSERVER-USERS] CLOSE_CONNECTION=DEFER - Segmentation fault

Dave Fuhry dfuhry at gmail.com
Sun Apr 20 15:22:27 EDT 2008


Carlos,

   Please retry with v6 of the patch from
http://trac.osgeo.org/mapserver/ticket/2497 and see if problems
remain.  It should make some of the statements shown in your log below
impossible (namely, the lower-case "rollback" and "begin", which were
removed).

   In my testing with cgi, php/mapscript, and python/mapscript, I
can't find any problems.  See a couple of attached testing scripts for
examples of what I tried.

Thanks,

Dave



On Thu, Mar 27, 2008 at 5:16 PM, Carlos_Molina <dr.chamberlain at gmail.com> wrote:
>
>
>  Dave Fuhry wrote:
>  >
>  > Ivan,
>  >
>  >    p.mapper seems to use the typical php
>  > {map,layer}Obj_queryBy{Point,Rect,etc.} functions.  These calls end up
>  > calling the same msPOSTGIS* functions as everything else.
>  >
>  >    I can't seem to reproduce your problem with a simple testcase
>  > (basically, the attached files).  It might help if you can set
>  > log_min_duration_statement = 0 in your postgresql.conf, reproduce the
>  > problem, and send the output from your postgresql log file.  It will
>  > show all commands issued to the database, including the BEGIN, and the
>  > DECLARE CURSOR ..., and FETCH for every layer.
>  >
>  >    I can setup p.mapper if that's necessary to reproduce the problem.
>  >
>  >   (By the way, I assume you're not using an ancient version of
>  > postgis, in the 0.5 - 0.6 era.  There is an alternate codepath for
>  > that, which I have not tested.)
>  >
>  > Thanks,
>  >
>  > Dave
>  >
>
>  Hello Dave,
>
>  I've tried first and second version of your patch and both resolved my first
>  issue of many many BEGIN statements being issued by cursors so my
>  application went back to running smoothly. The sad part is that another
>  issued arised from this patch and It's when using python mapscript and the
>  drawQuery call.
>  If i just render my .map file with draw() I get no trouble, but if I open my
>  map file, get a single layer from it, query the layer, open the layer to
>  retrieve results and call drawQuery() afterwards to render everything like I
>  used to do before the patch, I get the following error(I resumed the sql
>  statements):
>
>  BEGIN
>  DECLARE mycursor BINARY CURSOR FOR SELECT...  // queryByPoint
>  FETCH ALL in mycursor
>  CLOSE mycursor
>  SELECT * FROM... "same as above" WHILE false LIMIT 0 // Dont know why this
>  is issued, might be openLayer or just to get the field names of the table
>
> WARNING:  there is already a transaction in progress
>  BEGIN
>  DECLARE mycursor2 BINARY CURSOR FOR SELECT... // getShape(0)
>  FETCH ALL in mycursor2
>  CLOSE mycursor2
>  ROLLBACK
>  BEGIN
>  DECLARE mycursor2 BINARY CURSOR FOR SELECT... // getShape(1)
>  FETCH ALL in mycursor2
>  CLOSE mycursor2
>  ROLLBACK
>
> ERROR:  DECLARE CURSOR may only be used in transaction blocks
>
> WARNING:  there is no transaction in progress
>  statement: rollback
>  statement: begin
>
> ERROR:  cursor "mycursor" does not exist
>  ABORT
>
>  Regards
>
>  Carlos Molina
>  --
>  View this message in context: http://www.nabble.com/CLOSE_CONNECTION%3DDEFER----Segmentation-fault-tp15786741p16333076.html
>
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
>  _______________________________________________
>
>
> mapserver-users mailing list
>  mapserver-users at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drawquery.py
Type: text/x-python
Size: 123 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080420/02c860ba/drawquery.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ms_test.php
Type: application/x-httpd-php
Size: 584 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080420/02c860ba/ms_test.bin


More information about the mapserver-users mailing list