Bug 10071 - SIGSEV from accessing socket.RemoteEndPoint
Summary: SIGSEV from accessing socket.RemoteEndPoint
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-02-06 03:50 UTC by Roope Kangas
Modified: 2017-08-17 17:26 UTC (History)
4 users (show)

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

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:
Status:
RESOLVED NORESPONSE

Description Roope Kangas 2013-02-06 03:50:25 UTC
Hi!

I got a sigsev while load-testing our server application. Running it with mono 2.9.10 under gdb.
With MONO_DISABLE_AIO=1.

It happens after when the server is accepting a new connection and tries to make a string representation of the
clients ip&port..

Trace looks like:
0x00000000403166da in Net.Client:Init (this=..., socket=...) at /var/lib/jenkins/jobs/Load test turf-server/workspace/turf-server/source/Net/Client.cs:51
51	/var/lib/jenkins/jobs/Load test turf-server/workspace/turf-server/source/Net/Client.cs: No such file or directory.
	in /var/lib/jenkins/jobs/Load test turf-server/workspace/turf-server/source/Net/Client.cs

(gdb) backtrace
#0  0x00000000403166da in Net.Client:Init (this=..., socket=...) at /var/lib/jenkins/jobs/Load test turf-server/workspace/turf-server/source/Net/Client.cs:51
#1  0x000000004031513e in Net.Server`1:ProcessAccept (this=..., args=...) at /var/lib/jenkins/jobs/Load test turf-server/workspace/turf-server/source/Net/Server.cs:478
#2  0x0000000040314815 in Net.Server`1:AcceptEventArg_Completed (this=..., sender=<value optimized out>, e=...) at /var/lib/jenkins/jobs/Load test turf-server/workspace/turf-server/source/Net/Server.cs:467
#3  0x00000000403145b1 in System.Net.Sockets.SocketAsyncEventArgs:OnCompleted (this=<value optimized out>, e=...) at /tmp/mono-2.10.9/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:195
#4  0x0000000040313731 in System.Net.Sockets.SocketAsyncEventArgs:AcceptCallback (this=..., ares=...) at /tmp/mono-2.10.9/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:311
#5  0x0000000040313158 in System.Net.Sockets.SocketAsyncEventArgs:DispatcherCB (ares=...) at /tmp/mono-2.10.9/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:249
#6  0x0000000040013b12 in (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (param0=System.AsyncCallback = {...}, param1=140731150642488, param2=140731150642472, param3=1074899392) at xdb.il:13
#7  0x000000000041fb78 in mono_jit_runtime_invoke (method="System.AsyncCallback:Invoke ()", obj=0x7fffed2f5f00, params=0x7ffe863e2d38, exc=0x7ffe863e2d28) at mini.c:5791
#8  0x00000000005613eb in mono_runtime_invoke (method="System.AsyncCallback:Invoke ()", obj=0x7fffed2f5f00, params=0x7ffe863e2d38, exc=0x7ffe863e2d28) at object.c:2755
#9  0x00000000005ad0e8 in mono_async_invoke (data=0x7ffe79c5aa40) at threadpool.c:626
#10 async_invoke_thread (data=0x7ffe79c5aa40) at threadpool.c:1433
#11 0x00000000005b3551 in start_wrapper_internal (data=0x7fffdc0038a0) at threads.c:784
#12 start_wrapper (data=0x7fffdc0038a0) at threads.c:832
#13 0x00000000005dd962 in thread_start_routine (args=0x7ffe58020e88) at wthreads.c:287
#14 0x000000000058a52d in gc_start_thread (arg=0x7fffdc005130) at sgen-gc.c:6154
#15 0x00007ffff7537851 in start_thread (arg=0x7ffe863e3700) at pthread_create.c:301
#16 0x00007ffff728511d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Line 51 is "var ip = ((IPEndPoint)socket.RemoteEndPoint);". There is a try/catch around it since it can throw exceptions (http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.remoteendpoint.aspx).

Any ideas on how to debug this more?
Comment 1 Rodrigo Kumpera 2017-07-14 23:51:16 UTC
Could you provide a complete test case that shows your issue so we can investigate?
Comment 2 Ludovic Henry 2017-08-17 17:26:54 UTC
Please reopen whenever you provide a reproduction case so we can have a look. Thank you.