stU*_*Urb 7 postgresql spatial postgis postgresql-9.3
我遇到了一个我无法解决的奇怪问题。服务器在执行一些 postgis 相关查询时崩溃。一些调试后,使用实例 提供由PostGIS的,它出现在ST_GEOMFROMGeoJSON()函数引起服务器崩溃。
崩溃:
SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-48.23456,20.12345]}')) As wkt;
Run Code Online (Sandbox Code Playgroud)
运行正常:
SELECT ST_AsText(
ST_Transform(
ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
743265 2967450,743265.625 2967416,743238 2967416))',2249)
,4326)
) As wgs_geom;
Run Code Online (Sandbox Code Playgroud)
查看日志时,我发现这些条目与崩溃相关:
2014-11-21 11:27:46 CET LOG: server process (PID 2377) was terminated by signal 11: Segmentation fault
2014-11-21 11:27:46 CET DETAIL: Failed process was running: SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-48.23456,20.12345]}')) As wkt;
2014-11-21 11:27:46 CET LOG: terminating any other active server processes
2014-11-21 11:27:46 CET WARNING: terminating connection because of crash of another server process
2014-11-21 11:27:46 CET DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2014-11-21 11:27:46 CET HINT: In a moment you should be able to reconnect to the database and repeat your command.
2014-11-21 11:27:46 CET LOG: all server processes terminated; reinitializing
2014-11-21 11:27:46 CET LOG: database system was interrupted; last known up at 2014-11-21 11:24:11 CET
2014-11-21 11:27:46 CET LOG: database system was not properly shut down; automatic recovery in progress
2014-11-21 11:27:46 CET LOG: record with zero length at 18/34BCAD4
2014-11-21 11:27:46 CET LOG: redo is not required
2014-11-21 11:27:46 CET LOG: database system is ready to accept connections
2014-11-21 11:27:46 CET LOG: autovacuum launcher started
Run Code Online (Sandbox Code Playgroud)
搜索网络并没有产生解决方案。也许我没有在寻找正确的问题?
我试图重新启动服务器,因为文件系统可能有一些故障,但没有结果。服务器本身是一台 Ubuntu 12.04 机器作为 VPS。postgresql 服务器是 9.3.5 和 Postgis 2.1.4
更新
Craig Ringer 建议我使用 gdb 来查看进程崩溃时会发生什么。这是第一个输出:
Program received signal SIGSEGV, Segmentation fault.
0xb70dda59 in _IO_vfprintf_internal (s=0xbfde7150, format=<optimized out>, ap=0xbfde7298 "") at vfprintf.c:1630
1630 vfprintf.c: No such file or directory.
Run Code Online (Sandbox Code Playgroud)
这也是输出postgis_full_verion():
POSTGIS="2.1.4 r12966" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009"
GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8"
LIBJSON="UNKNOWN" TOPOLOGY RASTER
Run Code Online (Sandbox Code Playgroud)
我说有什么不对vfprintf.c吗?例如它不存在?
它说 LIBJSON="UNKNOWN" 会产生影响吗?
来自osgeo 门票
我们崩溃问题的根源是库版本不匹配。构建系统使用的是 0.9,但我正在使用 0.11 的系统上进行部署。RPM 包仅将其要求声明为“json-c”,没有任何版本特异性。显然json 不向前二进制兼容,因此打包者要注意:您必须将 json-c 版本固定在包依赖项声明中。
其次是
Resolution set to invalid
Status changed from new to closed
Closing because this is a build problem.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
649 次 |
| 最近记录: |