[Bsd-sharp-list] BSD# -> FreeBSD ports tree merge done
L Kamenov
kamenovl at gmail.com
Thu Feb 8 01:17:06 MST 2007
On 2/6/07, L Kamenov <kamenovl at gmail.com> wrote:
I did some tests with mod_mono and xsp and I found something
pretty odd. The problems started to appear when the webserver
was returning 411s randomly.
I took the time and looked at the mechanism used to transfer data
between mod_mono and mod-mono-server.
The interesting part in this case is the GetClientBlock(..) which will
use a BinaryReader over a network stream (I guess in this case
UnixSocket wrapped around in a Stream). From what I've seen so
far mod_mono will send the size of the chunk and then the chunk itself.
For example [size int4 = 8000][bytes[8000], which the above specified
fn will read. However, I've noticed that in certain situations (currently
unknown) the BinaryReader will read _LESS_ say 2048 when the header
would've specified, say 8000.
There is another function called ShouldClientBlock(..) which would read
data sent from mod_mono (to continue this should be ZERO). However
because the stream was cut short (8000 - 2048), it will read an entirely
wrong value, say 2192192921 and it will stop reading data.
Currently I worked around this by wrapping the BinaryReader in
GetClientBlock(..)
in a loop which will try and read all the bytes not just the fraction.
Tracing the BinaryReader will lead to the point where it will be easier to find
where and why the above is happening.
If anyone have seen this before, please do let me know if you've found
a solution.
FreeBSD/amd64 5.4-STABLE
Mono JIT compiler version 1.2.2.1, (C) 2002-2006 Novell, Inc and
Contributors. www.mono-project.com
TLS: normal
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Disabled: none
xsp.exe 1.2.1.0
(c) (c) 2002-2006 Novell, Inc.
Minimalistic web server for testing System.Web
Ports
mod_mono-1.2.1
mono-1.2.2.1
xsp-1.2.1
Thanks in advance
Lou
More information about the Bsd-sharp-list
mailing list