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

Massive popping up PresentMon windows #94

Closed
DevTechProfile opened this issue Nov 25, 2020 · 8 comments
Closed

Massive popping up PresentMon windows #94

DevTechProfile opened this issue Nov 25, 2020 · 8 comments

Comments

@DevTechProfile
Copy link

Here's a user with a special problem: https://www.youtube.com/watch?v=H-Aih3noZQQ&feature=youtu.be

Any ideas? The user updated Windows but it doesn't help.

@jenatali
Copy link
Collaborator

Looks like PresentMon is trying to self-elevate, but is not actually launching the new process elevated, and so it repeats the process. You could probably work around it by launching the original app elevated.

@JeffersonMontgomery-Intel
Copy link
Collaborator

Yes, that's the only thing in PresentMon I can think of. But, the parent should exit right away and the child should be called with -dont_restart_as_admin so if that's it something weird is going wrong that I don't understand.

It might also be interesting to see if PresentMon does this on it's own, or only via CapFrameX. Could CapFrameX be starting multiple processes?

@DevTechProfile
Copy link
Author

DevTechProfile commented Nov 26, 2020

It might also be interesting to see if PresentMon does this on it's own, or only via CapFrameX. Could CapFrameX be starting multiple processes?

Same issue when starting PresentMon directly and CX is single instance.

@DevTechProfile
Copy link
Author

Yes, that's the only thing in PresentMon I can think of. But, the parent should exit right away and the child should be called with -dont_restart_as_admin so if that's it something weird is going wrong that I don't understand.

-dont_restart_as_admin seems to help. No more popping up PresentMon windows...

@jenatali
Copy link
Collaborator

@JeffersonMontgomery-Intel Looks like the restarted process doesn't include -dont_restart_as_admin, only the original command line options. However the original instance should immediately exit() after the new process is started, so I have no idea how it's possible to get into a loop like this.

@JeffersonMontgomery-Intel
Copy link
Collaborator

Hmm, looks like your right :) Plus it only exits() after waiting for the child in order to pipe the return code through.

So, not sure why either escalation is failing or we're failing to detect we're elevated... but after that happens the endless process spawning makes sense.

I haven't been able to reproduce this so far here, but I can at least add the '-dont_restart_as_admin' on the child which should fix this. I'll send you something to test soon.

@JeffersonMontgomery-Intel
Copy link
Collaborator

Can you try with the following build? I'm hoping this fixes the recursive spawning, but it also checks some errors so the printf's may help figure out what is going wrong as well.

PresentMon64-1.5.2_issue94test.zip

@DevTechProfile
Copy link
Author

Thanks. I asked the user to test it, no reaction yet.

JeffersonMontgomery-Intel added a commit that referenced this issue Dec 15, 2020
This prevents endless loop of RestartAsAdministrator() if we fail to
enable SeDebugPrivilege after the first restart.

See issue #94
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

No branches or pull requests

3 participants