[Mono-bugs] [Bug 355473] New: Abort when socket fails to connect in background thread

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jan 22 17:24:50 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=355473


           Summary: Abort when socket fails to connect in background thread
           Product: Mono: Runtime
           Version: SVN
          Platform: x86-64
        OS/Version: RHEL 4
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: io-layer
        AssignedTo: dick at novell.com
        ReportedBy: joncham at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=191409)
 --> (https://bugzilla.novell.com/attachment.cgi?id=191409)
Test case

Description of Problem:
I am trying to connect to a socket in a background thread. If the socket fails
to connect, it causes mono to abort. On .Net this continues to try and connect
to the socket.

Steps to reproduce the problem:
1. Run the attached sample programs.


Actual Results:
(gdb) run Test.exe
Starting program: /home/staff/jschambe/monosvn/install/bin/mono Test.exe
[Thread debugging using libthread_db enabled]
[New Thread 182894242304 (LWP 31923)]
[New Thread 1073887584 (LWP 31938)]
[New Thread 1075988832 (LWP 31939)]
[New Thread 1078155616 (LWP 31940)]
System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end)
[0x00000]
  at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint
remote_end_point) [0x00000]
  at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress[] ipAddresses,
Int32 port) [0x00000]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1078155616 (LWP 31940)]
0x00000000402298ef in ?? ()
(gdb) bt
#0  0x00000000402298ef in ?? ()
#1  0x0000002a961fd208 in ?? ()
#2  0x0000000000000000 in ?? ()
(gdb) call mono_pmip(0x00000000402298ef)
$1 = 0x9eb8a0 " Foo:OnSocketConnect (object) + 0xff (0x402297f0 0x402299b7)
[0x2a9557be00 - Test.exe]"


Expected Results:
>From .Net:
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)
System.Net.Sockets.SocketException: No connection could be made because the
targ
et machine actively refused it 127.0.0.1:50000
   at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
   at Foo.OnSocketConnect(Object result)

How often does this happen? 
Everytime

Additional Information:


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list