Skip to content

fix(generic-worker): ensure ProfSvc is running before profile ops#8299

Merged
matt-boris merged 1 commit intomainfrom
matt-boris/gwWinLoadUserProfile
Feb 20, 2026
Merged

fix(generic-worker): ensure ProfSvc is running before profile ops#8299
matt-boris merged 1 commit intomainfrom
matt-boris/gwWinLoadUserProfile

Conversation

@matt-boris
Copy link
Contributor

Fixes #8083 (hopefully 🤞🏻)

Generic Worker (windows): waits for the User Profile Service (ProfSvc) to be running before performing profile operations on first boot, and fixes a bug where LoadUserProfile retry logic for "device not ready" errors never actually retried due to an incorrect error type assertion.

@matt-boris matt-boris force-pushed the matt-boris/gwWinLoadUserProfile branch from b311167 to 5931a1e Compare February 19, 2026 20:43
@matt-boris matt-boris force-pushed the matt-boris/gwWinLoadUserProfile branch from 5931a1e to 0ed68a0 Compare February 19, 2026 21:00
@matt-boris matt-boris marked this pull request as ready for review February 19, 2026 22:37
@matt-boris matt-boris requested a review from a team as a code owner February 19, 2026 22:37
@matt-boris matt-boris requested review from lotas and petemoore and removed request for a team February 19, 2026 22:37
return pinfo.Profile, nil
}

if errno, ok := err.(syscall.Errno); ok && errno == 21 { // ERROR_NOT_READY
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was always returning as false due to an incorrect error type assertion, so retries were never done. I confirmed in papertail that we never see any logs containing LoadUserProfile failed with.

Copy link
Contributor

@lotas lotas left a comment

Choose a reason for hiding this comment

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

This must be it! :)

@matt-boris matt-boris merged commit 5cd0d8e into main Feb 20, 2026
73 checks passed
@matt-boris matt-boris deleted the matt-boris/gwWinLoadUserProfile branch February 20, 2026 14:59
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.

Workers coming up with failure "LoadUserProfile: The device is not ready."

2 participants