[Mono-bugs] [Bug 75239][Wis] New - DNS.GetHostName() and multiple threads

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jun 12 12:09:29 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vguzev at yandex.ru.

http://bugzilla.ximian.com/show_bug.cgi?id=75239

--- shadow/75239	2005-06-12 12:09:29.000000000 -0400
+++ shadow/75239.tmp.3176	2005-06-12 12:09:29.000000000 -0400
@@ -0,0 +1,110 @@
+Bug#: 75239
+Product: Mono: Class Libraries
+Version: 1.0
+OS: GNU/Linux [Other]
+OS Details: Linux skif 2.4.27 #1 SMP Thu Apr 14 15:25:11 MSD 2005 i686 athlon i386 GNU/Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: vguzev at yandex.ru               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DNS.GetHostName() and multiple threads
+
+Description of Problem:
+DNS.GetHostName() sometimes hangs on in my programs! When I tried to find 
+a small example why does it happen I found another one error that's 
+connected with DNS.GetHostName and multithreading as I think...
+
+Steps to reproduce the problem:
+1. mcs testdns.cs
+--8<-----------------testdns.cs------------------------------
+using System;
+using System.Threading;
+using System.Net;
+
+public class TestDNS {
+ public static void fun2() {
+  Console.WriteLine( Dns.GetHostName() );
+ }
+
+ public static void fun1() {
+  Thread t = new Thread( new ThreadStart( TestDNS.fun2 ) );
+  t.Start();
+  Thread t2 = new Thread( new ThreadStart( TestDNS.fun2 ) );
+  t2.Start();
+ }
+
+ public static void Main( string[] args ) {
+  for ( int i = 0; i < 300; i++ ) {
+   Thread t = new Thread( new ThreadStart( TestDNS.fun1 ) );
+   t.Start();
+  }
+ }
+}
+--8<-----------------testdns.cs------------------------------
+2. Run the compiled program:
+[vadim at skif testdnsgethostname]$ mono testdns.exe > out
+
+** (testdns.exe:31837): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32436): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32048): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:31937): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32039): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32064): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32347): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32348): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:32351): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+** (testdns.exe:31979): WARNING **: _wapi_timestamp_exclusion: Breaking a 
+previous timestamp
+
+Actual Results:
+Writes a lot of warnings and sometimes just hangs on...
+
+Expected Results:
+Should work OK.
+
+How often does this happen? 
+Always
+
+Additional Information:
+--8<-----------------------------------------------
+[vadim at skif testdnsgethostname]$ uname -a
+Linux skif 2.4.27 #1 SMP Thu Apr 14 15:25:11 MSD 2005 i686 athlon i386 
+GNU/Linux
+[vadim at skif testdnsgethostname]$ mono --version
+Mono JIT compiler version 1.1.7, (C) 2002-2005 Novell, Inc and 
+Contributors. www.mono-project.com
+        TLS:           __thread
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: normal
+--8<-----------------------------------------------
+
+
+Best regards,
+Vadim B. Guzev
+http://u.pereslavl.ru/~vadim/MCSharp/


More information about the mono-bugs mailing list