-
Notifications
You must be signed in to change notification settings - Fork 154
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
Strange TdhGetEventInformation failure for SampleProf events #249
Comments
I have now tried this and also similar steps described in this article: https://woshub.com/wmi-troubleshooting/ |
All the commands in these two articles are used to re-register or recompile MOF files. However, if some MOF files are missing (deleted or corrupted), these commands will not be effective. Quick solution: consider reinstalling Windows. Alternatively, using DISM or Windows Recovery might also be worth a try. Root cause analysis: compare the list and contents of MOF files with those from a freshly installed Windows system. You could also back up the existing MOF files, copy all MOF files from a freshly installed Windows system, and then recompile/register these files. These suggestions are based on my personal experience. Please proceed at your own risk. |
I have now literally removed the complete |
I just did a completely fresh Windows 11 24H2 install, but I still have the bug, so it seems to be a regression with a new Windows update... Maybe they changed something about the |
I also see this issue on Win 11 24H2 26100.2454 |
The problem also shows up when you loaded traces into traceview. @clemenswasser when you tried using TDD were you looking at svchost.exe? It seems like that's where the metadata reading actually happens. If you take a look at this profile of traceview/svchost loading and etl file it provides some insight into what's going on: https://share.firefox.dev/3VlP9Db |
@jrmuizel
I tried to debug it side by side with Ghidra disassembly opened, but didn't get very far. |
Looks like we can see the queries using wmimon |
On a machine that's not having this problem I can use |
wmimon confirms that |
@clemenswasser I saw your issue here: https://developercommunity.visualstudio.com/t/Function-TdhGetEventInformation-does-not/10800006?sort=active&topics=windows+10.0.18850. Did you file feedback through Feedback Hub? If so, if you can send me the link to the feedback I can pass it on to our Microsoft contact. |
Yes, I did. I filed one Feedback Hub ticket before the developer community ticket in the WPA category: https://aka.ms/AAtmswa |
Thanks, I've passed those links on to our contact |
@jrmuizel FYI: I have just updated to the latest "Windows 11 Insider Preview Build 27758.1000" as an experiment. This seems to be fixed in that version 🥳: > .\TdhGetEventInformationBug.exe
SampleProf TdhGetEventInformation status = 122 |
Fixes #348. This works around missing schemas after a recent Windows 11 update. Specifically, version 10.0.26100 24H2 was affected by this. See microsoft/krabsetw#249 for some more details.
Fixes #348. This works around missing schemas after a recent Windows 11 update. Specifically, version 10.0.26100 24H2 was affected by this. See microsoft/krabsetw#249 for some more details.
Fixes #348. This works around missing schemas after a recent Windows 11 update. Specifically, version 10.0.26100 24H2 was affected by this. See microsoft/krabsetw#249 for some more details.
Hello,
I am really sorry for "abusing" your Issue tracker, but I don't know any better place where I could report this issue and ask for help from ETW experts.
Backstory:
I am currently trying to use a Windows sampling profiler based on ETW and specifically the events emitted by the "NT Kernel Logger" on my new Windows PC. The sampling profiler uses the trace data helper (TDH) Win32 library (tdh.dll) for "decoding" the ETW events.
Some relevant events include:
MSNT_SystemTrace/StackWalk/Stack
,MSNT_SystemTrace/Process/Start
and most importantlyMSNT_SystemTrace/PerfInfo/SampleProf
(with the actual samples).Problem:
The problem is that for unknown reasons, the
TdhGetEventInformation
function fails specifically on my new PC and only for theMSNT_SystemTrace/PerfInfo/SampleProf
EVENT_RECORDs. On any other PC I tested the function works correctly and on my new PC the function succeeds for all other EVENT_RECORDs except the SampleProf EVENT_RECORDs.Repro:
A small repro code with an extracted
MSNT_SystemTrace/PerfInfo/SampleProf
EVENT_RECORD is here: https://gist.github.com/clemenswasser/e11f06eacbcc9118a6be88db445db77eWhen running it on my new PC I get the following incorrect output (TdhGetEventInformation incorrectly returns ERROR_NOT_FOUND):
TdhGetEventInformation status = 1168
On any other PC I get the following correct output (TdhGetEventInformation correctly returns ERROR_INSUFFICIENT_BUFFER):
TdhGetEventInformation status = 122
As I am not really experienced with ETW I don't have any clue as to why this happens (Is there some global ETW configuration I can repair or something similar?).
I already tried to debug the machine code of the TdhGetEventInformation implementation and comparing it with a TTD trace of a system where it works, but without much success.
The text was updated successfully, but these errors were encountered: