Bug 33328 - Unmanaged crash in mono/Dns.GetHostName
Summary: Unmanaged crash in mono/Dns.GetHostName
Alias: None
Product: Runtime
Classification: Mono
Component: Interop ()
Version: 4.0.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: mono 4.2 preview 1
Assignee: Bugzilla
Depends on:
Reported: 2015-08-24 10:57 UTC by henrik
Modified: 2015-08-25 01:34 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

opaque binaries you can run on your computors (3.56 MB, application/x-dosexec)
2015-08-24 11:10 UTC, henrik

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description henrik 2015-08-24 10:57:42 UTC
➜  Proj git:(master) ✗ mono --version
Mono JIT compiler version 4.1.0 ((detached/ee621ce Tue May 26 06:44:35 EDT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug
	LLVM:          yes(3.6.0svn-mono-(detached/a173357)
	GC:            sgen
➜  Proj git:(master) ✗ mono --debug tools/paket.exe install
Paket version

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Net.Dns.GetHostByName_internal (string,string&,string[]&,string[]&) <IL 0x00028, 0xffffffff>
  at System.Net.Dns.GetHostByName (string) [0x00011] in /private/tmp/mono20150802-29607-1irbo9h/mono-4.0.2/mcs/class/System/System.Net/Dns.cs:419
  at System.Net.ServicePoint.get_HostEntry () [0x000a8] in /private/tmp/mono20150802-29607-1irbo9h/mono-4.0.2/mcs/class/System/System.Net/ServicePoint.cs:369
  at System.Net.WebConnection.Connect (System.Net.HttpWebRequest) [0x00084] in /private/tmp/mono20150802-29607-1irbo9h/mono-4.0.2/mcs/class/System/System.Net/WebConnection.cs:170
  at System.Net.WebConnection.InitConnection (object) [0x00044] in /private/tmp/mono20150802-29607-1irbo9h/mono-4.0.2/mcs/class/System/System.Net/WebConnection.cs:772
  at System.Net.WebConnection.<WebConnection>m__0 (object) [0x00000] in /private/tmp/mono20150802-29607-1irbo9h/mono-4.0.2/mcs/class/System/System.Net/WebConnection.cs:124
  at System.Runtime.Remoting.Messaging.AsyncResult.WaitCallback_Context (object) [0x0000e] in /private/tmp/source-mono-mac-crypto-32/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-4.1.0/mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs:94
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00081] in /private/tmp/source-mono-mac-crypto-32/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-4.1.0/external/referencesource/mscorlib/system/threading/executioncontext.cs:581
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /private/tmp/source-mono-mac-crypto-32/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-4.1.0/external/referencesource/mscorlib/system/threading/executioncontext.cs:530
  at System.Runtime.Remoting.Messaging.AsyncResult.<AsyncResult>m__0 (object) [0x00000] in /private/tmp/source-mono-mac-crypto-32/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-4.1.0/mcs/class/corlib/System.Runtime.Remoting.Messaging/AsyncResult.cs:80
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x0005a, 0xffffffff>
Comment 1 henrik 2015-08-24 11:00:37 UTC
Sorry, it seems paket didn't resolve the same mono version as my zsh, the version of mono this crash comes on is
Comment 2 henrik 2015-08-24 11:02:26 UTC
Paket lock file

cat paket.lock
  remote: https://www.nuget.org/api/v2
    Aether (6.0) - framework: net45
    Chiron (4.1.0)
      Aether (>= 6.0.0)
      FParsec (>= 1.0.1)
      FSharp.Core (>=
    EventStore.Client.FSharp (4.2.0)
      Chiron (>= 4.1.0)
      EventStore.Client.PreRelease (>= 3.1.0)
      FSharp.Core (>=
    EventStore.Client.PreRelease (3.1.1) - framework: net45
      Newtonsoft.Json (>= 6.0.8)
      protobuf-net (>=
    FParsec (1.0.1) - framework: net45
    FSharp.Actor-logary (3.3.3) - framework: net45
      FSharp.Core (>=
    FSharp.Core (
    FsPickler (1.3.5) - framework: net45
    FsSql (2.1.0)
      FSharp.Core (>= - framework: >= net40
    Fuchu (
    Hopac (
      FSharp.Core (>=
    Logary (3.3.3)
      FSharp.Actor-logary (>= 3.3.3)
      FSharp.Core (>=
      Newtonsoft.Json (>= 6.0.8)
      Newtonsoft.Json.FSharp (>= 3.2.2)
      NodaTime (>= 1.3.1)
      NodaTime.Serialization.JsonNet (>= 1.3.1)
    Logary.Adapters.EventStore (3.3.3)
      EventStore.Client.PreRelease (>= 3.1.0)
      FSharp.Core (>=
      Logary (>= 3.3.3)
    Newtonsoft.Json (7.0.1) - framework: net45
    Newtonsoft.Json.FSharp (3.2.2) - framework: net45
      FSharp.Core (>=
      Newtonsoft.Json (>= 6.0.8)
      NodaTime (>= 1.3.0)
    NodaTime (1.3.1)
    NodaTime.Serialization.JsonNet (1.3.1) - framework: net45
      Newtonsoft.Json (>= 4.5.11)
      NodaTime (>= 1.3.0)
    NuGet.CommandLine (2.8.6)
    protobuf-net ( - framework: net45
    Suave (0.31.1)
      FSharp.Core (>=
      FsPickler (>= 1.2.5)
  remote: haf/YoLo
    YoLo.fs (2f3861282ff984705e2b1fcfe01bf6217bed19af)
Comment 3 henrik 2015-08-24 11:05:01 UTC
$ cat paket.dependencies
framework: net45
source https://www.nuget.org/api/v2

nuget Chiron
nuget EventStore.Client.FSharp
nuget FSharp.Core
nuget FsSql
nuget Fuchu
nuget Hopac
nuget Logary
nuget Logary.Adapters.EventStore
nuget NodaTime
nuget NuGet.CommandLine
nuget Suave

github haf/YoLo YoLo.fs


Steps to repro:

 1. Create the above paket.dependencies
 2. Create the above paket.lock
 3. Download the correct paket version
 4. Run the command `mono paket.exe install`
Comment 4 henrik 2015-08-24 11:10:19 UTC
Created attachment 12620 [details]
opaque binaries you can run on your computors
Comment 5 Alexander Köplinger 2015-08-24 20:07:55 UTC
We discussed on gitter that this is likely caused by the mismatch between 4.0.2 and 4.1.0 on your system, looks like you forgot to close this one? :)