|
Hi, I’m posting here hoping someone can throw some light into the problem. I'm a little bit lost now. Our server code (Plastic SCM) running on Raspberry on Mono 4.4.0 (exact version below) ends up not awaking from socket.BeginReceive after a while. I mean, client connects and requests data in 4MB chunks, and depending on the run, it can transfer a few GB but it ends up not awaking. The client just sits waiting on a “socket recv” but the server doesn’t answer. Connection is established (can be checked at OS level). The code could be simplified as follows: mSocket.BeginReceive(buffer, 0, 0, SocketFlags.None, OnMessageReceived, null); _OnMessageReceived_ => does the EndReceive and then reads data and enqueues the request for a threadpool to attend it. Once the request is attented and the response sent, BeginReceive is invoked again. Important: all “BeginReceive()” calls are done from the same thread which NEVER dies. All we use the BeginReceive for is to decouple socket from thread, so we do not have a 1-1. You see we do pass “zero” as bytes to read, because all we want to achieve is to get awakened when new data is received, then just read using blocking calls (no async). I’m asking if there could be something about Mono because I read 4.6 release notes (http://www.mono-project.com/docs/about-mono/releases/4.6.0/) and the “atomic fixes for ARM64”. Could it be related somehow. The same code runs on Windows and Linux PCs (even Macs) without issues. We use the same code on all our production servers and even our Cloud roles, and we are not aware of issues. Now we are testing a new faster storage and using Raspberry to check how fast it goes on slower hardware. Complete Mono version: Mono JIT compiler version 4.4.0 (tarball Tue Jun 14 13:44:06 UTC 2016) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: normal Notifications: epoll Architecture: armel,vfp+hard Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen . Thanks! Pablo Santos www.plasticscm.com |
_______________________________________________ Mono-devel-list mailing list [email protected] http://lists.dot.net/mailman/listinfo/mono-devel-list
