Opened 19 years ago

Closed 19 years ago

#1496 closed defect (fixed)

[WFS-Server] filter results in seg fault

Reported by: tomkralidis Owned by: assefa
Priority: high Milestone:
Component: WMS Server Version: unspecified
Severity: major Keywords:
Cc:

Description

Hi,

I am having problems with latest CVS against an OWS which has been functioning
normally until sometime this week.

Request URL:

http://devgeo.cciw.ca/cgi-bin/mapserv/owscat?version=1.0.0&service=WFS&r
equest=GetFeature&typename=service_resources&filter=%3CFilter%3E%3CAnd%3
E%3CBBOX%3E%3CPropertyName%3ENAME%3C/PropertyName%3E%3CBox%20srsName='EP
SG:4326'%3E%3Ccoordinates%3E-139,48%20-114,60%3C/coordinates%3E%3C/Box%3
E%3C/BBOX%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Eservice_type%3C/Pro
pertyName%3E%3CLiteral%3EOGC:WMS%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3
COr%3E%3COr%3E%3CPropertyIsLike%20wildCard='*'%20singleChar='.'%20escape
='!'%3E%3CPropertyName%3Etitle%3C/PropertyName%3E%3CLiteral%3E*water*%3C
/Literal%3E%3C/PropertyIsLike%3E%3CPropertyIsLike%20wildCard='*'%20singl
eChar='.'%20escape='!'%3E%3CPropertyName%3Eabstract%3C/PropertyName%3E%3
CLiteral%3E*water*%3C/Literal%3E%3C/PropertyIsLike%3E%3C/Or%3E%3CPropert
yIsLike%20wildCard='*'%20singleChar='.'%20escape='!'%3E%3CPropertyName%3
Ekeywords%3C/PropertyName%3E%3CLiteral%3E*water*%3C/Literal%3E%3C/Proper
tyIsLike%3E%3C/Or%3E%3C/And%3E%3C/Filter%3E&outputFormat=GML3

This gives me a 500 where it never did before.

Running this through gdb gives me the output below.

I saw two changes this week to  mapogcfilter.c.  Perhaps that is the issue?

..Tom






(gdb) set args
QUERY_STRING="map=/usr/local/wwwsites/apache/devgeo.cciw.ca/apps/mapserv
/services/owscat/config.map&version=1.0.0&service=WFS&request=GetFeature
&typename=service_resources&filter=<Filter><And><BBOX><P
ropertyName>NAME</PropertyName><Box
srsName='EPSG:4326'><coordinates>-139,48
-114,60</coordinates></Box></BBOX><PropertyIsEqualTo><PropertyName>servi
ce_type</PropertyName><Literal>OGC:WMS</Literal></PropertyIsEqualT
o><Or><Or><PropertyIsLike wildCard='*' singleChar='.'
escape='!'><PropertyName>title</PropertyName><Literal>*water*</Literal><
/PropertyIsLike><PropertyIsLike wildCard='*' singleChar='.'
escape='!'><PropertyName>abst
ract</PropertyName><Literal>*water*</Literal></PropertyIsLike></Or><Prop
ertyIsLike wildCard='*' singleChar='.'
escape='!'><PropertyName>keywords</PropertyName><Literal>*water*</Litera
l></PropertyIsLike></Or></And></
Filter>&outputFormat=GML3"
(gdb) r
Starting program: /usr/local/bin/mapserv
QUERY_STRING="map=/usr/local/wwwsites/apache/devgeo.cciw.ca/apps/mapserv
/services/owscat/config.map&version=1.0.0&service=WFS&request=GetFeature
&typename=service_resources&fi
lter=<Filter><And><BBOX><PropertyName>NAME</PropertyName><Box
srsName='EPSG:4326'><coordinates>-139,48
-114,60</coordinates></Box></BBOX><PropertyIsEqualTo><PropertyName>servi
ce_type</PropertyName><Literal>OGC:WMS</
Literal></PropertyIsEqualTo><Or><Or><PropertyIsLike wildCard='*'
singleChar='.'
escape='!'><PropertyName>title</PropertyName><Literal>*water*</Literal><
/PropertyIsLike><PropertyIsLike wildCard='*' singleChar='.' esc
ape='!'><PropertyName>abstract</PropertyName><Literal>*water*</Literal><
/PropertyIsLike></Or><PropertyIsLike wildCard='*' singleChar='.'
escape='!'><PropertyName>keywords</PropertyName><Literal>*water*</Litera
l></Pr
opertyIsLike></Or></And></Filter>&outputFormat=GML3"
[Thread debugging using libthread_db enabled]
[New Thread -1208061824 (LWP 7681)]
[Fri Oct  7 20:02:26 2005].282934 msPOSTGISLayerOpen called
datastatement: the_geom from (select service_endpoints.organization as
organization,service_endpoints.endpoint_getresource as
endpoint_getresource,service_ endpoints.service_type as
service_type,service_endpoints.service_version
as service_version,service_resources.the_geom as
the_geom,service_resources.resource_id as
resource_id,service_resources.service_id as service _id,service_resources.name
as name,service_resources.title as title,service_resources.abstract as
abstract,service_resources.keywords
as keywords,service_resources.dataurl as dataurl,service_resources.metadataurl
as  metadataurl,service_resources.legendurl as
legendurl,service_resources.scale_min as scale_min,service_resources.scale_max
as scale_max,service_resources.srs as srs,service_endpoints.format_list as
format_list,servi ce_resources.style_list as
style_list,service_resources.time_extent as
time_extent,service_resources.queryable as queryable from service_resources
inner join service_endpoints on service_endpoints.service_id = servi
ce_resources.service_id) as t using unique resource_id
[Fri Oct  7 20:02:26 2005].284666 MSPOSTGISLayerOpen -- shared connection not
available. [Fri Oct  7 20:02:26 2005].327541
msConnPoolRegister(service_resources,user=postgres
dbname=devgeodb,0x82f1918)
[Fri Oct  7 20:02:26 2005].327961 msPOSTGISLayerFreeItemInfo called [Fri Oct  7
20:02:26 2005].328207 msPOSTGISLayerWhichShapes called [Fri Oct  7 20:02:26
2005].328584 msPOSTGISLayerParseData: unique column = resource_id, srid='',
geom_column_name = the_geom, table_name=(select service_endpoints.organization
as organization,service_endpoints.endpo
int_getresource as endpoint_getresource,service_endpoints.service_type
as service_type,service_endpoints.service_version as
service_version,service_resources.the_geom as
the_geom,service_resources.resource_id as res
ource_id,service_resources.service_id as service_id,service_resources.name as
name,service_resources.title as title,service_resources.abstract as
abstract,service_resources.keywords
as keywords,service_resources.dat
aurl as dataurl,service_resources.metadataurl as
metadataurl,service_resources.legendurl as legendurl,service_resources.scale_min
as scale_min,service_resources.scale_max as scale_max,service_resources.srs as
srs,se rvice_endpoints.format_list as format_list,service_resources.style_list
as style_list,service_resources.time_extent as
time_extent,service_resources.queryable as queryable from service_resources
inner join service_e ndpoints on service_endpoints.service_id =
service_resources.service_id) as t [Fri Oct  7 20:02:26 2005].331242
query_string_0_6:DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),resource_id::text
from (select service_endpoints.organization as orga
nization,service_endpoints.endpoint_getresource as
endpoint_getresource,service_endpoints.service_type as
service_type,service_endpoints.service_version as
service_version,service_resources.the_geom as the_geom,serv
ice_resources.resource_id as resource_id,service_resources.service_id as
service_id,service_resources.name as name,service_resources.title as
title,service_resources.abstract as abstract,service_resources.keywords
a
s keywords,service_resources.dataurl as dataurl,service_resources.metadataurl as
metadataurl,service_resources.legendurl as legendurl,service_resources.scale_min
as scale_min,service_resources.scale_max as scale_max ,service_resources.srs as
srs,service_endpoints.format_list as format_list,service_resources.style_list as
style_list,service_resources.time_extent as
time_extent,service_resources.queryable as queryable from servic e_resources
inner join service_endpoints on service_endpoints.service_id =
service_resources.service_id) as t WHERE ( (service_type= 'OGC:WMS') And  (
(!'!'titie e keke%w%werer e eapap')  Or !'!'ababrara l le e waw
ar%r%esespepe) )  Or !'!'kekeoror l le e wawar%r%esespepe) ) ) and (the_geom &&
setSRID( 'BOX3D(-139 48,-114
60)'::BOX3D,find_srid('','service_resources','the_geom') )) [Fri Oct  7 20:02:26
2005].347362 msPOSTGISLayerFreeItemInfo called [Fri Oct  7 20:02:26 2005].347664
msPOSTGISLayerClose datastatement: the_geom from (select
service_endpoints.organization as
organization,service_endpoints.endpoint_getresource as
endpoint_getresource,service_endpoi
nts.service_type as service_type,service_endpoints.service_version as
service_version,service_resources.the_geom as
the_geom,service_resources.resource_id as
resource_id,service_resources.service_id as service_id,se rvice_resources.name
as name,service_resources.title as title,service_resources.abstract as
abstract,service_resources.keywords
as keywords,service_resources.dataurl as dataurl,service_resources.metadataurl
as metad ataurl,service_resources.legendurl as
legendurl,service_resources.scale_min as scale_min,service_resources.scale_max
as scale_max,service_resources.srs as srs,service_endpoints.format_list as
format_list,service_res ources.style_list as
style_list,service_resources.time_extent as
time_extent,service_resources.queryable as queryable from service_resources
inner join service_endpoints on service_endpoints.service_id = service_res
ources.service_id) as t using unique resource_id
[Fri Oct  7 20:02:26 2005].349031 msPOSTGISLayerClose -- query_result is NULL
[Fri Oct  7 20:02:26 2005].349134 msConnPoolRelease(service_resources,user=postgres
dbname=devgeodb,0x82f1918)
[Fri Oct  7 20:02:26 2005].349246 msConnPoolClose(user=postgres
dbname=devgeodb,0x82f1918)
Content-type: text/xml

<?xml version='1.0' encoding="ISO-8859-1" ?> <owscat:msFeatureCollection
   xmlns:owscat="http://www.ec.gc.ca/owscat"
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.ec.gc.ca/owscat
http://devgeo.cciw.ca/cgi-bin/mapserv/owscat?SERVICE=WFS&amp;VERSION=1.0
.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=service_resources&amp;OU
TPUTFORMAT=SFE_XMLSCH
EMA">
   <gml:boundedBy>
      <gml:null>missing</gml:null>
   </gml:boundedBy>
</owscat:msFeatureCollection>

[Fri Oct  7 20:02:26 2005].356855 msPOSTGISLayerClose datastatement: the_geom
from service_endpoints [Fri Oct  7 20:02:26 2005].357098 msPOSTGISLayerClose --
layerinfo is NULL [Fri Oct  7 20:02:26 2005].357321 msPOSTGISLayerClose
datastatement: the_geom from (select service_endpoints.organization as
organization,service_endpoints.endpoint_getresource as
endpoint_getresource,service_endpoi
nts.service_type as service_type,service_endpoints.service_version as
service_version,service_resources.the_geom as
the_geom,service_resources.resource_id as
resource_id,service_resources.service_id as service_id,se rvice_resources.name
as name,service_resources.title as title,service_resources.abstract as
abstract,service_resources.keywords
as keywords,service_resources.dataurl as dataurl,service_resources.metadataurl
as metad ataurl,service_resources.legendurl as
legendurl,service_resources.scale_min as scale_min,service_resources.scale_max
as scale_max,service_resources.srs as srs,service_endpoints.format_list as
format_list,service_res ources.style_list as
style_list,service_resources.time_extent as
time_extent,service_resources.queryable as queryable from service_resources
inner join service_endpoints on service_endpoints.service_id = service_res
ources.service_id) as t using unique resource_id
[Fri Oct  7 20:02:26 2005].358653 msPOSTGISLayerClose -- layerinfo is NULL

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208061824 (LWP 7681)]
msResetErrorList () at maperror.c:267
267           next_error = this_error->next;

Change History (3)

comment:1 by tomkralidis, 19 years ago

Update: I tested this scenario again with cvs update -D 20051004, and all was
good again.  mapogcfilter.c was updated on 20051005.

I have reverted to CVS 20051004 until this bug is resolved.

comment:2 by assefa, 19 years ago

Cc: mapserver-bugs@… added
Owner: changed from mapserverbugs to assefa
looking into this ...


comment:3 by assefa, 19 years ago

Resolution: fixed
Status: newclosed
update mapogcfiler.c (r1.59). It was a mistake introduced during the last 
commit (Bug 1490).

Note: See TracTickets for help on using tickets.