Bug report #10379

Qgis mapserv: Flaky WFS GetFeature

Added by Henrik Uggla about 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:René-Luc ReLuc
Category:QGIS Server
Affected QGIS version:master Regression?:No
Operating System:Ubuntu Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18798


Related issues

Related to QGIS Application - Bug report #5520: Wrong boundingbox values in GetCapabilities for empty layers Closed 2012-04-30

History

#1 Updated by Giovanni Manghi about 10 years ago

  • Status changed from Open to Feedback

is this a regression compared to qgis server 2.2 (or older)?

#2 Updated by Henrik Uggla about 10 years ago

This is a regression compared to qgis server 1.8. WFS is broken in 2.2

#3 Updated by Giovanni Manghi about 10 years ago

  • Status changed from Feedback to Open
  • Priority changed from Normal to Severe/Regression

Henrik Uggla wrote:

This is a regression compared to qgis server 1.8. WFS is broken in 2.2

then tagging this as a blocker.

#4 Updated by Marco Hugentobler about 10 years ago

WFS is broken in 2.2

Also in current developer version (2.3)?

#5 Updated by Henrik Uggla about 10 years ago

I was referring to bug #9674, which is fixed in 2.3 and not related to this bug.

#6 Updated by Henrik Uggla almost 10 years ago

We are prepared to donate some money if we get a guarantee that this issue is resolved before the release of 2.4.

Also, is it possible to download old 2.3 builds to test when the bug was introduced? We're using Ubuntu 12.04.

#7 Updated by Paolo Cavallini almost 10 years ago

Thanks Henrik for this. Please hire a developer you trust to fix this. In case you need help, I'm here:

#8 Updated by Jürgen Fischer almost 10 years ago

Henrik Uggla wrote:

Also, is it possible to download old 2.3 builds to test when the bug was introduced? We're using Ubuntu 12.04.

Unfortunately we only keep the latest build. To get older versions I can only point you at INSTALL which describes how to build packages from source and git bisect to help with identifying which commit introduced the problem.

#9 Updated by Marco Hugentobler almost 10 years ago

  • Assignee set to Marco Hugentobler

Possibly this got broken during the server class redesign.

#10 Updated by Marco Hugentobler almost 10 years ago

Does the 'RequestNotWellFormed" only appear if the feature count is zero (because of bbox constraint)?

#11 Updated by Henrik Uggla almost 10 years ago

No it does not. Try to load the first url I gave ten times in a row. You will get different result (almost) every time and those times it does succeed it returns a feature.

#12 Updated by René-Luc ReLuc almost 10 years ago

  • Assignee changed from Marco Hugentobler to René-Luc ReLuc

I thought I has corrected it. I'll review the code and propose a patch if necessary.

#13 Updated by René-Luc ReLuc almost 10 years ago

Henrik Uggla wrote:

No it does not. Try to load the first url I gave ten times in a row. You will get different result (almost) every time and those times it does succeed it returns a feature.

Does the 5d1eb4e0d92de8209484ea8a64b17eee3560fdca fixed the bug?

#14 Updated by Giovanni Manghi almost 10 years ago

  • Status changed from Open to Feedback

#15 Updated by Henrik Uggla almost 10 years ago

Why is the bounding box always reported as 0,0,0,0 when the feature type given is not found?

A query with a bounding box given (fex 10,555,5,800) and a typename that doesn't exist in the project returns:
<gml:boundedBy><gml:Box><gml:coordinates cs="," ts=" ">0,0 0,0</gml:coordinates></gml:Box></gml:boundedBy>

I think it should return:
<gml:boundedBy><gml:Box><gml:coordinates cs="," ts=" ">10,555 5,800</gml:coordinates></gml:Box></gml:boundedBy>

No big deal though.

#16 Updated by Henrik Uggla almost 10 years ago

I've now done some more testing. The slowness and random response still exist but it only happens for big projects. Remove some random layers from a big project and it works. Earlier Qgis versions doesn't have this problem.

#17 Updated by Jukka Rahkonen almost 10 years ago

What if the boundedBy should be "Null" for GML2 or "Nil" for GML3 when no features are found? I took some excerpts from GML 3.2.1 standard

"9.4.1 boundedBy: This property describes the minimum bounding box or rectangle that encloses the entire feature.

A nil value shall be encoded as described in 8.2.3.2. The attribute nilReason may be used in such cases to specify the reason for the nil value.
The value of gml:Null, used in previous versions of GML to encode that an extent is not applicable or not available for some reason, has been deprecated.
NOTE 1 Since an envelope is defined simply by the positions of two diagonally opposing corners, the exact footprint of an envelope depends on the coordinate reference system used. If the feature being described has zero extent, then the two corners will coincide and the envelope has zero size. The gml:boundedBy property is provided by a data supplier for convenience. The value of the envelope is usually computable by the data consumer from the spatio-temporal properties of a feature. As for all properties, it is the responsibility of the data provider to ensure that the value is correct."

I did not find any examples about how to give boundedBy for an empty geometry collection. However, it is said that when feature is a point (zero extent) then boundedBy must shrink to point as well. It would feel odd that in case of no geometries at all the boundedBy could expand to rectangle.

#18 Updated by Henrik Uggla almost 10 years ago

The bounding box issue is related to #5520

#19 Updated by Marco Hugentobler almost 10 years ago

The slowness and random response still exist but it only happens for big projects

Is the random response because of a server timeout (fcgi process killed because it took too long)?

#20 Updated by Henrik Uggla almost 10 years ago

When I get "Internal server error" the following is written to apache2/error.log:
[Tue Jun 17 09:49:42 2014] [warn] [client 127.0.0.1] mod_fcgid: error reading data, FastCGI server closed connection
[Tue Jun 17 09:49:42 2014] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi
[Tue Jun 17 09:49:42 2014] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue Jun 17 09:49:43 2014] [error] mod_fcgid: process /usr/lib/cgi-bin/externt/bug/qgis_mapserv.fcgi(10126) exit(communication error), get signal 11, possible coredump generated

And this is from apport.log:
ERROR: apport (pid 10132) Tue Jun 17 09:49:42 2014: called for pid 10126, signal 11
ERROR: apport (pid 10132) Tue Jun 17 09:49:42 2014: executable: /usr/lib/cgi-bin/qgis_mapserv.fcgi (command line "/usr/lib/cgi-bin/externt/bug/qgis_mapserv.fcgi")
ERROR: apport (pid 10132) Tue Jun 17 09:49:42 2014: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 10132) Tue Jun 17 09:49:42 2014: apport: report /var/crash/_usr_lib_cgi-bin_qgis_mapserv.fcgi.33.crash already exists and unseen, doing nothing to avoid disk usage DoS

syslog:
Jun 17 09:49:42 sbk-pc114l kernel: [688928.606517] qgis_mapserv.fc10126: segfault at fffffffffffffff8 ip 00007f57eab931ea sp 00007fff9945afb0 error 5 in libstdc++.so.6.0.16[7f57eaadf000+e2000]

A .crash file is written to /var/crash (size 15,6MB).

When the call succeeds (and returns features) or when it returns no feature (fail), nothing is written to the files above. As I've said, those tree results of the same query appear randomly.

#21 Updated by Henrik Uggla almost 10 years ago

  • Status changed from Feedback to Closed

Working fine in latest nightly. Thanks!

Also available in: Atom PDF