Skip to content

Commit

Permalink
QGIS_CATCH_SEGV=1 to get backtraces in case of crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Valsecchi committed May 2, 2018
1 parent 52ab2d8 commit a6faa5c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ src:

.PHONY: update-src
update-src: src
cd src && git checkout $(QGIS_BRANCH) && git pull --rebase && git log -n 1
cd src && git checkout $(QGIS_BRANCH) && git pull --rebase && git log -n 1 && git status

.PHONY: build-builder
build-builder:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You can use the following variables (`-e` option in `docker run`):
* PGSERVICEFILE: If you want to change the default of `/project/pg_service.conf`
* QGIS_PROJECT_FILE: If you want to change the default of `/project/project.qgs`
* MAX_REQUESTS_PER_PROCESS: The number of requests a QGIS server will serve before being restarted by apache
* QGIS_CATCH_SEGV: Set to "1" if you want stacktraces in the logs in case of segmentation faults.

## Running the client

Expand Down
3 changes: 2 additions & 1 deletion acceptance_tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
mapserver:
image: camptocamp/qgis-server:${DOCKER_TAG}
environment:
QGIS_SERVER_LOG_LEVEL: 0
QGIS_SERVER_LOG_LEVEL: "0"
QGIS_CATCH_SEGV: "1"
links:
- db
ports:
Expand Down
3 changes: 2 additions & 1 deletion builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ cmake /src \
-DWITH_DESKTOP=ON \
-DWITH_SERVER=ON \
-DWITH_3D=ON \
-DBUILD_TESTING=OFF
-DBUILD_TESTING=OFF \
-DENABLE_TESTS=OFF

ccache -M10G
ninja install
Expand Down
7 changes: 6 additions & 1 deletion server/runtime/usr/local/bin/qgis_mapserv_wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ source /tmp/init_env.sh
# GDAL uses CWD to write temporary files. So we better be in a location writable by www-data.
cd /tmp

exec /usr/local/bin/qgis_mapserv.fcgi "$@"
if [[ "${QGIS_CATCH_SEGV}" == 1 ]]
then
exec catchsegv /usr/local/bin/qgis_mapserv.fcgi "$@"
else
exec /usr/local/bin/qgis_mapserv.fcgi "$@"
fi

0 comments on commit a6faa5c

Please sign in to comment.