Bug report #10379
Qgis mapserv: Flaky WFS GetFeature
|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|
This call used to work fine in early Ubuntugis builds of 2.3:
In latest build it sometimes work, but mostly not. Sometimes I get "500 Internal server error" sometimes I get "RequestNotWellFormed".
This call seems to work all the time:
No matter if I get the right return or not it is always very slow.
#8 Updated by Jürgen Fischer over 6 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.
#13 Updated by René-Luc ReLuc over 6 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?
#15 Updated by Henrik Uggla over 6 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.
#17 Updated by Jukka Rahkonen over 6 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 18.104.22.168. 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.
#20 Updated by Henrik Uggla over 6 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
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.