-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Test failure BasicEventSourceTests.TestsWrite.Test_Write_T_ETW #91769
Comments
Tagging subscribers to this area: @tommcdon Issue DetailsFailed in: runtime-coreclr libraries-jitstress 20230907.1 Failed tests:
Error message:
Stack trace:
|
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsFailed in: runtime-coreclr libraries-jitstress 20230907.1 Failed tests:
Error message:
Stack trace:
|
Failed again in: runtime-coreclr libraries-jitstress 20230912.1 Failed tests:
Error message:
Stack trace:
|
I see two problems
public EtwListener(string dataFileName = "EventSourceTestData.etl", string sessionName = "EventSourceTestSession") for this reason they try hard to run serially, disabling parallelism 3 ways -- Line 7 in e555a0e
this is apparently not working however
and that may be causing this
Question is -- why is parallelism happening
hence this output
I first assumed the first issue is simply exposing the second. But these are happening in remote exec processes. Only one thing should be happening in the process. Not clear what is going on. But whatever is causing this to be exposed -- is it a bug that should be fixed in TraceEventSession? (in dotnet/perfview repo -- @brianrob )? |
CC @davmason as it is EventSource issue. |
My best guess is that the From what I can see, the fix is to address the unexpected concurrency. TraceEventSession, especially with the same session name and file, is not designed to be used concurrently and can result in all sorts of unexpected behaviors. |
@brianrob is constructing two TraceEventSession concurrently (with different file and name parameters) expected to be unsafe? |
This should be fine. The key is that the name and file parameters are used to create machine-wide constructs, and that's why it's a problem if they are the same (unless you're explicitly attaching to an existing session, but that's another story and not what you're doing here). If you wanted to run tests in parallel, you could change the session names and ETL file paths and that should be OK. You just don't want too much parallelism because each machine has a maximum number of concurrent sessions, and it's not difficult to hit that, especially for Microsoft machines. |
@brianrob the reason I'm asking is that it appears that is not safe eg., the static SortedDictionary can get written by two concurrent threads. |
I don't think there is a strong statement around these APIs as being thread-safe, but many of them are. It feels to me like you should be able to call |
Posted microsoft/perfview#1934 to address this. |
OK, this issue is now tracking why our elaborate protections against any test concurrency in System.Diagnostics.Tracing.Tests are not doing the job... |
@danmoseley is there a better person to assign this to since we're now tracking test concurrency issues? I don't believe I'm the right person to investigate issues in the test runner |
Failed in: runtime-coreclr libraries-jitstress 20230907.1
Failed tests:
Error message:
Stack trace:
The text was updated successfully, but these errors were encountered: