Static Analysis Using the Cloud

Rahul Kumar, Chetan Bansal, Jakob Lichtenberg

Introduction

Static analysis is a critical component of modern software development, particularly for complex systems like Windows device drivers. The Static Driver Verifier (SDV) serves as the industry standard for identifying bugs and ensuring API compliance. However, SDV faces a significant "performance wall." A single driver might need to be checked against hundreds of rules, with each check taking up to 50 minutes. This can lead to total computation times exceeding 160 hours for a single driver, causing multi-day delays that hinder development cycles and discourage tool usage.

System Architecture: CloudSDV and SMV

To overcome these local performance bottlenecks, the authors developed CloudSDV, an extension that offloads verification tasks to the Microsoft Azure cloud. By migrating heavy-duty static analysis from local machines to the cloud, the system can parallelize thousands of verification rules across hundreds of virtual workers.

The CloudSDV architecture utilizes Azure services for task queuing, data storage, and parallel execution across multiple worker instances.

The architecture leverages several key Azure components:

  • Work Queue: Manages task scheduling and ensures reliability through a robust state machine. If a worker fails or hangs, the task becomes "visible" in the queue again after a timeout, ensuring no check is left unfinished.
  • Blob Storage: Stores driver data, job data, and various SDV versions.
  • Worker Instances: Execute the actual analysis in parallel. The system can scale from a few workers to hundreds depending on the job size.
  • Table Storage: Collects telemetry and performance metrics for long-term analysis of tool effectiveness.

Beyond CloudSDV, the authors introduced the Static Module Verifier (SMV). SMV is a generalized platform designed to bring cloud-scale analysis to any software module by abstracting the "Build-Intercept-Analyze" workflow, allowing developers to swap in different compilers and analysis engines.

Performance Evaluation

The system was evaluated using various driver suites, ranging from simple individual drivers to the massive sdv_bugbash suite, which contains 91 drivers and over 16,000 individual checks.

Performance comparison across different driver suites and worker counts, highlighting the significant speedup achieved for large-scale verification tasks.

The results demonstrate a dramatic reduction in latency for large test suites. For the sdv_bugbash suite, a high-end 64-core local machine required over 101 hours to complete the analysis. By utilizing 200 Azure workers, CloudSDV reduced this time to just 4 hours and 31 minutes—a 22.5x speedup. However, the authors noted an "overhead threshold": for very small drivers, the time spent uploading data and managing the queue can actually make cloud execution slower than local processing.

Key Insights and Discussion

  • Parallelism vs. Scalability: While the cloud does not necessarily solve the internal complexity of a single rule (which might still time out), it effectively solves the performance problem of running thousands of independent rules simultaneously.
  • Verification as a Service: Centralizing the analysis engine in the cloud allows for instantaneous updates and bug fixes for all users, bypassing the need for local toolchain updates in the Windows Driver Development Kit.
  • Sequential Bottlenecks: Local compilation remains a significant hurdle. Even with massive cloud resources, the initial build process often occurs on the user's machine before data is uploaded, representing a remaining sequential bottleneck.

Conclusion and Future Work

CloudSDV successfully demonstrates how cloud resources can dismantle the performance barriers of static analysis. Future improvements aim to move the compilation process itself to the cloud, implement asynchronous "offline" workflows where developers receive notifications upon completion, and further optimize worker scaling to balance operational costs with execution speed.

Summary updated

BibTeX
@inproceedings{kumar2016static,
  author = {Rahul Kumar and Chetan Bansal and Jakob Lichtenberg},
  title = {{Static Analysis Using the Cloud}},
  booktitle = {iFMCloud@IFM},
  year = {2016},
  url = {https://openreview.net/forum?id=tLJ5Ike4ri},
}
Figure