Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

ACCESS_DENIED on Resume running on Windows7 #15

Closed
thr27 opened this issue May 17, 2019 · 4 comments · Fixed by #16
Closed

ACCESS_DENIED on Resume running on Windows7 #15

thr27 opened this issue May 17, 2019 · 4 comments · Fixed by #16
Assignees
Labels
bug Something isn't working

Comments

@thr27
Copy link
Contributor

thr27 commented May 17, 2019

Using damon on windows7 fails on starting an application.
Damon terminates with ACCESS_DENIED error on trying to resume threads in child process.

{"level":"info","cmdline":["D:\dev\go.dev\src\github.com\jet\damon\damon.exe","C:\Windows\System32\notepad.exe"],"revision":"90081519ee8206e7af6671120ed382b0298ec0af","version":{"Revision":"90081519ee8206e7af6671120ed382b0298ec0af","Number":"0.1.0","PreRelease":"","BuildMetadata":""},"time":"2019-05-17T17:16:44+02:00","message":"damon starting"}
{"level":"error","error":"The handle is invalid.","time":"2019-05-17T17:16:44+02:00","message":"win32: failed to close process handle"}
{"level":"error","stacktrace":["github.com/jet/damon/container.(*Container).Start\n\tD:/dev/go.dev/src/github.com/jet/damon/container/container.go:181","main.main\n\tD:/dev/go.dev/src/github.com/jet/damon/main.go:82","runtime.main\n\td:/dev/golang/src/runtime/proc.go:200","runtime.goexit\n\td:/dev/golang/src/runtime/asm_amd64.s:1337"],"error":"container: Could not resume process main thread: Access is denied.","time":"2019-05-17T17:16:44+02:00","message":"damon startup error"}

@thr27
Copy link
Contributor Author

thr27 commented May 17, 2019

This can be fixed with a simple patch in win32\thread_win32.go, line 172

Instead of _THREAD_RESUME you need _THREAD_SUSPEND_RESUME
Issue_5_patch.zip

@justenwalker
Copy link
Contributor

Hi @thr27 thanks for reporting this issue, and supplying a patch! Are you able to submit the patch as part of a PR?

@thr27
Copy link
Contributor Author

thr27 commented May 17, 2019

Sorry havn't done a PR before ...

@justenwalker
Copy link
Contributor

No problem. I've created a PR for you with your patch in #16

@justenwalker justenwalker added the bug Something isn't working label May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants