Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash upon first read of a project #22042

Closed
qgib opened this issue Dec 22, 2015 · 20 comments
Closed

Server crash upon first read of a project #22042

qgib opened this issue Dec 22, 2015 · 20 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server

Comments

@qgib
Copy link
Contributor

qgib commented Dec 22, 2015

Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 14029
Affected QGIS version: 2.8.4
Redmine category:qgis_server


On the same server installation, Debian stable, QGIS 2.8.5, a few projects (including Lizmap demo) work, whereas others systematically cause a qgis server crash. Data source all PostGIS 2 (both on working and non working projects).
Temporary address here:
http://159.213.238.78/lizmap/

terminate called after throwing an instance of 'QgsCsException'
[Tue Dec 22 07:39:33.029733 2015] [fcgid:warn] [pid 4072:tid 140269278136064] [client 127.0.0.1:54515] mod_fcgid: error reading data, FastCGI server closed connection
[Tue Dec 22 07:39:33.029781 2015] [core:error] [pid 4072:tid 140269278136064] [client 127.0.0.1:54515] End of script output before headers: qgis_mapserv.fcgi
2015-12-22 13:39:33	79.1.153.81	warning	2015-12-22 13:39:33	[2] file_get_contents(http://127.0.0.1/cgi-bin/qgis_mapserv.fcgi?map=%2Fhome%2Flizmap_data%2Fgeosisma.qgs&request=GetCapabilities&service=WMS&version=1.3.0): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server
Error /var/www/lizmap-web-client-2.12.2/lizmap/modules/lizmap/classes/lizmapCache.class.php	87
[Tue Dec 22 07:39:35.085083 2015] [fcgid:error] [pid 4070:tid 140269619136384] mod_fcgid: process /usr/lib/cgi-bin/qgis_mapserv.fcgi(5038) exit(communication error), get unexpected signal 6

@qgib
Copy link
Contributor Author

qgib commented Dec 22, 2015

Author Name: Paolo Cavallini (@pcav)


2.8.4 reinstalled, I confirm, it's a regression.

@qgib
Copy link
Contributor Author

qgib commented Dec 22, 2015

Author Name: René-Luc ReLuc (@rldhont)


Can you be more precise :
Do you have problems with other QGIS Provider (OGR: ESRI Shapefile, etc) or only with PostGIS ?
Do you have problems on a specific platform: Debian, Windows, MacOS ?

Do you have a problem on Desktop with PostGIS provider ?

@qgib
Copy link
Contributor Author

qgib commented Dec 23, 2015

Author Name: Jürgen Fischer (@jef-n)


Please include steps to reproduce (sample setup?). What's the difference between the projects that work to the projects that don't?

@qgib
Copy link
Contributor Author

qgib commented Dec 23, 2015

Author Name: Paolo Cavallini (@pcav)


  1. I have only PostGIS layers, so I cannot tell whether the problem is also with other sources (the Lizmap demo, based on shp, however, works)
  2. I only tested on Debian stable
  3. on the desktop I got no crashes with the same projects, but I noticed QGIS hangs often on project close, and I have to kill it by hand
  4. To reproduce it, a project that works with 2.8.4 can be run on a 2.8.5. I systematically get the crash for the non working projects; all this happened on a production server, so I cannot leave a sample non working setup, sorry
  5. I have tried hard to understand the difference between working and crashing projects, but got no clue. Certainly very simple projects (only one layer) work, more complex ones mostly (but not always) do not. I can provide the projects if useful

@qgib
Copy link
Contributor Author

qgib commented Dec 23, 2015

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Dec 25, 2015

Author Name: Jürgen Fischer (@jef-n)


  • subject was changed from QIS server crash upon first read of a project to Server crash upon first read of a project

@qgib
Copy link
Contributor Author

qgib commented Dec 28, 2015

Author Name: Paolo Cavallini (@pcav)


I tried reproducing the issue on another machine with a simple project, activating and deactivating reprojection, and I couldn't. More testing in different context would be appreciated.

@qgib
Copy link
Contributor Author

qgib commented Jan 13, 2016

Author Name: Giovanni Manghi (@gioman)


is this an issue just on single machine, or is confirmed to be a more general one?

@qgib
Copy link
Contributor Author

qgib commented Jan 14, 2016

Author Name: Paolo Cavallini (@pcav)


Tested on two machines, both Debian (one sid, one testing). It would be good to replicate it on other systems too.

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Lionel Bargeot (Lionel Bargeot)


Hi

I've got a similar problem.

  • debian 8
  • qgis-server 2.12.3+13jessie
  • Postgresql/Postgis DB (9.4/2.1)

Qgis server crashes regularly on lizmap-web printing requests. More frequently when Postgis datasources exist in querys but not only (crashes sometimes with shapefile sources)

lizmap logs :

file_get_contents(http://127.0.0.1/cgi-bin/qgis_mapserv.fcgi?geometryname=extent&map=/projet_35_lizmap.qgs&outputformat=GeoJSON&request=GetFeature&service=WFS&typename=tiers&version=1.0.0

Apache logs :

[Mon Jan 18 10:42:18.325305 2016] [fcgid:warn] [pid 20362] [client 127.0.0.1:47507] mod_fcgid: error reading data, FastCGI server closed connection
[Mon Jan 18 10:42:18.325349 2016] [core:error] [pid 20362] [client 127.0.0.1:47507] End of script output before headers: qgis_mapserv.fcgi
[Mon Jan 18 10:42:20.464536 2016] [fcgid:error] [pid 20357] mod_fcgid: process /usr/lib/cgi-bin/qgis_mapserv.fcgi(20430) exit(communication error), get unexpected signal 11


@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Paolo Cavallini (@pcav)


Did you install and config xvfb? Does this happen only with 2.8.5?
Thanks for the feedback.

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Lionel Bargeot (Lionel Bargeot)


no xvfb for me, just a server in console mode.
crash happens with

  • 2.12.3.13jessie package
  • 2.12.3.20trusty package

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Nyall Dawson (@nyalldawson)


Possibly related to #21941

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Lionel Bargeot (Lionel Bargeot)


Hi

I found following messages in syslog that appears during qgis server crash.

Jan 18 10:22:41 cartographie kernel: [753721.992012] qgis_mapserv.fc[19347] general protection ip:7ffdc65d289d sp:7fffa827c428 error:0 in libqgis_core.so.2.12.3[7ffdc61fc000+7b4000]
Jan 18 10:23:04 cartographie kernel: [753744.947393] qgis_mapserv.fc[19481] general protection ip:7f31060cb89d sp:7fffcffddd58 error:0 in libqgis_core.so.2.12.3[7f3105cf5000+7b4000]
Jan 18 10:24:04 cartographie kernel: [753805.608408] qgis_mapserv.fc[19504] general protection ip:7ff8fbaeb89d sp:7fffafe680a8 error:0 in libqgis_core.so.2.12.3[7ff8fb715000+7b4000]
Jan 18 10:24:56 cartographie kernel: [753857.301349] qgis_mapserv.fc[19595]: segfault at 0 ip 00007f04db7803a7 sp 00007fff688adf70 error 4 in libQtCore.so.4.8.6[7f04db5f3000+2e2000]
Jan 18 10:26:00 cartographie kernel: [753921.793079] qgis_mapserv.fc[19624]: segfault at 98 ip 00007fc151eb3872 sp 00007fffac65dc70 error 4 in libQtCore.so.4.8.6[7fc151d13000+2e2000]
Jan 18 10:26:21 cartographie kernel: [753942.496310] qgis_mapserv.fc[19659]: segfault at 0 ip 00007f11e666d89d sp 00007fff99e57568 error 6 in libqgis_core.so.2.12.3[7f11e6297000+7b4000]
Jan 18 10:26:32 cartographie kernel: [753953.073556] qgis_mapserv.fc[19675]: segfault at 100 ip 00007f2e009023a7 sp 00007fffdc9ea690 error 4 in libQtCore.so.4.8.6[7f2e00775000+2e2000]


for me still qgis-server 2.12.3 (debian jessie)

hope this helps.

@qgib
Copy link
Contributor Author

qgib commented Jan 20, 2016

Author Name: Lionel Bargeot (Lionel Bargeot)


My last try with a 2.8.4 (debian jessie backport package). The result is the same.
When I play manualy print request, the first is ok and the second produce a qgis server crash. Fcgi restart qgis and then it works again.
Something strange is that only printing requests crash. I can't make qgis crash with usual GetImage requests.

@qgib
Copy link
Contributor Author

qgib commented Jan 20, 2016

Author Name: Paolo Cavallini (@pcav)


That's a known issue: you need to setup an X server (xvfb is the easiest). See http://www.itopen.it/qgis-server-setup-notes/
The issue described in this ticket is a different beast.

@qgib
Copy link
Contributor Author

qgib commented Jan 22, 2016

Author Name: Lionel Bargeot (Lionel Bargeot)


thanks Paolo,
Your right, it's a different bug.
you wrote here #17904
even after installing and configuring xvfb. This happens quite reliably when attempting to print a layout with layers present in the template legend, but switched off in the TOC.
And I can reproduce it. I've setup an xvfb server, but it didn't change anything.
Perhap's my problem is not a qgis problem.

@qgib
Copy link
Contributor Author

qgib commented Jan 22, 2016

Author Name: Nyall Dawson (@nyalldawson)


Please retest with current master. Done fixes landed yesterday which may improve this.

@qgib
Copy link
Contributor Author

qgib commented Jan 26, 2016

Author Name: Paolo Cavallini (@pcav)


Starting from 2.8.6 the issue seems solved. It would be good if someone could test it in different settings.

@qgib
Copy link
Contributor Author

qgib commented Jan 31, 2016

Author Name: Giovanni Manghi (@gioman)


Paolo Cavallini wrote:

Starting from 2.8.6 the issue seems solved. It would be good if someone could test it in different settings.

tested (also on master), seems ok. Reopen if necessary.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server
Projects
None yet
Development

No branches or pull requests

1 participant