Opened 3 years ago
Closed 3 years ago
#4918 closed defect (fixed)
st_minpossiblevalue() causes crash
Reported by: | Robins | Owned by: | robe |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 3.0.4 |
Component: | raster | Version: | 3.0.x |
Keywords: | st_minpossiblevalue | Cc: |
Description
Passing empty string to st_minpossiblevalue()
crashes server
regression=> select st_minpossiblevalue(''); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !?> \q
Change History (15)
comment:1 by , 3 years ago
Milestone: | PostGIS 3.1.2 → 3.1.3 |
---|
comment:2 by , 3 years ago
Milestone: | 3.1.3 → PostGIS 3.1.3 |
---|
comment:3 by , 3 years ago
Component: | postgis → raster |
---|---|
Owner: | changed from | to
comment:5 by , 3 years ago
Milestone: | PostGIS 3.1.4 → PostGIS 3.0.4 |
---|
This does not appear to be an issue with latest 3.1.2 or 3.1.3
Doing this:
SELECT ST_MinPossibleValue('');
I get the expected ERROR: RASTER_minPossibleValue: Invalid pixel type:
So I'm guessing this might not be an issue. I have put a test in place for it though and will backport the test to 3.0.4 to make sure.
comment:9 by , 3 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
The 3.1 and 3.2 passed this test. I'm going to close now and reopen if 3.0.4 fails.
comment:10 by , 3 years ago
Priority: | medium → blocker |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Okay the tests confirm 3.2 (main) and 3.1 branches are fine, but 3.0 branch does indeed crash.
14:26:36 ----------------------------------------------------------------------------- 14:26:36 --- rt_utility_expected 2021-07-02 18:03:45.287954088 +0000 14:26:36 +++ /var/lib/jenkins/workspace/postgis/tmp/3_0_pg10w64/test_45_out 2021-07-02 18:26:36.149180741 +0000 14:26:36 @@ -31,31 +31,7 @@ 14:26:36 test 11.9|t 14:26:36 test 11.10|t 14:26:36 test 11.11|t 14:26:36 -ERROR: RASTER_minPossibleValue: Invalid pixel type: 14:26:36 -Raster of 10x10 pixels has 3 bands and extent of BOX(0 -10,10 0) 14:26:36 - band 1 of pixtype 8BUI is in-db with NODATA value of 0 14:26:36 - band 2 of pixtype 32BF is in-db with NODATA value of -9999 14:26:36 - band 3 of pixtype 16BSI is in-db with no NODATA value 14:26:36 -Skewed raster of 10x10 pixels has 1 band and extent of BOX(0 -10,10 0.0001) 14:26:36 - band 1 of pixtype 8BUI is in-db with NODATA value of 0 14:26:36 -1|Raster of 90x50 pixels has 3 bands and extent of BOX(0 -50,90 0) 14:26:36 - band 1 of pixtype 8BUI is out-db with no NODATA value 14:26:36 - band 2 of pixtype 8BUI is out-db with no NODATA value 14:26:36 - band 3 of pixtype 8BUI is out-db with no NODATA value 14:26:36 -2|Raster of 90x50 pixels has 3 bands and extent of BOX(0 -50,90 0) 14:26:36 - band 1 of pixtype 8BUI is out-db with no NODATA value 14:26:36 - band 2 of pixtype 8BUI is out-db with no NODATA value 14:26:36 - band 3 of pixtype 8BUI is out-db with no NODATA value 14:26:36 -3|Raster of 90x50 pixels has 2 bands and extent of BOX(0 -50,90 0) 14:26:36 - band 1 of pixtype 8BUI is in-db with NODATA value of 0 14:26:36 - band 2 of pixtype 8BUI is out-db with no NODATA value 14:26:36 -4|Raster of 90x50 pixels has 2 bands and extent of BOX(0 -50,90 0) 14:26:36 - band 1 of pixtype 8BUI is out-db with NODATA value of 255 14:26:36 - band 2 of pixtype 8BUI is in-db with NODATA value of 0 14:26:36 -ms1|64 14:26:36 -NOTICE: Could not find raster band of index 1 when getting band path. Returning NULL 14:26:36 -bandpath1| 14:26:36 -bandpath2|testraster.tif 14:26:36 -bandpath2|testraster.tif 14:26:36 -bandpath2| 14:26:36 -bandpath2|testraster.tif 14:26:36 +server closed the connection unexpectedly 14:26:36 + This probably means the server terminated abnormally 14:26:36 + before or while processing the request. 14:26:36 +connection to server was lost 14:26:36 -----------------------------------------------------------------------------
comment:11 by , 3 years ago
Hmm I see github actions also crashed so back to having to fix this in 3.1 and 3.2. Not sure why it didn't crash on all.
I looked at the code too and didn't see much of a difference between 3.1 and 3.0
comment:13 by , 3 years ago
The problem is in an assertion in rt_pixtype_index_from_name which fail if the string is empty. The build in branches after 3.0 are with -DNDEBUG which prevents the assert from running
comment:15 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Milestone renamed