Skip to content

Test: retry MddBootstrapInitialize on transient State Repository error (AB#62489699) - #6596

Open
v-arlysenko wants to merge 2 commits into
microsoft:mainfrom
v-arlysenko:user/v-arlysenko/bug62489699-bootstrap-init-retry
Open

Test: retry MddBootstrapInitialize on transient State Repository error (AB#62489699)#6596
v-arlysenko wants to merge 2 commits into
microsoft:mainfrom
v-arlysenko:user/v-arlysenko/bug62489699-bootstrap-init-retry

Conversation

@v-arlysenko

Copy link
Copy Markdown
Collaborator

Problem

The Test_x86_Windows.10.Professional.22H2_releasex86 stage in the Foundation PR pipeline intermittently fails in TAEF ClassSetup with MddBootstrapInitialize returning STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED (0x80670016). The same SHA passes on retry, and only this one x86 Win10 22H2 stage is affected, pointing to a transient timing race rather than a product regression.

Root cause

SetupPackages installs the DDLM package via AddPackageAsync().get() (which completes), then immediately calls MddBootstrapInitialize. On a slow/loaded agent the State Repository can still be indexing the just-registered DDLM package when the bootstrapper enumerates it, so no fitting DDLM is found and it throws STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED. This clears on its own once indexing catches up.

Fix

SetupBootstrapWithVersion now retries MddBootstrapInitialize with a bounded backoff (up to 10 total attempts, 300ms apart) only when it returns 0x80670016. Any other HRESULT is verified immediately via VERIFY_SUCCEEDED and is not masked. Test-harness-only change; no product bootstrap code is touched.

…ndency error (AB#62489699)

The Test_x86_Windows.10.Professional.22H2_releasex86 stage in the Foundation PR
pipeline intermittently fails in TAEF ClassSetup with MddBootstrapInitialize
returning STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED (0x80670016). On slow/loaded
agents the State Repository can still be indexing the just-installed DDLM package
when the bootstrapper enumerates it; the same SHA passes on retry, confirming a
transient race rather than a product regression.

SetupBootstrapWithVersion now retries MddBootstrapInitialize with a bounded
backoff (up to 10 attempts, 300ms apart) only when it returns 0x80670016. Any
other HRESULT is verified immediately and is not masked.
@v-arlysenko

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

VERIFY_SUCCEEDED(MddBootstrapInitialize(version_MajorMinor, nullptr, minVersion));
// AB#62489699: On slow/loaded test agents (observed on the x86 Win10 22H2 stage) the State
// Repository can still be indexing the DDLM package we just installed when the bootstrapper
// enumerates it, so MddBootstrapInitialize fails with STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED

@DrusTheAxe Howard Kapustein (DrusTheAxe) Aug 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not how it works. Indexing happens as part of Stage, Add and Register if the package is not on the machine. If you "just installed" a package (using any of the above) then, by definition the package has been indexed.

See There is no Install – it’s ‘Stage’ and ‘Register’ for (some) more information.

Can you explain what deployment operation(s) you're doing before this, where you think you're seeing a transient failure?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The described scenario doesn't make sense. There may be a problem but it's not what's described. Please clarify what deployment actions led to the described transient error.

}

VERIFY_SUCCEEDED(MddBootstrapInitialize(version_MajorMinor, nullptr, minVersion));
// AB#62489699: On slow/loaded test agents (observed on the x86 Win10 22H2 stage) the State

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is AB#62489699?

If this is a reference to issue # 62489699 in the internal Microsoft tracker, use the task.ms URL e.g.

// https://task.ms/62489699 blah blah blah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants