Is it possible to use the dotnet tracing libraries on macOS? - .net-traceprocessing

I've gone through the example event-tracing projects located at https://github.com/microsoft/eventtracing-processing-samples and successfully built the projects. I'm running into missing dll's. For instance when running the CountProcesses example, I run into the following stack trace:
mono CountProcesses.exe test.etl
Unhandled Exception:
System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0
at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0
at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0
Before digging too deeply into the missing libraries, is traceprocessing intended to be cross-platform? Or does it rely on platform dependent libs in Windows?
System Setup:
OS: macOS Catalina 10.15.4
Mono JIT compiler version 6.8.0.105 (2019-10/82fffe07497 Tue Feb 4 10:09:51 EST 2020)
.NET Core SDK (3.1.201)

(I am a developer at Microsoft who works on the TraceProcessor project.)
Currently, the library relies on some Windows-only components and cannot be run on a Mac.

Related

EF Core with SQLite on Mono: e_sqlite3 not found

We are using Entity Framework Core 2.2.4 together with an SQLite database targeting .NET Framework 4.7.2. Following Nuget packages were installed:
Microsoft.Data.Sqlite
Microsoft.EntityFrameworkCore.Sqlite
Microsoft.EntityFrameworkCore.Tools
On my development machine (Windows 10) everything works fine but when trying to run the application with Mono on our 32-bit Linux machine, the following exception occurs:
FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type
initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.DllNotFoundException: e_sqlite3
at (wrapper managed-to-native)
SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <61bb3ca1db9c41ea88f280f0b1600d58>:0
at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <3d4b21fb9c764efbb11f6e3b02efff52>:0
at SQLitePCL.Batteries_V2.Init () [0x00005] in <f5d9c86a14864b5d99b8bdece1b8292c>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize () [0x0002f] in <b46e232ade014524baa458345f270c50>:0
at Microsoft.Data.Sqlite.SqliteConnection..cctor () [0x00000] in <b46e232ade014524baa458345f270c50>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection () [0x00006] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1[T].get_Value () [0x00008] in <adf771f92e754fe1bb85c5850cd0c16b>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection () [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Exists () [0x0000c] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.Exists () [0x0000b] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate (System.String targetMigration) [0x00012] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate (Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade) [0x00010] in <69f795dffc844780bfcfff4ff8415a92>:0
at TestEfCorePlusSqlite.Program.Main (System.String[] args) [0x0000e] in <c4fad569c9a241ef887b5b2ddbc0225f>:0
Since the application is built with Any CPU configuration, x86 and x64 folders are created in bin/Debug, both containing an e_sqlite3.dll. I already tried to copy the x86 dll to bin/Debug but the error still occurred.
What I've tried so far:
installing Microsoft.EntityFrameworkCore.Sqlite.Core together with
SQLitePCLRaw.bundle_e_sqlite3 as suggested here
installing Microsoft.EntityFrameworkCore.Sqlite (or
Microsoft.Data.Sqlite or SQLitePCLRaw.bundle_green) as suggested here
different combinations of SQLitePCLRaw.* packages
What do I have to do to get EF Core and SQlite running on Mono?
After a refreshing weekend I took another glance at the problem. I found the official Mono documentation regarding DllNotFoundException and used MONO_LOG_LEVEL=debug mono YourApp.exe to find out which lib Mono is trying to load. It was /usr/lib/libe_sqlite3.so which was not available on my system. All I did was to copy the available /usr/lib/libsqlite3.so and rename it to libe_sqlite3.so. I'm not sure if this is the preferred way but my application works.

Xamarin forms app crashes for unknown reason

I have built a Xamarin forms app with PCL.
The application crashes sometimes for unknown reason : either while scrolling though any of the picker on some pages of the application or while resuming the app after some period of inactivity (may be after 10-15 mins).
I am using Crittercism to report crash logs. I am not getting any stack trace or crash log for this crashes.
Details
Xamarin Studio : 5.9.5(biuld 9)
Xamarin.iOS : Version: 8.10.4.46 (Enterprise Edition)
Xamarin.Android : Version: 5.1.5.3 (Enterprise Edition).
Note : When I was checking in debug mode with device connected : I got 2 kinds of crashes which says :
1.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/throwhelper.cs:70
at System.Collections.Generic.Dictionary`2[System.String,Xamarin.Forms.AnimationExtensions+Info].get_Item (System.String key) [0x00000] in :0
at Xamarin.Forms.AnimationExtensions.HandleTweenerUpdated (System.Object o, System.EventArgs args) [0x00012] in :0
at Xamarin.Forms.Tweener.b__0 (Int64 step) [0x00037] in :0
at Xamarin.Forms.Ticker.SendSignals (Int32 timestep) [0x00063] in :0
at Xamarin.Forms.Platform.iOS.CADisplayLinkTicker.b__0 () [0x00000] in :0
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/Foundation/NSAction.cs:56
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/UIKit/UIApplication.cs:63
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0001c] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/UIKit/UIApplication.cs:46
at eRedbook.iOS.Application.Main (System.String[] args) [0x00008] in /Users/s.chandraganesh/Documents/TFS_New/eRedbook/Development/Source/Mobile/iOS/Main.cs:39
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Please help me to narrow down this issue.
This should be fixed in Xamarin.Forms 1.5.1.6471. Which version are you running on? Upgrading may fix the issue.

dnx kestrel "System.EntryPointNotFoundException: uv_loop_size"

I'm trying to run an unmodified Web Api application created by yo aspnet.
I'm getting this error:
System.EntryPointNotFoundException: uv_loop_size
at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.Libuv+NativeDarwinMonoMethods:uv_loop_size ()
at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.loop_size () <0x42615b8 + 0x00014> in <filename unknown>:0
at Microsoft.AspNet.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNet.Server.Kestrel.Networking.Libuv uv) <0x4261528 + 0x0002b> in <filename unknown>:0
at Microsoft.AspNet.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) <0x4261160 + 0x0005f> in <filename unknown>:0
Any ideas?
dnvm list output:
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-rc1-final coreclr x64 darwin
1.0.0-rc1-final mono linux/osx
* 1.0.0-rc2-16177 mono linux/osx default
mono version
Mono JIT compiler version 4.2.1 (explicit/6dd2d0d Tue Nov 10 18:01:18 EST 2015)
Update
I ran
export DYLD_FALLBACK_LIBRARY_PATH=/Users/Andy/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/
which ended up giving me a different error when running dnx web:
System.DllNotFoundException: libc.dylib
at (wrapper managed-to-native) System.IO.KeventWatcher:kqueue ()
at System.IO.KeventWatcher.GetInstance (IFileWatcher& watcher) <0x105a29310 + 0x000f3> in <filename unknown>:0
at System.IO.FileSystemWatcher.InitWatcher () <0x105a28fa0 + 0x0012c> in <filename unknown>:0
at System.IO.FileSystemWatcher..ctor (System.String path, System.String filter) <0x105a28d00 + 0x00114> in <filename unknown>:0
at System.IO.FileSystemWatcher..ctor (System.String path) <0x105a28cc0 + 0x00023> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher:.ctor (string)
at Microsoft.AspNet.FileProviders.PhysicalFilesWatcher..ctor (System.String root) <0x105a285b0 + 0x00154> in <filename unknown>:0
at Microsoft.AspNet.FileProviders.PhysicalFileProvider..ctor (System.String root) <0x105a282d0 + 0x000e4> in <filename unknown>:0
at Microsoft.AspNet.Hosting.HostingEnvironmentExtensions.Initialize (IHostingEnvironment hostingEnvironment, System.String applicationBasePath, IConfiguration config) <0x105a27f20 + 0x001ea> in <filename unknown>:0
at Microsoft.AspNet.Hosting.WebHostBuilder.Build () <0x105a1a860 + 0x000b8> in <filename unknown>:0
at Microsoft.AspNet.Hosting.WebApplication.Run (System.Type startupType, System.String[] args) <0x105560990 + 0x00216> in <filename unknown>:0
at Microsoft.AspNet.Hosting.WebApplication.Run (System.String[] args) <0x10555fef0 + 0x0001a> in <filename unknown>:0
at Microsoft.AspNet.Hosting.Program.Main (System.String[] args) <0x10555fec0 + 0x00014> in <filename unknown>:0
at Microsoft.AspNet.Server.Kestrel.Program.Main (System.String[] args) <0x10555fc90 + 0x000b5> in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x1050027a0 + 0x000b7> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () in <filename unknown>:line 0
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) in <filename unknown>:line 0
at Microsoft.Dnx.ApplicationHost.Program+<>c__DisplayClass3_0.<ExecuteMain>b__0 () in <filename unknown>:line 0
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () in <filename unknown>:line 0
at System.Threading.Tasks.Task.Execute () in <filename unknown>:line 0
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at System.IO.FileSystemWatcher.Stop () in <filename unknown>:line 0
at System.IO.FileSystemWatcher.Finalize () in <filename unknown>:line 0
FYI: This is not mono related
It is not finding the libuv native library via the System.Net.Libuv assembly:
https://github.com/dotnet/corefxlab/blob/d76ebe8ab5ed058d3d6903939ab0e4ee4e19b773/src/System.Net.Libuv/src/System/Net/Libuv/Interop.cs
1st) Run dnvm list -detailed to determine the location of dnx runtimes that you are using, i.e.
Active Version Runtime Architecture OperatingSystem Alias Location
------ ------- ------- ------------ --------------- ----- --------
1.0.0-beta8 mono linux/osx ~/.dnx/runtimes
1.0.0-rc1-final mono linux/osx ~/.dnx/runtimes
* 1.0.0-rc2-16177 mono linux/osx default ~/.dnx/runtimes
2nd) My dnx installs are $HOME/.dnx/runtime (the default), so I can run find ~/.dnx/packages -name "libuv*"
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/osx/native/libuv.dylib
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/win10-arm/native/libuv.dll
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/win7-x64/native/libuv.dll
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-beta8/runtimes/win7-x86/native/libuv.dll
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/libuv.dylib
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/win10-arm/native/libuv.dll
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/win7-x64/native/libuv.dll
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/win7-x86/native/libuv.dll
Once you find where your libuv.dylib does live on your system, you can set the env. var DYLD_FALLBACK_LIBRARY_PATH to that directory:
export DYLD_FALLBACK_LIBRARY_PATH=/your/libuv/directory/location:$DYLD_FALLBACK_LIBRARY_PATH
Run your dmvm cmd again:
dnvm exec 1.0.0-rc2-16177 dnx web
Note:
On OS-X libuv is also available via brew # stable version 1.7.5 but I have not tried it as MS is not versioning their libuv.dylib build so I am not sure if it is a custom version or not ...(?)
otool -L /Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/libuv.dylib
/Users/sushi/.dnx/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-rc1-final/runtimes/osx/native/libuv.dylib:
/Users/asplab/Documents/buildAgent/temp/buildTmp/fs-poll-5b0daf.out (compatibility version 0.0.0, current version 0.0.0)
After many reinstalls of Mono, Visual Code, Xamarin Studio, DNX, libuv, an upgrade of Node and RoberN giving me some clear pointers, I figured I should check my PATH env variable.
Sure enough, as soon as I added /usr/lib/:/usr/local/lib to my PATH, it all started working!
dnx web
Hosting environment: Production
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
Success!
In case anyone comes here looking for another solution...
I tried all of the above, including multiple re-installs of everything and PATH updates without success, and finally switched to CoreCLR as per the solution here and it finally worked!
dnvm install 1.0.0-rc1-update1 -r coreclr -arch x64
dnvm use 1.0.0-rc1-update1 -r coreclr -arch x64
dnvm list
then, go to your project and try it again
dnx web

DNU Restore Unknown Header on OSX Yosemite

I've tried a couple of times to get .Net running on my MacBook using instructions found on the official Asp.Net docs and elsewhere. The latest attempt was using the Yeoman generator instructions found here.
However when I try to run DNU Restore, I am always presented with the same error, albeit for a different library. The error is "unknown header: " followed by a number that differs depending on the library. Here is one example (only the first few and last few lines included for brevity):
Error: DownloadPackageAsync: https://www.nuget.org/api/v2/package/Microsoft.AspNet.Loader.IIS/1.0.0-beta5
Unknown header: 3649249205
----------
System.NotSupportedException: Unknown header: 3649249205
at SharpCompress.Common.Zip.ZipHeaderFactory.ReadHeader (UInt32 headerBytes, System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0
at SharpCompress.Common.Zip.SeekableZipHeaderFactory+<ReadSeekableHeader>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
at SharpCompress.Archive.Zip.ZipArchive+<LoadEntries>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
at SharpCompress.LazyReadOnlyCollection`1+LazyLoader[SharpCompress.Archive.Zip.ZipArchiveEntry].MoveNext () [0x00000] in <filename unknown>:0
at System.IO.Compression.ZipArchive.CreateZip (System.IO.Stream stream, ZipArchiveMode mode) [0x00000] in <filename unknown>:0
at System.IO.Compression.ZipArchive..ctor (System.IO.Stream stream, ZipArchiveMode mode, Boolean leaveOpen) [0x00000] in <filename unknown>:0
at Microsoft.Framework.PackageManager.Restore.NuGet.PackageUtilities.EnsureValidPackageContents (System.IO.Stream stream, Microsoft.Framework.PackageManager.PackageInfo package) [0x00000] in <filename unknown>:0
at Microsoft.Framework.PackageManager.Restore.NuGet.PackageUtilities+<>c__DisplayClass1_0.<OpenNupkgStreamAsync>b__0 (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at Microsoft.Framework.PackageManager.Restore.NuGet.HttpSource+<GetAsync>d__8.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <filename unknown>:0
at Microsoft.Framework.PackageManager.Restore.NuGet.PackageUtilities+<OpenNupkgStreamAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0
...
Restore failed
Unknown header: 3649249205
NuGet Config files used:
/Users/jamie.morris/.config/NuGet/NuGet.Config
Feeds used:
https://www.myget.org/F/aspnetvnext/api/v2/
https://nuget.org/api/v2/
I've tried deleting the contents of ~/.dnx/packages and removing old versions of dnx from ~/.dnx/runtimes. At present I am using the 1.0.0-beta6-12170 runtime.
Has anyone else had a similar problem or figured out how to fix it?
EDIT:
Here is the output of dnvm list:
Active Version Runtime Arch Location Alias
------ ------- ------- ---- -------- -----
* 1.0.0-beta6-12170 mono ~/.dnx/runtimes default
Here is the output of mono --version:
Mono JIT compiler version 3.12.1 (tarball Tue Mar 17 15:03:14 GMT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Upgrade to Mono 4.0.1 or greater.

NullReferenceExceptions while using latest mod_mono and xsp4

I need help figuring out what's wrong in my mono setup. I get NullReferenceExceptions when I try to run webforms and mvc3 apps on apache/mod_mono.
Here's the exceptions I get to httpd error log when trying to load pages on a browser:
Accessing a web forms page:
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: ---> System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: Server cannot flush a completed response
at System.Web.HttpResponse.Flush (Boolean final_flush) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.OutputPage () [0x00000] in <filename unknown>:0
Accessing a mvc3 page:
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0
The actual exception which was being reported was:
System.Web.HttpException: ---> System.NullReferenceException: Object reference not set to an instance of an object
at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
Another symptom is similar exceptions when I run xsp4:
xsp4
Exception caught during reading the configuration file:
System.NullReferenceException: Object reference not set to an instance of an object
at Mono.WebServer.XSP.Server+ApplicationSettings..ctor () [0x00000] in <filename unknown>:0
xsp4
Listening on address: 0.0.0.0
Root directory: /usr/local/src
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Stopping the server will not cause exceptions here. I wonder if the root directory here is correct? Which configuration file is xsp trying to read?
And here's data on versions etc:
Compiled mono, mod_mono and xsp from git using prefix /usr, versions are:
mono -V
Mono JIT compiler version 3.4.1 (master/d3e5522 Fri May 9 20:16:07 MSD 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
mod-mono-server4 --version
mod-mono-server4.exe 3.0.0.0
(c) (c) 2002-2011 Novell, Inc.
Mod_mono backend for XSP
mod-mono-server4 file content:
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/mod-mono-server4.exe" "$#"
xsp4 --version
xsp4.exe 3.0.0.0
Copyright (C) 2002-2011 Novell, Inc.
Minimalistic web server for testing System.Web
Can you guys spot anything that's wrong here? What could I do to fix this problem? I haven't found anything usable so far.
I did find this with same kind of exception described, but in my case xsp is not an old version.
https://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/

Resources