Kernel synchronization delay fuzzing
The Kernel synchronization delay fuzzing option randomizes thread schedules to help detect concurrency bugs in drivers.
When the option is selected, Driver Verifier inserts random delays at various points in the threads. Like the Power Framework Delay Fuzzing option, the Kernel synchronization delay fuzzing option uses an algorithm that provides help improve the chances of finding errors in drivers. Kernel synchronization delay fuzzing improves upon traditional stress testing, where the test program is run for days or even weeks in hopes of catching problems in that can occur in concurrent execution.
You can activate the Kernel synchronization delay fuzzing feature for one or more drivers by using Driver Verifier Manager or the Verifier.exe command line. For details, see Selecting Driver Verifier Options. You must restart the computer to activate or deactivate the Power Framework Delay Fuzzing option.
- At the command line
At the command line, the Kernel synchronization delay fuzzing is represented by verifier /flags 0x00800000 (Bit 23). To activate Power Framework Delay Fuzzing, use a flag value of 0x00800000 or add 0x00800000 to the flag value. For example:
verifier /flags 0x00800000 /driver MyDriver.sys
The feature will be active after the next boot.
Using Driver Verifier Manager
- Start Driver Verifier Manager. Type Verifier in a Command Prompt window.
- Select Create custom settings (for code developers) and then click Next.
- Select Select individual settings from a full list.
- Select (check) Kernel synchronization delay fuzzing.
- Restart the computer.
Most driver routines are reentrant and concurrent. Bugs related to concurrency are notoriously hard to find. Bugs can include deadlocks and race conditions, caused by synchronization problems and bad timing between threads. Stress testing is the traditional testing technique for finding these bugs, but it can be slow and expensive, and the results are not always reproducible. The Kernel synchronization delay fuzzing option increases the probability of race conditions appearing at runtime by inserting randomized delays in various kernel API function calls. For example, if a race condition results in a driver accessing IRP after it has been cancelled, the Kernel synchronization delay fuzzing option increases the chances of this race condition in such a way that Driver Verifier will detect the error during testing. The Kernel synchronization delay fuzzing option enhances the power and effectiveness of Driver Verifier.