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
kvcoord: setting kv.range_descriptor_cache.size=0
results in range iterator to retry endlessly
#101011
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I was unable to automatically find someone to ping. If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
@knz I recall you've made a few improvements to |
@DerZc I just tried this on my machine, and it seems to work. Can you provide step-by-step instructions on how to reproduce? Maybe a screen recording could also help. |
@knz thank you for your response! This is a screen recording. Hope it can help. I run this program on Ubuntu 22.04.
add the following content to
run command then
|
@DerZc Thank you. When the SQL shell hangs, please do the following:
Thank you |
This is the log file I just generate |
I see in the log file that you have not send the SIGQUIT signal to the server. You need to do this before you stop the server. Use the command |
so sorry I just miss understood. but I just delete the folder |
Oh then I know exactly what was the cause of your issue:
The real problem you are encountering is that it is not generally possible to reuse a |
I just reproduce it. I have another program which triggered another assertion failure, I run this program first, then run the
(for |
yes this is what I mean |
cockroach.log |
yes thanks. Also, I notice in your test input the following statement
what are you trying to achieve with this? This is not a supported statement. |
I am trying a new black-box method for logic bugs in DBMS. This test case was generated by sqlancer |
SHOW RANGES
kv.range_descriptor_cache.size=0
results in range iterator to retry endlessly
I have found the cause. I updated the issue text above accordingly. @DerZc Note that it is not generally safe to set cluster settings randomly. I recommend you configure
|
@DerZc let me change my opinion from the above, upon advice by @nvanbenschoten . It would be interesting for us to know of bugs that happen only when sqllance produces SET CLUSTER SETTINGS statements. So perhaps you can keep this feature enabled, but when an issue happens please be sure to report all cluster setting changes that have been generated. |
99719: server, ui: remove txn_fingerprint_id in stmts overview query, stop aggregating on UI r=xinhaoz a=xinhaoz See individual commits. Fixes: #99708 Fixes: #99390 https://www.loom.com/share/d1a3a45f3c08425daab3a1fb9af01e37 100921: multitenant: add can_check_consistency capability r=knz a=ecwall Fixes #100951 This adds support for secondary tenants to use crdb_internal.check_consistency. The functionality is guarded by a new can_check_consistency capability that is disabled by default. Release note: None 100976: roachtest: sometimes use pgwire cancellation in sqlsmith r=yuzefovich a=yuzefovich This commit makes it so that we use the pgwire cancellation mechanism of timing out queries in 50% cases. Previously, we relied on the statement timeout, but now that we support the context cancellation via the pgwire, we should use that too. Epic: None Release note: None 101128: clisqlclient: only print the warning when there are secondary tenants r=rafiss a=knz The previous change in this area forgot to test the negative condition. Oops! Release note: None Epic: CRDB-23559 101129: kv: enforce minimum value for kv.range_descriptor_cache.size r=knz a=nvanbenschoten Closes #101011. This commit adds a minimum value for the kv.range_descriptor_cache.size cluster setting. The minimum value is set to 64, which avoid a cache that is too small to be useful and could thrash. Release note: None Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com> Co-authored-by: Evan Wall <wall@cockroachlabs.com> Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
I got it. Thank you very much! |
Describe the problem
When the cluster setting
kv.range_descriptor_cache.size
is set to 0 or a negative value, queries in SQL through the range iterator hang (e.g. retrieving the contents ofcrdb_internal.ranges_no_leases
).How to reproduce
Observe: the query hangs. A goroutine dump reveals the stack trace below. When extra logging is enabled, we see the following log trace:
Stack trace:
Original issue description
Describe the problem
Cockroachdb hang on the following program:
I run the server on a single machine with command
./cockroach start-single-node --insecure
, run the sql file with commandcockroach sql --echo-sql --insecure --port 26257 --user root < database38.sql
Expected behavior
No hang.
Environment:
Jira issue: CRDB-26747
The text was updated successfully, but these errors were encountered: