arXiv:2610.11875cs.DCOct 2026

Manuscript Offprint

arXiv:2610.11875

NosRacer: Dynamic Detection of Race Conditions in On-Device Network Operating Systems

Runze Wu, Jingbo Zhai, Shanming Ping, Lingzhi Ouyang, Hua Duan, Qin Zou, Chengcheng Huang, Bingshe Liu, Xudong Lang, Xiaoxing Ma, Yu Huang

Abstract

Commercial on-device network operating systems (NOSes) run complex control planes in production routers and switches, where configuration update tasks are executed by multiple loosely coupled components through asynchronous message passing. Such executions are prone to race conditions: the same ordered input commands may produce different outcomes when messages are delivered in different orders. The race conditions are difficult to expose because they often manifest only as subtle, delayed malfunctions. Existing static analysis techniques lack scalability and precision for large-scale industrial NOSes, while dynamic ones incur substantial system-execution cost when attempting to cover the space of asynchronous message interleavings.

To address the challenges above, we present NosRACER, a dynamic analysis framework for race condition detection in industrial-grade on-device NOSes. NosRACER uses a two-phase design. The concentration phase reduces analysis scope by leveraging the locality of configuration update tasks. Race condition detection is then limited to a small subset of involved components and crucial state variables, thereby reducing the detection cost. The perturbation phase proactively perturbs message asynchrony to increase the likelihood of executions with race-condition-exposing message interleavings. It keeps perturbation practical by grouping compatible perturbations for parallel execution and adaptively strengthening perturbations.

We implement NosRACER in a commercial, actively developed NOS. NosRACER is integrated into the existing testing factory and used to detect race conditions in 5 key control-plane components. NosRACER achieves 66% precision and detects 21 race conditions confirmed by developers as severe bugs, while keeping the detection overhead below 10%.

∗^{*}Corresponding author.

CC BY NC ND

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

SIGOPS ATC 2026, Hong Kong, China

© 2026 Copyright held by the owner/author(s).

ACM ISBN 979-8-4007-2818-1/2026/11

https://doi.org/10.1145/3828523.3857055

CCS Concepts: • Software and its engineering → Software testing and debugging; • Computer systems organization → Reliability.

Keywords: on-device network operating systems, race conditions, dynamic analysis

ACM Reference Format:

Runze Wu, Jingbo Zhai, Shanming Ping, Lingzhi Ouyang, Hua Duan, Qin Zou, Chengcheng Huang, Bingshe Liu, Xudong Lang, Xiaoxing Ma, and Yu Huang. 2026. NosRACER: Dynamic Detection of Race Conditions in On-Device Network Operating Systems. In The 2026 ACM SIGOPS Annual Technical Conference (SIGOPS ATC 2026), November 15–18, 2026, Hong Kong, China. ACM, New York, NY, USA, 18 pages. https://doi.org/10.1145/3828523.3857055

1 Introduction

Commercial on-device Network Operating Systems (NOSes), such as Cisco IOS XR, Juniper JunOS, Huawei VRP, and SONiC, are complex software stacks deployed on production routers and switches [6, 18, 21, 52]. In a typical NOS control plane, protocol and management functions are implemented by tens to hundreds of loosely coupled components, which coordinate with one another through asynchronous messages [19, 20, 51].

Configuration updates are routine operations in production NOSes, e.g., due to topology changes, traffic dynamics, and policy revisions [24, 47, 62]. As shown in Figure 1, one configuration update task typically consists of an ordered sequence of configuration commands. These commands are processed by multiple control-plane components, which interact through asynchronous messages, in order to validate, propagate, and realize the requested state changes.

Correct execution of the configuration update task is of vital importance to the NOS control plane [22, 54, 55]. However, ensuring correct execution of the task is greatly hampered by the race condition problem [40]. That is, in different executions of the same update task, asynchronous message passing may result in different ways of coordination among components, thus producing different update results. Race conditions typically do not manifest immediately as user-visible system anomalies. Instead, they manifest themselves in silent and subtle malfunctions, e.g., a subscription quietly lost, a state left stale, or a downstream notification missed [34, 35, 55]. By the time severe network failures occur, it is usually too late to identify the underlying race conditions or trace failures back to them. This also explains the difficulties in reproducing the race conditions.

An exemplar race condition from the NOS we study is shown in Figure 2. An upstream component sends an unsub_vlan command followed by a sub_vlan command for the same virtual LAN interface to ARP. The ARP component needs to interact with the interface management (MGR) component to cancel and reestablish the virtual LAN subscription.

  • Possible Execution 1. When the ACK of unsub_vlan is processed before ARP handles the second sub_vlan command, ARP observes the updated unsubscribed state. It then sends a new sub_vlan request, and ends subscribed, which is the intended outcome.

  • Possible Execution 2. When the ACK of unsub_vlan is delayed, ARP handles the sub_vlan command first, reads a stale subscribed state, and thus ignores the second command. ARP ends unsubscribed, which is a confirmed bug.

Although the sequence of input commands from the upstream component is unchanged, the update of the virtual LAN status differs when the processing order of the two messages differs. This race condition manifests itself in severe system failures, where the VLAN interface cannot forward packets. Race conditions are notoriously difficult to detect and fix in various concurrent and distributed systems [5, 23, 32, 39]. In NOSes, though each component undergoes extensive unit, integration, and stress testing, these tests mainly validate component-wise functional correctness [50, 53, 60]. Race-condition checking is still insufficient. We analyzed the anomalies observed in a large-scale production NOS deployment (2021~2024). Among all the 53 issues classified as “message timing related”, 27 issues were caused by race conditions, as confirmed by the testing engineers.

The race condition problem has been extensively studied in concurrent programming [9, 10, 45] and event-driven programming [15, 31, 38, 44]. Both static [1, 14] and dynamic [45, 63] analysis techniques have been developed. In this work, we study how to cope with race conditions in a production NOS with 200+ control-plane components, each typically containing 5k+ variables and 10k+ functions. At this scale, existing static analysis techniques face severe scalability challenges, and their precision is also limited [14, 29]. Although dynamic analysis techniques can improve accuracy by using concrete execution information, the enormous number of possible asynchronous executions makes the system-execution cost unacceptable [28, 39, 42].

To unearth race conditions in a production NOS, we propose the dynamic analysis framework NosRACER. The core innovation of NosRACER lies in its two-phase design. The concentration phase substantially reduces the detection cost, while the perturbation phase improves its effectiveness in exposing race conditions, as detailed below.

Figure

Figure 1. A configuration update task.

Concentration. In the concentration phase, the key issue is to cope with the complexity of an industry-grade NOS. NosRACER first leverages the existing testing factory of the target NOS to run a small subset of closely related test cases and concentrate on a small subset of components in the NOS. This is motivated by the observation that configuration update tasks exhibit locality, i.e., each task typically involves only a limited number of components. Among the 27 race-condition-induced bugs we studied, every task involves no more than 8 of the 200+ components, and 80% involve at most 5.

After identifying the components involved in a configuration update task, NosRACER then leverages static analysis to concentrate on a small subset of crucial variables in component implementations. This is based on the observation that, in essence, the configuration update is the update of the crucial state information of the involved components. Such state is typically stored in a small set of crucial variables in the component implementations. Tracking reads and updates on the variable values can help us efficiently detect race conditions. That is, if the crucial state information variables are accessed by concurrent operations in asynchronous message handlers, potential race conditions can occur.

Perturbation. The major obstacle to effective race condition detection in NosRACER is the enormous space of possible system executions induced by asynchronous message interleavings. As a dynamic analysis tool, NosRACER must carefully plan system executions to keep the overheads under control. To address this obstacle, NosRACER proactively perturbs the asynchrony of message passing, thereby increasing the likelihood of test executions with the specific message interleavings needed to expose race conditions. In a statistical sense, the perturbation is expected to consistently reproduce the race condition until it is fixed. If the update tasks can

Possible Execution 1 Possible Execution 2

Figure

Figure 2. An exemplar race condition.

survive such perturbation, developers can gain more confidence in deploying and operating the NOS in production environments.

The perturbed test execution is performed using the existing testing factory. NosRACER consolidates perturbations within the same test execution whenever possible, thereby conserving the limited testing budget. However, two factors fundamentally affect the efficiency of perturbation.

In industrial-grade NOSes, NosRACER lacks fine-grained control over message-passing perturbations. As a result, different perturbations may conflict with one another. NosRACER groups compatible perturbations within the same test execution and dispatches multiple groups of perturbations to the testing factory for parallel execution.

A perturbation may also fail to produce a perturbed execution with the message ordering required for race condition detection. Based on failed perturbed executions, NosRACER adaptively strengthens the perturbation to improve the likelihood of successful race condition detection. Due to the side effects introduced by imprecise perturbation, increasing the perturbation strength is not always beneficial. Excessive perturbation may drive the system execution away from the original execution, rendering it ineffective for race condition detection. NosRACER estimates an upper bound on perturbation strengthening by statically analyzing how timeout mechanisms are implemented in the system. NosRACER further uses a small number of perturbed executions to empirically estimate this upper bound.

Key results. We evaluate NosRACER on 5 control-plane components of a commercial on-device NOS (200+ components, 100M+ LOC, 200,000+ test cases). It detects 15 new race conditions and reproduces 6 known ones, with a precision of 66%. All 21 bugs have been fixed. The deployment and usage cost of NosRACER is no more than 20 person-days, and the increase in testing cost is less than 10%.

Summary. This work makes three main contributions.

• We propose NosRACER, a dynamic analysis framework for race condition detection in configuration-update scenarios in industrial-grade NOSes.

• We implement NosRACER in a commercial NOS under active development and integrate it into the existing testing factory.

• We apply NosRACER to detect race conditions in 5 components of the NOS under test, and present detailed evaluations showcasing the effectiveness and efficiency of NosRACER.