-
Notifications
You must be signed in to change notification settings - Fork 705
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
System.Runtime.InteropServices.COMException (0x800700EA): More data is available. (Exception from HRESULT: 0x800700EA) #1767
Comments
Can you please put together a set of steps/repro code that causes this? |
Hey @brianrob, hope you are well. I just hit this during some local testing. Repro information:
What seems to happen is:
So, a few ideas on how to fix:
Any other ideas? Happy to submit a PR if you think one of these is viable. I lean towards option 2 as I couldn't find a lot of good documentation on the EtwMaxLoggers registry setting. |
@ryandle, thanks for the analysis. I agree that the second fix sounds right to me. Would be happy to accept a PR on this. 64 is the default value, though Windows 10+ does allow for larger values - https://learn.microsoft.com/en-us/windows/win32/api/evntrace/nf-evntrace-queryalltracesa#parameters. |
This change updates GetActiveSessionNames to check for ERROR_MORE_DATA and retry once when calling QueryAllTraces. I chose to implement this by modifying the current function as little as possible. To do that, I wrapped the core logic and made a recursive call to it for the retry, with a depth counter that maxes out at 1. This change also has a unit test, but I don't think it is ready to be comitted. I am including it so a discussion can be had. In general it seems hard to reliably simulate this condition on a broad set of machines that will run this test suite (65+ active etw sessions while EtwMaxLoggers registry key is not set.)
System.Runtime.InteropServices.COMException (0x800700EA): More data is available. (Exception from HRESULT: 0x800700EA)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.GetActiveSessionNames()
at Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.Utility.TraceEventUtil.CreateSession(String sessionName)
at Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.TraceEventServiceWorker.Initialize()
at Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.TraceEventService.<>c__DisplayClass21_1.b__0()
at Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Etw.TraceEventService.HandleException(String callerName, Action body)
The text was updated successfully, but these errors were encountered: