Skip to content
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

[Query Fuzz] LIMIT / OFFSET in query hangs #8066

Closed
e-dard opened this issue Feb 27, 2017 · 0 comments · Fixed by #8261
Closed

[Query Fuzz] LIMIT / OFFSET in query hangs #8066

e-dard opened this issue Feb 27, 2017 · 0 comments · Fixed by #8261

Comments

@e-dard
Copy link
Contributor

e-dard commented Feb 27, 2017

This issue was found by fuzzing the database with a query generator tool. It may be possible to simplify the query to help identify the root cause.

Dataset
$ curl https://s3.amazonaws.com/noaa.water-database/NOAA_data.txt -o NOAA_data.txt
$ influx -import -path=NOAA_data.txt
Query
USE NOAA_water_database

SELECT  "degrees",   SAMPLE("degrees", 2) FROM  "average_temperature" LIMIT 42747 OFFSET 323971
Result

The query hangs. Heap remains very low, no CPU activity.

See attached SIGQUIT on the server.

I have managed to simplify a query that triggers this issue to:

SELECT  "degrees",   SAMPLE("degrees", 2) FROM  "average_temperature" LIMIT 1 OFFSET 1

Note that all the following queries return results, or at least return an empty result immediately:

SELECT  "degrees",   SAMPLE("degrees", 2) FROM  "average_temperature"
SELECT  "degrees",   SAMPLE("degrees", 2) FROM  "average_temperature" LIMIT 1

However, SELECT "degrees", SAMPLE("degrees", 2) FROM "average_temperature" OFFSET 1 also hangs the server. I note in this case the docs say that OFFSET should not be used without LIMIT, but as you can see above, using it with LIMIT still hangs the server.

1488220454176671673-freeze.txt

@e-dard e-dard changed the title [Query Fuzz] LIMIT / OFFSET hang query [Query Fuzz] LIMIT / OFFSET in query hangs Feb 27, 2017
@ghost ghost assigned jsternberg Apr 5, 2017
@ghost ghost added the review label Apr 5, 2017
@ghost ghost removed the review label Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants