Created attachment 5659 [details]
patch for mod_mono 2.10 for apache 2.4
GDB Server: 7.4.1
Linux Kernel 3.2.51
I applied a patch against mod_mono so that I can compile it with apache 2.4, will include that.
I have an asp.net website that allows you to upload a file. The file is around 120 MB in size. I am using the jquery qq-upload control to upload the file. It shows the percentage as it is being uploaded.
I was getting an exception "Houston..." most of the time when the upload was very quick, since it was from a computer in the same network. It also happens when the upload is slow sometimes, but never if the computer was a virtual machine. Only if it was running on the hardware directly.
I found it was coming from this file:
It came from this section of it:
public int GetClientBlock ([Out] byte  bytes, int position, int size)
if (SetupClientBlock () != 0) return 0;
* turns out that that GET_CLIENT_BLOCK (ap_get_client_block) can
* return -1 if a socket is closed
writer.Write ((int) ModMonoCmd.GET_CLIENT_BLOCK);
int i = reader.ReadInt32 ();
if (i == -1)
if (i > size)
throw new Exception ("Houston...");
return reader.Read (bytes, position, i);
When I included what values i and size are checking with, I got these results from 4 attempts:
GetClientBlock Exception (i>size): i = 960779623 size = 32768
GetClientBlock Exception (i>size): i = 1633895019 size = 32768
GetClientBlock Exception (i>size): i = 927229250 size = 32768
GetClientBlock Exception (i>size): i = 1817601579 size = 32768
So the variable i, never seems to be the same value when this happens.
I have found that running xsp2 or xsp4 does not cause this exception to show up. So the problem is definitely with the apache module mod_mono.
I want to use FastCGI to run mono, but there is no sample configurations out there.