Opened 4 years ago

Closed 4 years ago

#4733 closed defect (fixed)

MakeValid segfault GEOS 3.9 master (debbie bot)

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS GEOS
Component: QA/buildbots Version: master
Keywords: geos Cc:

Description

This might be related to my patches today on debbie - just usual OS update stuff. I'm seeing this now

04:41:07   Test: test_geos_offsetcurve_crash ...passed
04:41:07   Test: test_geos_makevalid ...make[2]: *** [Makefile:93: check] Segmentation fault (core dumped)
04:41:07 make[2]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.1/liblwgeom/cunit'
04:41:07 make[1]: *** [Makefile:206: check-unit] Error 2
04:41:07 make[1]: Leaving directory '/var/lib/jenkins/workspace/postgis/branches/3.1/liblwgeom'
04:41:07 make: *** [GNUmakefile:20: check-unit] Error 1
04:41:07 Build step 'Execute shell' marked build as failure

This is with the following configure:

FailedConsole Output

04:37:00 Started by upstream project "PostGIS_Trunk/GDAL_VER=2.4,GEOS_VER=3.9,OS_BUILD=64,PG_VER=12,POSTGIS_TAG=branches/3.1" build number 599
04:37:00 originally caused by:
04:37:00  Started by upstream project "PostGIS_Trunk" build number 599
04:37:00  originally caused by:
04:37:00   Started by user Regina Obe
04:37:00 Running as SYSTEM
04:37:00 Building on master in workspace /var/lib/jenkins/workspace/postgis
04:37:00 Waiting for the completion of PostgreSQL stop
04:37:00 PostgreSQL stop #69171 started.
04:37:00 PostgreSQL stop #69171 completed. Result was SUCCESS
04:37:00 Build step 'Trigger/call builds on other projects' changed build result to SUCCESS
04:37:00 Waiting for the completion of PostgreSQL_InitDB
04:37:00 PostgreSQL_InitDB #31059 started.
04:37:04 PostgreSQL_InitDB #31059 completed. Result was SUCCESS
04:37:04 Waiting for the completion of PostgreSQL_start
04:37:04 PostgreSQL_start #30910 started.
04:37:04 PostgreSQL_start #30910 completed. Result was SUCCESS
04:37:04 [postgis] $ /bin/bash /tmp/jenkins4221017186142634558.sh
04:37:04 --
04:37:04 (1 row)
04:37:04 
04:37:04 NOTICE:  database "postgis_reg" does not exist, skipping
04:37:04 DROP DATABASE
04:37:04 3112
04:37:04 3.1
04:37:05 * Running /usr/bin/libtoolize (2.4.6)
04:37:05    OPTIONS = --force --copy --install
04:37:06 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
04:37:06 libtoolize: copying file 'build-aux/config.guess'
04:37:06 libtoolize: copying file 'build-aux/config.sub'
04:37:06 libtoolize: copying file 'build-aux/install-sh'
04:37:06 libtoolize: copying file 'build-aux/ltmain.sh'
04:37:06 libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'macros'.
04:37:06 libtoolize: copying file 'macros/libtool.m4'
04:37:06 libtoolize: copying file 'macros/ltoptions.m4'
04:37:06 libtoolize: copying file 'macros/ltsugar.m4'
04:37:06 libtoolize: copying file 'macros/ltversion.m4'
04:37:06 libtoolize: copying file 'macros/lt~obsolete.m4'
04:37:06 libtoolize: Consider adding '-I macros' to ACLOCAL_AMFLAGS in Makefile.am.
04:37:06 * Running /usr/bin/aclocal (1.16.2)
04:37:10 * Running /usr/bin/autoconf (2.69)
04:37:11 ======================================
04:37:11 Now you are ready to run './configure'
04:37:11 ======================================
04:37:12 checking for a BSD-compatible install... /usr/bin/install -c
04:37:12 checking build system type... x86_64-pc-linux-gnu
04:37:12 checking host system type... x86_64-pc-linux-gnu
04:37:12 checking how to print strings... printf
04:37:12 checking for gcc... gcc
04:37:12 checking whether the C compiler works... yes
04:37:12 checking for C compiler default output file name... a.out
04:37:12 checking for suffix of executables... 
04:37:12 checking whether we are cross compiling... no
04:37:12 checking for suffix of object files... o
04:37:12 checking whether we are using the GNU C compiler... yes
04:37:13 checking whether gcc accepts -g... yes
04:37:13 checking for gcc option to accept ISO C89... none needed
04:37:13 checking for a sed that does not truncate output... /bin/sed
04:37:13 checking for grep that handles long lines and -e... /bin/grep
04:37:13 checking for egrep... /bin/grep -E
04:37:13 checking for fgrep... /bin/grep -F
04:37:13 checking for ld used by gcc... /usr/bin/ld
04:37:13 checking if the linker (/usr/bin/ld) is GNU ld... yes
04:37:13 checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
04:37:13 checking the name lister (/usr/bin/nm -B) interface... BSD nm
04:37:13 checking whether ln -s works... yes
04:37:13 checking the maximum length of command line arguments... 1572864
04:37:13 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
04:37:13 checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
04:37:13 checking for /usr/bin/ld option to reload object files... -r
04:37:13 checking for objdump... objdump
04:37:13 checking how to recognize dependent libraries... pass_all
04:37:13 checking for dlltool... no
04:37:13 checking how to associate runtime and link libraries... printf %s\n
04:37:13 checking for ar... ar
04:37:13 checking for archiver @FILE support... @
04:37:13 checking for strip... strip
04:37:13 checking for ranlib... ranlib
04:37:13 checking for gawk... no
04:37:13 checking for mawk... mawk
04:37:13 checking command to parse /usr/bin/nm -B output from gcc object... ok
04:37:13 checking for sysroot... no
04:37:13 checking for a working dd... /bin/dd
04:37:13 checking how to truncate binary pipes... /bin/dd bs=4096 count=1
04:37:13 checking for mt... no
04:37:13 checking if : is a manifest tool... no
04:37:13 checking how to run the C preprocessor... gcc -E
04:37:13 checking for ANSI C header files... yes
04:37:14 checking for sys/types.h... yes
04:37:14 checking for sys/stat.h... yes
04:37:14 checking for stdlib.h... yes
04:37:14 checking for string.h... yes
04:37:14 checking for memory.h... yes
04:37:14 checking for strings.h... yes
04:37:14 checking for inttypes.h... yes
04:37:14 checking for stdint.h... yes
04:37:14 checking for unistd.h... yes
04:37:15 checking for dlfcn.h... yes
04:37:15 checking for objdir... .libs
04:37:15 checking if gcc supports -fno-rtti -fno-exceptions... no
04:37:15 checking for gcc option to produce PIC... -fPIC -DPIC
04:37:15 checking if gcc PIC flag -fPIC -DPIC works... yes
04:37:15 checking if gcc static flag -static works... yes
04:37:15 checking if gcc supports -c -o file.o... yes
04:37:15 checking if gcc supports -c -o file.o... (cached) yes
04:37:15 checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
04:37:15 checking whether -lc should be explicitly linked in... no
04:37:15 checking dynamic linker characteristics... GNU/Linux ld.so
04:37:16 checking how to hardcode library paths into programs... immediate
04:37:16 checking whether stripping libraries is possible... yes
04:37:16 checking if libtool supports shared libraries... yes
04:37:16 checking whether to build shared libraries... yes
04:37:16 checking whether to build static libraries... yes
04:37:16 checking for gcc... (cached) gcc
04:37:16 checking whether we are using the GNU C compiler... (cached) yes
04:37:16 checking whether gcc accepts -g... (cached) yes
04:37:16 checking for gcc option to accept ISO C89... (cached) none needed
04:37:16 checking how to run the C preprocessor... gcc -E
04:37:16 checking for grep that handles long lines and -e... (cached) /bin/grep
04:37:16 checking whether byte ordering is bigendian... no
04:37:16 checking for cpp... /usr/bin/cpp
04:37:16 checking if gcc supports -fno-math-errno... yes
04:37:16 checking if gcc supports -fno-signed-zeros... yes
04:37:16 checking if gcc supports -std=gnu99... yes
04:37:16 checking if gcc supports --exclude-libs... yes
04:37:16 checking for flex... flex
04:37:16 checking lex output file root... lex.yy
04:37:16 checking lex library... -lfl
04:37:17 checking whether yytext is a pointer... yes
04:37:18 checking for bison... /usr/bin/bison
04:37:18 checking ieeefp.h usability... no
04:37:18 checking ieeefp.h presence... no
04:37:18 checking for ieeefp.h... no
04:37:18 checking termios.h usability... yes
04:37:18 checking termios.h presence... yes
04:37:18 checking for termios.h... yes
04:37:18 checking for vasprintf... yes
04:37:18 checking for asprintf... yes
04:37:19 checking for _LARGEFILE_SOURCE value needed for large files... no
04:37:19 checking for perl... /usr/bin/perl
04:37:19 checking for xsltproc... /usr/bin/xsltproc
04:37:19 checking for convert... /usr/bin/convert
04:37:19 checking for dblatex... /usr/bin/dblatex
04:37:19 checking for xmllint... /usr/bin/xmllint
04:37:19 checking for pkg-config... /usr/bin/pkg-config
04:37:19 checking pkg-config is at least version 0.9.0... yes
04:37:19 checking for CUNIT... yes
04:37:19 checking iconv.h usability... yes
04:37:19 checking iconv.h presence... yes
04:37:19 checking for iconv.h... yes
04:37:19 checking for libiconv_open in -liconv... no
04:37:19 checking for iconv_open in -lc... yes
04:37:19 checking for iconvctl... no
04:37:19 checking for libiconvctl... no
04:37:19 Using user-specified pg_config file: /var/lib/jenkins/workspace/pg/rel/pg12w64/bin/pg_config
04:37:19 checking PostgreSQL version... PostgreSQL 12.3
04:37:19 checking libpq-fe.h usability... yes
04:37:19 checking libpq-fe.h presence... yes
04:37:20 checking for libpq-fe.h... yes
04:37:20 checking for PQserverVersion in -lpq... yes
04:37:20 ------------------------------------------------------------------------
04:37:20   WARNING: You have set the --prefix to '/var/lib/jenkins/workspace/pg/rel/pg12w64'. But we mostly    
04:37:20   ignore the --prefix. For your info, using the values determined from 
04:37:20   /var/lib/jenkins/workspace/pg/rel/pg12w64/bin/pg_config we will be installing:   
04:37:20     * postgis shared library in /var/lib/jenkins/workspace/pg/rel/pg12w64/lib 
04:37:20     * postgis SQL files in /var/lib/jenkins/workspace/pg/rel/pg12w64/share/postgresql/contrib/postgis-3.1 
04:37:20     * postgis executables in /var/lib/jenkins/workspace/pg/rel/pg12w64/bin 
04:37:20 ------------------------------------------------------------------------
04:37:20 checking for xml2-config... /usr/bin/xml2-config
04:37:20 checking libxml/tree.h usability... yes
04:37:20 checking libxml/tree.h presence... yes
04:37:20 checking for libxml/tree.h... yes
04:37:20 checking libxml/parser.h usability... yes
04:37:20 checking libxml/parser.h presence... yes
04:37:20 checking for libxml/parser.h... yes
04:37:20 checking libxml/xpath.h usability... yes
04:37:20 checking libxml/xpath.h presence... yes
04:37:20 checking for libxml/xpath.h... yes
04:37:20 checking libxml/xpathInternals.h usability... yes
04:37:20 checking libxml/xpathInternals.h presence... yes
04:37:20 checking for libxml/xpathInternals.h... yes
04:37:21 checking for xmlInitParser in -lxml2... yes
04:37:21 Using user-specified geos-config file: /var/lib/jenkins/workspace/geos/rel-3.9w64/bin/geos-config
04:37:21 checking GEOS version... 3.9.0dev
04:37:21 checking geos_c.h usability... yes
04:37:21 checking geos_c.h presence... yes
04:37:21 checking for geos_c.h... yes
04:37:21 checking for initGEOS in -lgeos_c... yes
04:37:21 checking for sfcgal-config... /usr/bin/sfcgal-config
04:37:21 checking whether make sets $(MAKE)... yes
04:37:21 checking for a thread-safe mkdir -p... /bin/mkdir -p
04:37:21 checking whether NLS is requested... yes
04:37:21 checking for msgfmt... /usr/bin/msgfmt
04:37:21 checking for gmsgfmt... /usr/bin/msgfmt
04:37:21 checking for xgettext... /usr/bin/xgettext
04:37:21 checking for msgmerge... /usr/bin/msgmerge
04:37:21 checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
04:37:21 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
04:37:21 checking for shared library run path origin... done
04:37:21 checking for CFPreferencesCopyAppValue... no
04:37:21 checking for CFLocaleCopyCurrent... no
04:37:22 checking for GNU gettext in libc... yes
04:37:22 checking whether to use NLS... yes
04:37:22 checking where the gettext function comes from... libc
04:37:22 checking for PROJ... yes
04:37:22 checking proj_api.h usability... no
04:37:22 checking proj_api.h presence... no
04:37:22 checking for proj_api.h... no
04:37:22 checking proj.h usability... yes
04:37:22 checking proj.h presence... yes
04:37:22 checking for proj.h... yes
04:37:22 checking for proj.h... (cached) yes
04:37:22 checking for pj_get_release in -lproj... yes
04:37:22 checking for JSONC... yes
04:37:22 checking for PROTOBUFC... yes
04:37:22 checking protobuf-c/protobuf-c.h usability... yes
04:37:23 checking protobuf-c/protobuf-c.h presence... yes
04:37:23 checking for protobuf-c/protobuf-c.h... yes
04:37:23 checking for protobuf_c_message_init in -lprotobuf-c... yes
04:37:23 checking for protobuf_c_version in -lprotobuf-c... yes
04:37:23 checking protobuf-c version... 1003003
04:37:23 checking for protoc-c... /usr/bin/protoc-c
04:37:23 phony-revision: 
04:37:23 checking for PCRE... no
04:37:23 TOPOLOGY: Topology support requested
04:37:23 RASTER: Raster support requested
04:37:23 checking GDAL version... 2.4.4
04:37:23 checking for OGR enabled... yes
04:37:23 checking gdal.h usability... yes
04:37:24 checking gdal.h presence... yes
04:37:24 checking for gdal.h... yes
04:37:24 checking ogr_api.h usability... yes
04:37:25 checking ogr_api.h presence... yes
04:37:25 checking for ogr_api.h... yes
04:37:25 checking cpl_conv.h usability... yes
04:37:25 checking cpl_conv.h presence... yes
04:37:26 checking for cpl_conv.h... yes
04:37:26 checking for library containing GDALAllRegister... none required
04:37:26 checking for library containing OGRRegisterAll... none required
04:37:27 WAGYU: Wagyu usage requested
04:37:27 checking whether we are using the GNU C++ compiler... yes
04:37:27 checking whether gcc accepts -g... yes
04:37:27 checking how to run the C++ preprocessor... gcc -E
04:37:27 checking for ld used by gcc... /usr/bin/ld -m elf_x86_64
04:37:27 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
04:37:27 checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
04:37:27 checking for gcc option to produce PIC... -fPIC -DPIC
04:37:27 checking if gcc PIC flag -fPIC -DPIC works... yes
04:37:27 checking if gcc static flag -static works... yes
04:37:28 checking if gcc supports -c -o file.o... yes
04:37:28 checking if gcc supports -c -o file.o... (cached) yes
04:37:28 checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
04:37:28 checking dynamic linker characteristics... (cached) GNU/Linux ld.so
04:37:28 checking how to hardcode library paths into programs... immediate
04:37:28 checking whether gcc supports C++11 features with -std=c++11... yes
04:37:28 checking for main in -lc++... no
04:37:28 checking for main in -lstdc++... yes
04:37:28 enabling PostgreSQL extension support...
04:37:28 configure: creating ./config.status
04:37:30 config.status: creating GNUmakefile
04:37:30 config.status: creating extensions/Makefile
04:37:30 config.status: creating extensions/postgis/Makefile
04:37:30 config.status: creating extensions/postgis_raster/Makefile
04:37:30 config.status: creating extensions/postgis_sfcgal/Makefile
04:37:30 config.status: creating extensions/postgis_topology/Makefile
04:37:30 config.status: creating extensions/postgis_tiger_geocoder/Makefile
04:37:30 config.status: creating extensions/address_standardizer/Makefile
04:37:30 config.status: creating liblwgeom/Makefile
04:37:30 config.status: creating liblwgeom/cunit/Makefile
04:37:30 config.status: creating liblwgeom/liblwgeom.h
04:37:30 config.status: creating libpgcommon/Makefile
04:37:30 config.status: creating libpgcommon/cunit/Makefile
04:37:31 config.status: creating postgis/Makefile
04:37:31 config.status: creating postgis/sqldefines.h
04:37:31 config.status: creating loader/Makefile
04:37:31 config.status: creating loader/cunit/Makefile
04:37:31 config.status: creating topology/Makefile
04:37:31 config.status: creating topology/test/Makefile
04:37:31 config.status: creating regress/Makefile
04:37:31 config.status: creating regress/core/Makefile
04:37:31 config.status: creating regress/sfcgal/Makefile
04:37:31 config.status: creating doc/Makefile
04:37:31 config.status: creating doc/Makefile.comments
04:37:31 config.status: creating doc/html/image_src/Makefile
04:37:31 config.status: creating utils/Makefile
04:37:31 config.status: creating raster/Makefile
04:37:31 config.status: creating raster/rt_core/Makefile
04:37:31 config.status: creating raster/rt_pg/Makefile
04:37:31 config.status: creating raster/loader/Makefile
04:37:31 config.status: creating raster/test/Makefile
04:37:31 config.status: creating raster/test/cunit/Makefile
04:37:31 config.status: creating raster/test/regress/Makefile
04:37:31 config.status: creating raster/scripts/Makefile
04:37:31 config.status: creating raster/scripts/python/Makefile
04:37:32 config.status: creating deps/Makefile
04:37:32 config.status: creating deps/wagyu/Makefile
04:37:32 config.status: creating deps/ryu/Makefile
04:37:32 config.status: creating postgis_config.h
04:37:32 config.status: creating raster/raster_config.h
04:37:32 config.status: executing libtool commands
04:37:32 config.status: executing po-directories commands
04:37:32 
04:37:32   PostGIS is now configured for x86_64-pc-linux-gnu
04:37:32 
04:37:32  -------------- Compiler Info ------------- 
04:37:32   C compiler:           gcc -std=gnu99 -g -O2 -fno-math-errno -fno-signed-zeros
04:37:32   C++ compiler (Wagyu): gcc -std=c++11 -x c++ 
04:37:32   CPPFLAGS:              -I/var/lib/jenkins/workspace/geos/rel-3.9w64/include   -I/usr/include/libxml2 -I/usr/include -I/usr/include/json-c  -DNDEBUG 
04:37:32   LDFLAGS:               -lm
04:37:32   SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P
04:37:32 
04:37:32  -------------- Additional Info ------------- 
04:37:32   Interrupt Tests:   DISABLED use: --with-interrupt-tests to enable
04:37:32 
04:37:32  -------------- Dependencies -------------- 
04:37:32   GEOS config:          /var/lib/jenkins/workspace/geos/rel-3.9w64/bin/geos-config
04:37:32   GEOS version:         3.9.0dev
04:37:32   GDAL config:          /var/lib/jenkins/workspace/gdal/rel-2.4w64/bin/gdal-config
04:37:32   GDAL version:         2.4.4
04:37:32   SFCGAL config:        /usr/bin/sfcgal-config
04:37:32   SFCGAL version:       1.3.7
04:37:32   PostgreSQL config:    /var/lib/jenkins/workspace/pg/rel/pg12w64/bin/pg_config
04:37:32   PostgreSQL version:   PostgreSQL 12.3
04:37:32   PROJ4 version:        71
04:37:32   Libxml2 config:       /usr/bin/xml2-config
04:37:32   Libxml2 version:      2.9.10
04:37:32   JSON-C support:       yes
04:37:32   protobuf support:     yes
04:37:32   protobuf-c version:   1003003
04:37:32   PCRE support:         no
04:37:32   Perl:                 /usr/bin/perl
04:37:32   Wagyu:                yes
04:37:32 
04:37:32  --------------- Extensions --------------- 
04:37:32   PostGIS Raster:                     enabled
04:37:32   PostGIS Topology:                   enabled
04:37:32   SFCGAL support:                     enabled
04:37:32   Address Standardizer support:       disabled

I'll rebuild latest geos and see if this issue goes away

Change History (5)

comment:1 by Algunenano, 4 years ago

I can reproduce with the latest GEOS (default build). lwgeom_make_valid is returning NULL and the assert crashes.

comment:2 by Raúl Marín <git@…>, 4 years ago

In 7b7e66a/git:

Cunit: Avoid crashing when comparing NULL strings

References #4733

comment:3 by robe, 4 years ago

Keywords: geos added
Milestone: PostGIS 3.1.0PostGIS GEOS

I'm guessing it must be this geos commit at fault then - https://git.osgeo.org/gitea/geos/geos/commit/4ef6f82756cfc3d6bf6a85c698b0bb01b2176fff

It's better now but test is still failing

05:38:00   Test: test_geos_makevalid ...[cu_geos.c:150]
05:38:00  Expected: GEOMETRYCOLLECTION(POLYGON((92114.014 463463.469,92115.51207431706 463462.206937429,92115.512 463462.207,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.82600000006,92092.377 463437.77,92114.014 463463.469)),MULTIPOINT(92115.51207431706 463462.2069374289,92122.136 463412.826))
05:38:00  Obtained: NULL
05:38:00 FAILED
05:38:00     1. cu_geos.c:150  - CU_FAIL()

comment:5 by robe, 4 years ago

Resolution: fixed
Status: newclosed

Works now after latest geos commits

Note: See TracTickets for help on using tickets.