-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geoindex: panic when trying to insert object with NaN coordinate #81609
Comments
Looks like a panic in spatial, CC @otan From the node 1 cockroach.stderr.log:
|
this is actually failing on the indexing code, so maybe @sumeerbhola / @rytaft can take a look. |
Here's a repro:
|
Looks like @otan is right:
|
In Postgres we get an error when trying to evaluate
If we return an error in such scenario, this should prevent the crash. Should we add a code like this to all geo builtins that return
I tried to find the source code of postgres where this validity checking happens but failed. I found that |
root@127.0.0.1:26257/demoapp/defaultdb> create table t (a geometry, inverted index(a));
CREATE TABLE
Time: 5ms total (execution 4ms / network 0ms)
root@127.0.0.1:26257/demoapp/defaultdb> insert into t values
-> ('0105000000060000000102000000020000002CF565DB1790F041010000000000F87F1C1E119D614AE7C1010000000000F87F010200000003000000809745B2972CF841010000000000F87FE0D03302F1C6D641010000000000F87FF83C
-> 7FD5C4ACD641010000000000F87F010200000004000000C4A695BE1FC2FD41010000000000F87F42F59F55FD780042010000000000F87FA07574B08DC0D941010000000000F87FD843A641FF49E741010000000000F87F01020000000400
-> 0000781D60294113F241010000000000F87F100451CE196BED41010000000000F87F1430818C69A2EF41010000000000F87F00E4B02D00CB9341010000000000F87F01020000000400000040B0B6B74C96A0C1010000000000F87F1CD943
-> F294E9E5C1010000000000F87F709F7E29F32AC4C1010000000000F87F607737DC4662E941010000000000F87F010200000004000000F097AF975517F441010000000000F87F5442BA391710F841010000000000F87FE01C9C5F7602B641
-> 010000000000F87F40E714D68300E2C1010000000000F87F');
*
* ERROR: a SQL panic has occurred while executing the following statement:
* INSERT INTO t VALUES ('0105000000060000000102000000020000002CF565DB1790F041010000000000F87F1C1E119D614AE7C1010000000000F87F010200000003000000809745B2972CF841010000000000F87FE0D03302F1C6D641010000000000F87FF83C7FD5C4ACD641010000000000F87F010200000004000000C4A695BE1FC2FD41010000000000F87F42F59F55FD780042010000000000F87FA07574B08DC0D941010000000000F87FD843A641FF49E741010000000000F87F010200000004000000781D60294113F241010000000000F87F100451CE196BED41010000000000F87F1430818C69A2EF41010000000000F87F00E4B02D00CB9341010000000000F87F01020000000400000040B0B6B74C96A0C1010000000000F87F1CD943F294E9E5C1010000000000F87F709F7E29F32AC4C1010000000000F87F607737DC4662E941010000000000F87F010200000004000000F097AF975517F441010000000000F87F5442BA391710F841010000000000F87FE01C9C5F7602B641010000000000F87F40E714D68300E2C1010000000000F87F') i think the "right" thing to do is for any coordinate that has |
roachtest.sqlsmith/setup=rand-tables/setting=no-ddl failed with artifacts on release-21.2 @ 2bd5952ed0db3dc898c0d75eb50bc65c26feef04:
Reproduce
See: roachtest README
This test on roachdash | Improve this report!
Jira issue: CRDB-16035
The text was updated successfully, but these errors were encountered: