You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RyuJIT/ARM32] CoreRT failed with assert in Object::ValidateInner !CREATE_CHECK_STRING(pMT && pMT->Validate()) #8892
To reproduce this you need to clone the latest coreclr, corefx, corert, build all of them for armel (tizen), create runtime environment with the (edited) script from the attachment, push it to a device and execute the following commands:
cd env_dir
export COMPlus_AltJit=*
./corerun ilc.dll --verbose @Hello.ilc.rsp
needed jit diffs
diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp
index 552a6dff9..008966b8b 100644
--- a/src/jit/compiler.cpp
+++ b/src/jit/compiler.cpp
@@ -2738,6 +2738,15 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
}
#ifdef ALT_JIT
+
+#ifdef _TARGET_ARM_
+ if (IsTargetAbi(CORINFO_CORERT_ABI))
+ {
+ opts.altJit = true;
+ // altJitVal = "*";
+ }
+#endif
+
if (pfAltJit->contains(info.compMethodName, info.compClassName, &info.compMethodInfo->args))
{
opts.altJit = true;
@@ -2763,6 +2772,15 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
}
#ifdef ALT_JIT
+
+#ifdef _TARGET_ARM_
+ if (IsTargetAbi(CORINFO_CORERT_ABI))
+ {
+ opts.altJit = true;
+ altJitVal = "*";
+ }
+#endif
+
// In release mode, you either get all methods or no methods. You must use "*" as the parameter, or we ignore it.
// You don't get to give a regular expression of methods to match.
// (Partially, this is because we haven't computed and stored the method and class name except in debug, and it
Also you probably may need to turn off jit version control in CoreRT
diff --git a/src/Native/jitinterface/jitwrapper.cpp b/src/Native/jitinterface/jitwrapper.cpp
index ec926d46..a66279af 100644
--- a/src/Native/jitinterface/jitwrapper.cpp
+++ b/src/Native/jitinterface/jitwrapper.cpp
@@ -5,6 +5,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdint.h>
+#include <stdio.h>
#include "dllexport.h"
#include "jitinterface.h"
@@ -74,7 +75,7 @@ DLL_EXPORT int JitCompileMethod(
GUID versionId;
pJit->getVersionIdentifier(&versionId);
- if (memcmp(&versionId, &JITEEVersionIdentifier, sizeof(GUID)) != 0)
+ if (0 && memcmp(&versionId, &JITEEVersionIdentifier, sizeof(GUID)) != 0)
{
// JIT and the compiler disagree on how the interface looks like.
// Either get a matching version of the JIT from the CoreCLR repo or update the interface
@jkotas Thanks! With this fix this assert's gone. We have another assertion namely
Assert Failure
Expression: [Recursive resource lookup bug]
Description: Infinite recursion during resource lookup within System.Private.CoreLib. This may be a bug in System.Private.CoreLib, or potentially in certain extensibility points such as assembly resolve events or CultureInfo names. Resource name: IO_EOF_ReadBeyondEOF
Stack Trace:
at System.SR.InternalGetResourceString(String key)
at System.SR.GetResourceString(String resourceKey, String defaultString)
at System.SR.get_IO_EOF_ReadBeyondEOF()
at System.IO.__Error.EndOfFile()
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadInt32()
at System.Resources.ManifestBasedResourceGroveler.CreateResourceSet(Stream store, Assembly assembly)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at System.SR.InternalGetResourceString(String key)
at System.SR.GetResourceString(String resourceKey, String defaultString)
at System.SR.get_IO_EOF_ReadBeyondEOF()
at System.IO.__Error.EndOfFile()
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadInt32()
at System.Resources.ManifestBasedResourceGroveler.CreateResourceSet(Stream store, Assembly assembly)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at System.SR.InternalGetResourceString(String key)
at System.SR.GetResourceString(String resourceKey, String defaultString)
at System.SR.get_Word_At()
at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Exception.GetStackTrace(Boolean needFileInfo)
at System.Exception.ToString(Boolean needFileLineInfo, Boolean needMessage)
at System.Exception.ToString()
at Internal.JitInterface.CorInfoImpl.AllocException(Exception ex)
at Internal.JitInterface.CorInfoImpl._getFunctionEntryPoint(IntPtr thisHandle, IntPtr* ppException, CORINFO_METHOD_STRUCT_* ftn, CORINFO_CONST_LOOKUP& pResult, CORINFO_ACCESS_FLAGS accessFlags)
at Internal.JitInterface.CorInfoImpl.JitCompileMethod(IntPtr& exception, IntPtr jit, IntPtr thisHandle, IntPtr callbacks, CORINFO_METHOD_INFO& info, UInt32 flags, IntPtr& nativeEntry, UInt32& codeSize)
at Internal.JitInterface.CorInfoImpl.CompileMethod(IMethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
at ILCompiler.RyuJitCompilation.ComputeDependencyNodeDependencies(List`1 obj)
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeDependencies(List`1 deferredStaticDependencies)
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes()
at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper)
at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper)
at ILCompiler.Program.Run(String[] args)
at ILCompiler.Program.Main(String[] args)
but the compilation process has progressed much further, so I think that it's another story.
the resources callstack above is not #8503. Does it look like it needs a corefx bug opened? I thought resource lookups tried to catch all exceptions to avoid recursion.
We are currently failing fast. We have discussed that before and @jkotas mentioned the following
Resource loading is very low level system because of everything else in CoreLib depends on it. If it stops working for CoreLib resources, there is something seriously wrong. The process will very likely crash soon anyway. Changing fail fast to anything else won’t change this fact. It is not that different from other fatal errors like GC heap corruption. We fail fast when we run into one; we do not try to recover with fingers crossed that we maybe survive it.
Activity
sergign60 commentedon Sep 7, 2017
@jkotas @BruceForstall @CarolEidt
CC: @Dmitri-Botcharnikov @CarolEidt @BredPet @alpencolt
sergign60 commentedon Sep 7, 2017
stack trace before the assert
values of the variables
sergign60 commentedon Sep 7, 2017
sergign60 commentedon Sep 7, 2017
are the commands
a dead code here because of
r4isn't used later?I'm very novice in GC story so any help will be appreciated. This issue is the showstopper for CoreRT armel tizen project now
jkotas commentedon Sep 7, 2017
This is non-standard calling convention. Look for
GTF_CALL_M_SECURE_DELEGATE_INV.jkotas commentedon Sep 7, 2017
This looks like a bad GC info generated for the
GTF_CALL_M_SECURE_DELEGATE_INVcase.The one problem that I see is on this line:
TYP_REFdoes not look right here. I think it should beTYP_BYREF.sergign60 commentedon Sep 7, 2017
@jkotas Thanks! With this fix this assert's gone. We have another assertion namely
but the compilation process has progressed much further, so I think that it's another story.
Should I prepare the PR or you will do it?
jkotas commentedon Sep 7, 2017
Prepare the PR for it please.
Fix for #13830 issue
sergign60 commentedon Sep 7, 2017
dotnet/coreclr#13831
jkotas commentedon Sep 7, 2017
https://github.com/dotnet/coreclr/issues/12659#issuecomment-315309194 has the same crash. Not sure whether it was fixed.
Fix for #13830 issue (#13831)
danmoseley commentedon Sep 10, 2017
@tarekgh the resources callstack above is not https://github.com/dotnet/coreclr/issues/12668. Does it look like it needs a corefx bug opened? I thought resource lookups tried to catch all exceptions to avoid recursion.
tarekgh commentedon Sep 11, 2017
@danmosemsft
We are currently failing fast. We have discussed that before and @jkotas mentioned the following
danmoseley commentedon Sep 11, 2017
@tarekgh failfast is fine, I was wondering if there is a bug to fix.