Skip to content

Remove false-positive debug assert hits against normative behavior. - #876

Open
gavin-dunlap-luminar wants to merge 1 commit into
pendulum-project:mainfrom
luminartech:fix/correct-normative-debug-assertion-failures
Open

Remove false-positive debug assert hits against normative behavior.#876
gavin-dunlap-luminar wants to merge 1 commit into
pendulum-project:mainfrom
luminartech:fix/correct-normative-debug-assertion-failures

Conversation

@gavin-dunlap-luminar

@gavin-dunlap-luminar gavin-dunlap-luminar commented Sep 1, 2026

Copy link
Copy Markdown

Description

Port::set_recommended_state asserts !default_ds.slave_only in the M1 | M2 arm. The assertion is wrogn and it panics debug builds of any slave-only instance on a conformant network. According to Figure 31 of IEEE 1588-2019, there is a connection from a BMC_MASTER recommendation to LISTENING. A slave-only instance is recommended M1 or M2 whenever it is the best clock in its domain (the only device powered up so far, or with an aged out grandmaster).

Impact

Release builds are unaffected. Debug builds of slave-only instances panic on the first BMCA cycle that finds no better master. This makes slave_only: true unusable unless debug assertions are disabled for the whole crate. Encountered in the wild while utilizing this crate.

@gavin-dunlap-luminar
gavin-dunlap-luminar force-pushed the fix/correct-normative-debug-assertion-failures branch 2 times, most recently from 07fba68 to fac1504 Compare September 1, 2026 18:51
@gavin-dunlap-luminar
gavin-dunlap-luminar force-pushed the fix/correct-normative-debug-assertion-failures branch from fac1504 to b27f9cf Compare September 1, 2026 18:52
@gavin-dunlap-luminar gavin-dunlap-luminar changed the title fix(statime): Remove false-positive debug assert hits against normative behavior. Remove false-positive debug assert hits against normative behavior. Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants