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

bug(sqlsmith): sqlsmith running in madsim is still not reproducible #8152

Closed
kwannoel opened this issue Feb 23, 2023 · 3 comments
Closed

bug(sqlsmith): sqlsmith running in madsim is still not reproducible #8152

kwannoel opened this issue Feb 23, 2023 · 3 comments
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@kwannoel
Copy link
Contributor

kwannoel commented Feb 23, 2023

Describe the bug

After #8068 , it was expected to sqlsmith should be able to reproduce results with each run.

The sequence of rng generated is still reproducible see:
local.txt
ci.txt

However it does not yield the same queries across different environments. (On the same machine and same build the same queries are returned)

I suspect this is because the sequence of query-gen can be out of order due to async execution.

Simple fix can be to ensure execution is synchronous, by refactoring to use postgres_client.

This pr: #7967 will help to stabilize main and PR workflow in the meantime.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

@kwannoel kwannoel added the type/bug Something isn't working label Feb 23, 2023
@kwannoel
Copy link
Contributor Author

cc @wangrunji0408

@github-actions github-actions bot added this to the release-0.1.18 milestone Feb 23, 2023
@kwannoel kwannoel self-assigned this Feb 23, 2023
@kwannoel kwannoel changed the title bug(sqlsmith): queries still not reproducible in madsim bug(sqlsmith): sqlsmith running in madsim is still not reproducible Feb 23, 2023
@wangrunji0408
Copy link
Contributor

Yes, I also think async execution is the reason for irreproducible. If we could make all queries be generated sequentially at first, this problem might be resolved. BTW, we can't use postgres_client because it is not adapted to the simulator and will block the thread which is not allowed in the simulation. 🥲

@kwannoel
Copy link
Contributor Author

Very hard to make it reproducible. Code changes can still lead to different code paths, and then it will no longer generate the same set of queries. Won't fix for now, since we already have snapshots which achieve the same thing.

@kwannoel kwannoel closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants