Repository navigation
Test failure tracing/eventpipe/rundownvalidation/rundownvalidation/rundownvalidation.sh #54801
Copy link
Copy link
Closed
Labels
GCStressarch-x64area-Tracing-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'os-linuxLinux OS (any supported distro)Linux OS (any supported distro)tracking-external-issueThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directlyThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directly
Milestone
Description
Run: runtime-coreclr gcstress0x3-gcstress0xc 20210627.1
Failed test:
CoreCLR Linux x64 Checked gcstress0x3 @ Ubuntu.1804.Amd64.Open
- tracing/eventpipe/rundownvalidation/rundownvalidation/rundownvalidation.sh
Error message:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.Diagnostics.Tracing.TraceEvent.CopyBlob(IntPtr, IntPtr, Int32)
at Microsoft.Diagnostics.Tracing.TraceEvent.Clone()
at Microsoft.Diagnostics.Tracing.Parsers.ExternalTraceEventParser.<.ctor>b__0_0(Microsoft.Diagnostics.Tracing.TraceEvent)
at Microsoft.Diagnostics.Tracing.TraceEventDispatcher.Lookup(EVENT_RECORD*)
at Microsoft.Diagnostics.Tracing.EventPipeEventSource.DispatchEventRecord(EVENT_RECORD*)
at Microsoft.Diagnostics.Tracing.EventPipeEventSource.EventCache_OnEvent(Microsoft.Diagnostics.Tracing.EventPipeEventHeader ByRef)
at Microsoft.Diagnostics.Tracing.EventPipe.EventCache.SortAndDispatch(Int64)
at Microsoft.Diagnostics.Tracing.EventPipe.EventCache.ProcessSequencePointBlock(Byte[])
at Microsoft.Diagnostics.Tracing.EventPipeSequencePointBlock.ReadBlockContents(FastSerialization.PinnedStreamReader)
at Microsoft.Diagnostics.Tracing.EventPipeBlock.FromStream(FastSerialization.Deserializer)
at FastSerialization.Deserializer.ReadObjectDefinition(FastSerialization.Tags, FastSerialization.StreamLabel)
at FastSerialization.Deserializer.ReadObject()
at Microsoft.Diagnostics.Tracing.EventPipeEventSource.Process()
at Tracing.Tests.Common.IpcTraceTest+<>c__DisplayClass8_0.<Validate>b__1()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task+<>c.<.cctor>b__284_0(System.Object)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
/datadisks/disk1/work/AA440922/w/B06F0997/e/tracing/eventpipe/rundownvalidation/rundownvalidation/rundownvalidation.sh: line 394: 26241 Aborted (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
Return code: 1
Raw output file: /datadisks/disk1/work/AA440922/w/B06F0997/uploads/Reports/tracing.eventpipe/rundownvalidation/rundownvalidation/rundownvalidation.output.txt
Raw output:
BEGIN EXECUTION
/datadisks/disk1/work/AA440922/p/corerun rundownvalidation.dll ''
0.0s: ==TEST STARTING==
33.6s: Started sending sentinel events...
33.8s: Connecting to EventPipe...
65.9s: Connected to EventPipe with sessionID '0x7fd1800093a0'
65.9s: Creating EventPipeEventSource...
76.6s: EventPipeEventSource created
80.0s: Dynamic.All callback registered
80.0s: Running optional trace validator
80.9s: Finished running optional trace validator
80.9s: Starting stream processing...
98.9s: Saw new provider 'Microsoft-DotNETCore-SampleProfiler'
131.0s: Saw sentinel event
131.0s: Stopped sending sentinel events
131.3s: Starting event generating action...
131.3s: Stopping event generating action
131.4s: Sending StopTracing command...
169.4s: Saw new provider 'Microsoft-DotNETCore-EventPipe'
169.6s: Saw new provider 'Microsoft-Windows-DotNETRuntimeRundown'
Gathering state for process 26241 corerun
Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.26241.dmp
Written 132464640 bytes (32340 pages) to core file
Dump successfully written
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test Harness Exitcode is : 1
To run the test:
set CORE_ROOT=/datadisks/disk1/work/AA440922/p
/datadisks/disk1/work/AA440922/w/B06F0997/e/tracing/eventpipe/rundownvalidation/rundownvalidation/rundownvalidation.sh
Expected: True
Actual: False
Stack trace
at tracing_eventpipe._rundownvalidation_rundownvalidation_rundownvalidation_._rundownvalidation_rundownvalidation_rundownvalidation_sh() in tracing.eventpipe.XUnitWrapper.dll:token 0x6000024+0x295
Runfo Tracking Issue: tracing/eventpipe/rundownvalidation/rundownvalidation/rundownvalidation.sh
| Build | Definition | Kind | Run Name | Console | Core Dump | Test Results | Run Client |
|---|---|---|---|---|---|---|---|
| 1626538 | runtime | PR 65398 | Mono Android x64 Release @ Ubuntu.1804.Amd64.Android.29.Open | console.log | runclient.py | ||
| 1626376 | runtime | PR 65489 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1626136 | runtime | PR 64358 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1625363 | runtime | PR 65489 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1625267 | runtime | PR 64358 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1623185 | runtime | PR 64358 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1622882 | runtime | PR 64358 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1614899 | runtime | PR 64358 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py | |
| 1612319 | runtime | PR 64358 | CoreCLR Linux arm Checked no_tiered_compilation @ (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-bfcd90a-20200121150440 | console.log | core dump | runclient.py |
Build Result Summary
| Day Hit Count | Week Hit Count | Month Hit Count |
|---|---|---|
| 0 | 0 | 9 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
GCStressarch-x64area-Tracing-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'os-linuxLinux OS (any supported distro)Linux OS (any supported distro)tracking-external-issueThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directlyThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directly
Activity
tommcdon commentedon Jun 28, 2021
@davidwrighton @josalem related to #51477?
VincentBu commentedon Jul 12, 2021
Run runtime-coreclr gcstress0x3-gcstress0xc 20210711.1
Failed test:
Error message
josalem commentedon Jul 12, 2021
It's possible. This isn't runtime code; this is Microsoft/PerfView code on the stack. I'd be surprised if there was an AV in TraceEvent that we haven't hit before now given the number of tests that use it. Especially since we haven't changed the version in recent memory.
This failure has a dump associated with it, so I should be able to dig into it a little more. I've got a few things on my plate, so I'll put this on the stack to investigate.
(CC @brianrob)
To elaborate on the issue text, the two mentioned tests have different failures. The error message in the issue text is for the rundown validation test.
This is the error message for the ContextualReflection test:
I'm not sure if these are related.
josalem commentedon Jul 12, 2021
Took a look at the history for the rundown validation test. It's been intermittently failing since last Friday with varying errors. There's the above AV, but there is also the following error:
It's not immediately obvious to me what assert failed, though:
runtime/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs
Lines 395 to 408 in 738b09b
I'm guessing something happened during the QCall for
GetHashCodeon thestringbeing used as a key:runtime/src/coreclr/vm/comutilnative.cpp
Line 1984 in 57bfe47
josalem commentedon Jul 14, 2021
I investigated the
CopyBlob()AV stack trace (different from my previous comment), and it appears to be something wonky surrounding following pointers to pinned GC handles.EventPipeEventSourcereads data intobyte[]buffers, then pins them usingGC.Alloc(data, GCHandleType.Pinned). It then walks the buffer and creates theEVENT_RECORDstructs that the TraceEvent library uses. When I look at the stack, I see a SIGSEGV on an address that is supposed to point to the payload of one of theseEVENT_RECORDobjects.EventPipeEventSourceand TraceEvent in general tend to pin objects and then directly access things unsafely with pointers.I'm not convinced the pointer arithmetic/bookkeeping is wrong. It checks bounds and whatnot. When the logic goes to dereference the pointer into the pinned buffer, however, it seg faults. The address is not included in the dump created by createdump, but is in the system created dump. That being said, the system created dump seems to have the values at the address all zeroed out, which may indicate that it is junk data and that is why it isn't in the createdump dump.
The long and short of it is: this call stack is segfaulting on what should be an address into a pinned GC handle for a
byte[]. I'll continue to investigate. I don't have any evidence pointing to TraceEvent being wrong here.josalem commentedon Jul 14, 2021
I investigated a little further and this looks like this might be caused by the GC collecting data while it is still in use. The code is in the middle of
SortAndDispatchwhich walks the dictionary of events for all the threads and (as the name implies) sorts then dispatches the events. The seg fault is happening when the logic goes to clone some memory that is supposed to be in a pinned GC handle. When I look at the array of these pinned buffers, however, all the entries in the cache are marked as null.One of those entries is supposed to be where the pinned buffer pointed to by the faulting address lived.
None of the above logic should be pointing to arbitrary data not allocated by itself, nor is it code that has changed recently. I don't believe that this is being caused by TraceEvent itself.
@Maoni0 or @cshung is this an instance where something marked as pinned got collected, or is it possible that the pinning isn't working because the pinning APIs are misused? I've got this dump open if there is any info you would need to determine yes or no.
Maoni0 commentedon Jul 14, 2021
if you have a pinned handle, it's a strong handle so GC will treat it as live till you call Free on it.
it would be helpful to show the code where you are pinning the object of interest and how it's related to this EventMarker array.
josalem commentedon Jul 14, 2021
Here is the relevant code I found digging through TraceEvent:
https://github.com/microsoft/perfview/blob/6b4771eecba5ed00555a34d70e19a8742af4ee0a/src/TraceEvent/EventPipe/EventCache.cs#L248-L280
Those are stored in this dictionary on
EventChache:9 remaining items
josalem commentedon Aug 9, 2021
I'll be moving this issue to 7 in order to track completion of microsoft/perfview/issues/1474 and updating dotnet/runtime to the subsequent TraceEvent version.
VincentBu commentedon Sep 29, 2021
Failed again in: runtime 20210928.21
Failed test:
Error message:
ViktorHofer commentedon Sep 30, 2021
According to runfo this is failing multiple times per week (not the same stack as in the initial post but the same as the post above): https://runfo.azurewebsites.net/search/tests/?q=started%3A%7E7+definition%3Aruntime+name%3Arundownvalidation
josalem commentedon Sep 30, 2021
Looking at the linked failures in the runfo page, I think there are two different failures and neither is the one tracked in this issue. If I recall, there's a different issue tracking the mono timeout failure that makes up the majority of them, but the two coreclr Windows x86 failures looks new. When I get back to my desk I'll see about rearranging things so the right issue is tracked.
josalem commentedon Sep 30, 2021
@ViktorHofer I think the problem that runfo is tracking in this Issue is actually #59296.
CC @lateralusX since this appears to be affecting Mono
krwq commentedon Oct 6, 2021
Can this be disabled while investigation is pending? similarly to #59994
lateralusX commentedon Oct 6, 2021
Looks like this issue has diverged from its original report (that was a CoreCLR crash) and is now most likely the same underlying issue as #59296.
lateralusX commentedon Oct 6, 2021
I add it to the exclude list as well.
hoyosjs commentedon Mar 9, 2022
The underlying issue has been fixed. The hits this month were for a PR.