Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: "fatal error: PowerRegisterSuspendResumeNotification failure" when running in Windows docker containers [1.13 backport] #35746

Closed
gopherbot opened this issue Nov 21, 2019 · 7 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Milestone

Comments

@gopherbot
Copy link

@zx2c4 requested issue #35447 to be considered for backport to the next 1.13 minor release.

@gopherbot please backport my fix at https://golang.org/cl/208317 for this to 1.13

@networkimprov
Copy link

This can be closed; the CL it fixes was reverted.

@toothrot
Copy link
Contributor

toothrot commented Dec 9, 2019

@networkimprov could you please reference the CL that was reverted and merged? I am not seeing one as of right now.

@networkimprov
Copy link

CL is https://golang.org/cl/210437 merge pending

@ianlancetaylor
Copy link
Contributor

I'm not sure what the right protocol is here, so marking this issue as a release blocker for 1.13.6. See my comment at #35447 (comment).

@gopherbot
Copy link
Author

Change https://golang.org/cl/211280 mentions this issue: [release-branch.go1.13] runtime: do not use PowerRegisterSuspendResumeNotification on systems with "program time" timer

@dmitshur
Copy link
Contributor

dmitshur commented Jan 3, 2020

Approving this cherry-pick because this is a serious issue without a viable workaround. It is also being approved for 1.12 in issue #36377.

@gopherbot
Copy link
Author

Closed by merging b570a41 to release-branch.go1.13.

gopherbot pushed a commit that referenced this issue Jan 3, 2020
…eNotification on systems with "program time" timer

Systems where PowerRegisterSuspendResumeNotification returns ERROR_
FILE_NOT_FOUND are also systems where nanotime() is on "program time"
rather than "real time".  The chain for this is:

powrprof.dll!PowerRegisterSuspendResumeNotification ->
  umpdc.dll!PdcPortOpen ->
    ntdll.dll!ZwAlpcConnectPort("\\PdcPort") ->
      syscall -> ntoskrnl.exe!AlpcpConnectPort

Opening \\.\PdcPort fails with STATUS_OBJECT_NAME_NOT_FOUND when pdc.sys
hasn't been initialized. Pdc.sys also provides the various hooks for
sleep resumption events, which means if it's not loaded, then our "real
time" timer is actually on "program time". Finally STATUS_OBJECT_NAME_
NOT_FOUND is passed through RtlNtStatusToDosError, which returns ERROR_
FILE_NOT_FOUND. Therefore, in the case where the function returns ERROR_
FILE_NOT_FOUND, we don't mind, since the timer we're using will
correspond fine with the lack of sleep resumption notifications. This
applies, for example, to Docker users.

Updates #35447
Updates #35482
Fixes #35746

Change-Id: I9e1ce5bbc54b9da55ff7a3918b5da28112647eee
Reviewed-on: https://go-review.googlesource.com/c/go/+/211280
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
@golang golang locked and limited conversation to collaborators Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Projects
None yet
Development

No branches or pull requests

6 participants