#5245 closed defect (fixed)

Regression failure with relate_bnr (bogus expectance)

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS 3.2.4
Component: postgis Version: master
Keywords: Cc:

Description

I'm assuming this is a GEOS change?

I'm seeing a failure on winnie

PostgreSQL 14.5, compiled by Visual C++ build 1914, 64-bit
  Postgis 3.4.0dev - (3.3.0rc2-115-gcb7577657) - 2022-09-19 04:41:50
  scripts 3.4.0dev 3.3.0rc2-115-gcb7577657
  raster scripts 3.4.0dev 3.3.0rc2-115-gcb7577657
  GEOS: 3.12.0dev-CAPI-1.18.0
  PROJ: 7.2.1
  SFCGAL: 1.4.1
  GDAL: GDAL 3.4.3, released 2022/04/22

 ./regress/core/relate_bnr .. failed (diff expected obtained: /projects/postgis/tmp/3.4.0dev_pg14_geos3.12_gdal3.4.3w64/test_99_diff)
-----------------------------------------------------------------------------
--- ./regress/core/relate_bnr_expected	2022-08-27 01:03:00.888083800 -0400
+++ /projects/postgis/tmp/3.4.0dev_pg14_geos3.12_gdal3.4.3w64/test_99_out	2022-09-19 01:01:32.833635900 -0400
@@ -28,7 +28,7 @@
 28|10FF0FFF2|10FF0FFF2|1FFFFFFF2|10FF0FFF2
 29|FF1FF0102|FF1FF0102|FF1FF0102|FF1FF0102
 30|FF1FF0102|FF1FF0102|FF1FFF1F2|FF1FF0102
-31|FF1FF01F2|FF1FF01F2|FF1FF01F2|FF1FF01F2
+31|FF1FF01F2|FF1FF0102|FF1FF0102|FF1FF01F2
 32|FF1FF01F2|FF1FF0102|FF1FFF1F2|FF1FF01F2
 33|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2
 34|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2
-----------------------------------------------------------------------------

debbie seems okay, but I realized ack she's not running against GEOS main for PostGIS master

GEOS: 3.11.1dev-CAPI-1.17.1

Although GH pg15-geos311-gdal35-proj90 is failing with same error

PostgreSQL 15beta4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
  Postgis 3.4.0dev - (cb75776) - 2022-09-19 04:06:13
  scripts 3.4.0dev cb75776
  raster scripts 3.4.0dev cb75776
  GEOS: 3.11.1dev-CAPI-1.17.1
  PROJ: 9.0.1
  SFCGAL: 1.4.1
  GDAL: GDAL 3.5.2, released 2022/09/02

  ./regress/core/relate_bnr .. failed (diff expected obtained: /tmp/pgis_reg/test_99_diff)

Change History (12)

comment:1 by robe, 21 months ago

okay debbie is now failing too:

21:42:38 PostgreSQL 15beta4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
21:42:38   Postgis 3.4.0dev - (3.3.0rc2-117-gf24ef8556) - 2022-09-20 01:38:32
21:42:38   scripts 3.4.0dev 3.3.0rc2-117-gf24ef8556
21:42:38   raster scripts 3.4.0dev 3.3.0rc2-117-gf24ef8556
21:42:38   GEOS: 3.11.1dev-CAPI-1.17.1
21:42:38   PROJ: 7.2.1
21:42:38   SFCGAL: 1.3.8
21:42:38   GDAL: GDAL 3.4.3, released 2022/04/22

21:43:18  ./regress/core/relate_bnr .. failed (diff expected obtained: /var/lib/jenkins/workspace/postgis/tmp/3_4_pg15w64/test_99_diff)
21:43:18 -----------------------------------------------------------------------------
21:43:18 --- ./regress/core/relate_bnr_expected	2022-08-22 20:53:14.447687571 +0000
21:43:18 +++ /var/lib/jenkins/workspace/postgis/tmp/3_4_pg15w64/test_99_out	2022-09-20 01:43:18.602998038 +0000
21:43:18 @@ -28,7 +28,7 @@
21:43:18  28|10FF0FFF2|10FF0FFF2|1FFFFFFF2|10FF0FFF2
21:43:18  29|FF1FF0102|FF1FF0102|FF1FF0102|FF1FF0102
21:43:18  30|FF1FF0102|FF1FF0102|FF1FFF1F2|FF1FF0102
21:43:18 -31|FF1FF01F2|FF1FF01F2|FF1FF01F2|FF1FF01F2
21:43:18 +31|FF1FF01F2|FF1FF0102|FF1FF0102|FF1FF01F2
21:43:18  32|FF1FF01F2|FF1FF0102|FF1FFF1F2|FF1FF01F2
21:43:18  33|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2
21:43:18  34|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2
21:43:18 -----------------------------------------------------------------------------

so maybe her last run was using a slightly older GEOS.

Not all the GH bots running GEOS 3.7-3.9 are not failing so assuming it must be a GEOS change in main, and 3.11 branches

comment:2 by robe, 21 months ago

Perhaps it was this change: https://github.com/libgeos/geos/commit/206843f242ef29aecbf7e4ddec7273dff908a0dc

Commit 8e0528ecfcad1369ef963c899a433ed227c4473a by dbaston

Fix RelateOp for empty geometry and closed linear geometry

Ports the RelateOp class from JTS and then applies the fixes
in https://github.com/locationtech/jts/pull/671

Fixes https://trac.osgeo.org/geos/ticket/1096

I suspect this also breaks 3.7-3.9 also but it's just for GHA I don't have those set to build as frequently with the assumption they wouldn't change and neither debbie nor winnie bothers to test those on master.

The test that is failing is this one:

SELECT '31', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 0,20 80,100 80,80 120,40 140)'::geometry as a, 'LINESTRING(140 280,240 280,240 180,140 180,140 280)'::geometry as b) as f;
Last edited 21 months ago by robe (previous) (diff)

comment:3 by robe, 21 months ago

Milestone: PostGIS 3.4.0PostGIS GEOS

comment:4 by robe, 21 months ago

confirmed it's a geos issue and mdavis is reviewing.

comment:5 by robe, 21 months ago

Milestone: PostGIS GEOSPostGIS 3.3.2

confirmed with mdavis on IRC that the new answer:

31|FF1FF01F2|FF1FF0102|FF1FF0102|FF1FF01F2

Is the correct one.

I'm going to take this test out of 3.3 and master until the new GEOS is released.

comment:6 by Regina Obe <lr@…>, 21 months ago

In 1bd0a84/git:

Remove a relate_bnr that results in different answer in patched GEOS. References #5245 for PostGIS 3.4.0dev

comment:7 by robe, 21 months ago

Milestone: PostGIS 3.3.2PostGIS 3.2.4
Owner: changed from pramsey to robe

comment:8 by Regina Obe <lr@…>, 21 months ago

In 3d3b4d3/git:

Remove a relate_bnr that results in different answer in patched GEOS. References #5245 for PostGIS 3.3.2

comment:9 by Regina Obe <lr@…>, 21 months ago

Resolution: fixed
Status: newclosed

In c7c59b4/git:

Remove a relate_bnr that results in different answer in patched GEOS. Closes #5245 for PostGIS 3.2.4

comment:10 by strk, 21 months ago

Resolution: fixed
Status: closedreopened
Summary: Regression failure with relate_bnrRegression failure with relate_bnr (bogus expectance)

The bug was fixed upstream, can we get the test back, with the correct result ?

comment:11 by robe, 21 months ago

@strk The reason I remarked it out is the bug fix has not been released yet, so many of our cis will be complaining.

Once there is a GEOS release we can put back the test.

Or you are thinking we should keep this ticket open until we do that? I honestly don't care that much about this test, so if someone sees the todo, maybe they'll put it back, It's not the whole test, it's just one particular line item test.

comment:12 by robe, 21 months ago

Resolution: fixed
Status: reopenedclosed

If it needs testing, it should be done in GEOS land, not PostGIS land.

I have never ever needed to use ST_Relate with the additional noding args. I didn't even know what they did until Martin updated the docs.

Note: See TracTickets for help on using tickets.