Opened 13 years ago
Closed 13 years ago
#1504 closed defect (fixed)
Segfault running ST_EstimatedExtent()
Reported by: | brushtyler | Owned by: | pramsey |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
2012-01-27 16:12:40 CET LOG: statement: SELECT st_estimated_extent('city_data','face','mbr') AS extent; 2012-01-27 16:12:40 CET LOG: server process (PID 27986) was terminated by signal 11: Segmentation fault
where city_data is the sample dataset for topology.
Change History (18)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
yes, the server crashes even running that query from psql.
Anyway the original query was:
test=> SELECT st_xmin(extent), st_ymin(extent), st_xmax(extent), st_ymax(extent) FROM (SELECT st_estimated_extent('city_data','face','mbr') AS extent) AS subquery; The connection to the server was lost. Attempting reset: Failed.
instead running the query above I get:
test=> SELECT st_estimated_extent('city_data','face','mbr') AS extent; The connection to the server was lost. Attempting reset: Succeeded.
comment:3 by , 13 years ago
I also get the same problem with other geometry tables, but I'm unable to find a common pattern.
comment:4 by , 13 years ago
comment:6 by , 13 years ago
If you dump/restore the table, does the problem recur? (Because if so, dump the table so we can try it on our machines.)
comment:7 by , 13 years ago
comment:8 by , 13 years ago
comment:10 by , 13 years ago
Before updating PostGIS to the latest trunk that query worked fine. Those tables was created before updating, so something is changed (maybe the MAX_SRID?) but I'm unable to say what revision I had had before.
comment:11 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You can't just drop a 2.0 install on top of a 1.5 database, you *need* to dump and restore.
comment:12 by , 13 years ago
You are restoring it _wrong_ , use postgis_restore.pl, see instructions in the postgis manual, under HARD UPGRADE.
comment:13 by , 13 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Wait a second, even if he restores the right way he would still have troubles restoring the _data_, wouldn't him ?
His only bet would be changing the SRIDs, can't not even drop the check from anywhere but touching the code. We should deal with this somehow.
comment:14 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
That's a different ticket, please open it, but leave this one closed! :)
follow-up: 16 comment:15 by , 13 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I've found a way to reproduce it:
test=> CREATE TABLE "test_1504" (id int PRIMARY KEY, geom geometry(LineString,3003)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "test_1504_pkey" for table "test_1504" CREATE TABLE test=> INSERT INTO "test_1504" (id, geom) VALUES (0, NULL); INSERT 0 1 test=> ALTER TABLE "test_1504" ALTER COLUMN geom TYPE geometry(LineString, -1); NOTICE: SRID value -1 converted to the officially unknown SRID value 0 NOTICE: SRID value -1 converted to the officially unknown SRID value 0 ALTER TABLE test=> select st_estimated_extent('test_1504', 'geom'); The connection to the server was lost. Attempting reset: Failed.
NB: I tried to add with a geometry not NULL, but I got the same result (segfault).
After reconnecting and querying the table to get srid it returns a strange result:
test=> select st_srid(geom) from "test_1504"; st_srid --------- (1 row)
I think that pg_dump now returns that strange (and maybe random) srid > MAX_SRID.
comment:16 by , 13 years ago
Replying to brushtyler:
After reconnecting and querying the table to get srid it returns a strange result:
test=> select st_srid(geom) from "test_1504"; st_srid --------- (1 row)
Obviously the srid is empty because the geometry is NULL...
comment:18 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Being a bit more careful of NULL entries in the statistics table gets rid of the segfault. r8950
can you reproduce from the terminal ?