mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[GH-ISSUE #10] [specs] Using 10 schedules for random exploration can be insufficient for correctness checking/fuzzing #9
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AD1024 on GitHub (Feb 28, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/10
Originally assigned to: @wlxiong on GitHub.
As shown in the referred script
github.com/deepseek-ai/3FS@c450ee0cf7/specs/RunTests.ps1 (L6)Testing with PChecker only takes 10 schedules. This can be insufficient. By default, PChecker (the fuzzer of P model) uses random exploration. What it does is basically configuring the model instances with non-deterministic inputs and exploring different orders of
eventinterleaving. Therefore, 10 schedules may not expose enough behaviors of the P model hence low confidence for correctness. We would suggest using more schedules, e.g., 10k.We assume the reason using 10 instead of more is that it usually takes too long for PChecker to finish with the checking models, especially DataStorage. This usually is due to instantiating multiple
Timers in the P model. Timers can drastically slow down PChecker since the way it issueseTimeOutis through a non-deterministic check as shown belowgithub.com/deepseek-ai/3FS@c450ee0cf7/specs/Timer/PSrc/Timer.p (L15-L34)If the non-deterministic check failed, it cycles back to the same state. This creates a lot of event redundancies (especially when there are multiple timers) during random exploration by the
eDelayTimeOutevents. This can easily exhaust the maximum number of steps. A potential workaround is:instead of assigning each component a timer to inform about the timeout, use a "ghost" view server to have a central control of timeout. An example is here:
github.com/AD1024/P-Tutorial-Raft@44d2e349a8/PSrc/View.p (L128-L184)The idea is that when an
eTimeOutoccurs, the view server randomly chooses some components and inform them about the timeout event. This way, PChecker will not be overwhelmed by theeDelayTimeOutevents.Hope this might help with the P modeling.
@ankushdesai commented on GitHub (Feb 28, 2025):
The number
10was added here just to make the test scripts run faster. Internally, the team ran the models for more schedules.We also noticed that there are some invariants from the CRAQ paper that are not checked.
@AD1024 commented on GitHub (Feb 28, 2025):
I see. This makes more sense. But still, I think we should either have a Timer primitive (given how frequently it is used to model faults) or noting about the proper ways to handle timeouts.
@wlxiong commented on GitHub (Mar 1, 2025):
The P model provides a clear view of the CRAQ variant implemented in 3FS for the dev team. Besides being a formal specs to verify the correctness of the system, it functions more like the pseudocode for the chunk storage system.
During development, we follow an iterative process: after making small changes, we run all tests for 10 schedules to catch easy bugs. If everything looks good, start multiple P checkers in parallel, each runs 1000 schedules. At the end of the day, we submit jobs to start multiple P checkers, each runs 10000 schedules, and check the results next morning.
Yes, using a global clock is more efficient in this case. Actually we have a similar implementation in a previous version: the heartbeat check loop in
MgmtServiceserves as the global clock. But implementing it in an independent actor seems to be a better approach.Can you be more specific? To this day, we still cannot persuade ourselves that we have fully grasped the intricacies of CRAQ. A working implementation needs to fill in lots of missing pieces.
@ankushdesai commented on GitHub (Mar 1, 2025):
This is very exciting and thanks for sharing! I will get back you on the spec with details in a couple of days.