-
Notifications
You must be signed in to change notification settings - Fork 88
Description
I'm working on a compiler for a little language and keep running into hangs when calling into the compiled delegates with DynamicInvoke. According to dotTrace 42.9% of the time below that is CreateDelegate and the rest seems to be invisible to the profiler. (I assume it's unmanaged.) I've tried pausing in the debugger at random points and ended up deep in the IL generation code somewhere.
Are there any additional debug options I can enable or tips for narrowing this down? I'm linking against debug builds of Microsoft.Dynamic.dll and Microsoft.Scripting.dll, but I think the issue might be farther down.
I'm happy to share access to the repo if anybody is interested in taking a look, but so far I haven't been able to narrow this down to a reproduction case that doesn't involve my compiler and runtime code, which is ~6k lines of C# so far.
I've attached a sample DebugView of the compiled expression tree, but it has dynamic calls back into the runtime. This tree hangs 100% of the time.
failing-expression-tree.txt