Bug report #14029

Server crash upon first read of a project

Added by Paolo Cavallini over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:QGIS Server
Affected QGIS version:2.8.4 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:22042

Description

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

History

#1 Updated by Paolo Cavallini over 8 years ago

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

#2 Updated by René-Luc ReLuc over 8 years ago

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 ?

#3 Updated by Jürgen Fischer over 8 years ago

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

#4 Updated by Paolo Cavallini over 8 years ago

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

#5 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Open to Feedback

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

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

#7 Updated by Paolo Cavallini over 8 years ago

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.

#8 Updated by Giovanni Manghi over 8 years ago

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

#9 Updated by Paolo Cavallini over 8 years ago

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

#10 Updated by Lionel Bargeot over 8 years ago

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

#11 Updated by Paolo Cavallini over 8 years ago

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

#12 Updated by Lionel Bargeot over 8 years ago

no xvfb for me, just a server in console mode.
crash happens with
  • 2.12.3.13jessie package
  • 2.12.3.20trusty package

#13 Updated by Nyall Dawson over 8 years ago

Possibly related to #13919

#14 Updated by Lionel Bargeot over 8 years ago

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.

#15 Updated by Lionel Bargeot over 8 years ago

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.

#16 Updated by Paolo Cavallini over 8 years ago

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.

#17 Updated by Lionel Bargeot over 8 years ago

thanks Paolo,
Your right, it's a different bug.
you wrote here #9295
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.

#18 Updated by Nyall Dawson over 8 years ago

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

#19 Updated by Paolo Cavallini over 8 years ago

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

#20 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

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.

Also available in: Atom PDF