Bug report #17087

WFS provider deadlock (freezes forever waiting for mMutex to unlock)

Added by Alessandro Pasotti over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:Even Rouault
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:24986

Description

Steps to reproduce:

- a WFS endpoint is needed (tested with both geoserver and qgis server with same results)
- connect to the WFS server and load a layer in QGIS
- from the python cosole get the publicSource of the layer , for example with iface.currentLayer().publicSource() (in the example below it is 'restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'world\' url=\'http://localhost:8081/cgi-bin/qgis_mapserv.fcgi?MAP=/web/projects/helloworld.qgs\' version=\'auto\' table="" sql='
- from the python console inside QGIS (change the source to your valid WFS public source)

vl = QgsVectorLayer('restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'world\' url=\'http://localhost:8081/cgi-bin/qgis_mapserv.fcgi?MAP=/web/projects/helloworld.qgs\' version=\'auto\' table="" sql=', 'mywfs', 'WFS'); QgsProject.instance().addMapLayers([vl]) and [f for f in vl.dataProvider().getFeatures()]

Expected behavior:
- QGIS loads the layer in the canvas

Actual behavior:
- QGIS freezes forever

stacktrace.txt Magnifier - Full stacktrace (80.5 KB) Alessandro Pasotti, 2017-08-29 03:57 PM


Related issues

Related to QGIS Application - Bug report #17019: Off-line editing does not work with WFS-T layers with mix... Feedback 2017-08-15

Associated revisions

Revision e5b11d42
Added by Alessandro Pasotti over 6 years ago

Merge pull request #5085 from boundlessgeo/wfs_mutex_offline

Offline editing: workaround for bug 17087 deadlock

Revision 75c41f5e
Added by Even Rouault over 6 years ago

[WFS provider] Fix deadlock when adding WFS layer to project from Python console (fixes #17087)

Revision 505e3659
Added by Even Rouault over 6 years ago

[WFS provider] Fix deadlock when adding WFS layer to project from Python console (fixes #17087)

History

#1 Updated by Alessandro Pasotti over 6 years ago

  • Regression? changed from Yes to No

It also affects 2.18

vl = iface.addVectorLayer('user=\'admin\' restrictToRequestBBOX=\'1\' srsname=\'EPSG:4326\' typename=\'opengeo:countries\' url=\'http://localhost:8080/geoserver/wfs\' version=\'auto\' table="" sql=', 'mywfs', 'WFS'); [f for f in vl.dataProvider().getFeatures()]

#2 Updated by Alessandro Pasotti over 6 years ago

QGIS Server Docker to reproduce the issue:

https://github.com/elpaso/qgis-server-docker
docker pull elpaso/qgis-server-docker

#3 Updated by Alessandro Pasotti over 6 years ago

See also #17019 (for the master freeze)

#4 Updated by Jürgen Fischer over 6 years ago

  • Related to Bug report #17019: Off-line editing does not work with WFS-T layers with mixed simple and multi geoms added

#5 Updated by Even Rouault over 6 years ago

  • Assignee set to Even Rouault

#6 Updated by Even Rouault over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF