Bug 661830

Summary: Stream reading from HTTPWebResponse (downloading) timed-out if a ServiceHost with any bindings
Product: [Mono] Mono: Class Libraries Reporter: Syed Husain Wan Mohamad Akbar <syed.husain>
Component: WCFAssignee: Atsushi Enomoto <atsushieno>
Status: CONFIRMED --- QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None Flags: aenomoto: needinfo? (syed.husain)
Version: 2.8.x   
Target Milestone: ---   
Hardware: i386   
OS: RHEL 5   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: A sample program which simulate the download of a file, and after 15 seconds, starts a Service Host which will make the download timed-out

Description Syed Husain Wan Mohamad Akbar 2010-12-30 09:19:56 UTC
Created attachment 406576 [details]
A sample program which simulate the download of a file, and after 15 seconds, starts a Service Host which will make the download timed-out

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10

A Stream reading from HTTPWebResponse will timed-out if there's ServiceHost instantiate with any type of bindings - I've tested it using BasicHttpBinding and NetTcpBinding. This can be proven if the file is big enough.

If you look at the attachment, the code stop at Line 89 :

          currentDownloadChunks = resStream.Read(readBytes, 0, _downloadChunks);

Note : Most probably this code will work on Mono 2.6.7,but not Mono 2.8.1

Reproducible: Always

Steps to Reproduce:
1.Edit the sample program with the location of download file of your choice
2.The download file must be big, preferably 50Mb.
3.Run the program
4.After the Service Host has been instantiate, wait a few seconds and it will stop reading from the Stream.
Actual Results:  
Exception "The operation has timed out" will occurred.

Expected Results:  
The download finish

I'm running on Mono 2.8.1 which I build from source. Here are the steps that I took to build it:

build libgdiplus, mono-2.8.1, mod-mono, xsp
Comment 1 Forgotten User vxPDddArjq 2011-01-03 20:20:59 UTC
-> class libs.
Comment 2 Syed Husain Wan Mohamad Akbar 2011-01-04 01:09:05 UTC
What do you mean by class libs? Is there a package that I didn't build?
(In reply to comment #1)
> -> class libs.
Comment 3 Atsushi Enomoto 2011-01-04 01:32:45 UTC
That's a bug category change that you don't have to worry about.
Comment 4 Syed Husain Wan Mohamad Akbar 2011-01-04 01:34:00 UTC
Ah, ok. Cool.
Comment 5 Atsushi Enomoto 2011-01-05 06:00:46 UTC
Can't this be reasonably smaller repro? It takes forever to run.
Comment 6 Syed Husain Wan Mohamad Akbar 2011-01-05 07:30:03 UTC
I've cut all the codes to the essential part. So this is the smallest I can get. How I test it is by compiling the code using Visual Studio on my Windows machine, and copy the exe to the Centos machine. And then run the exe using mono.

Perhaps you want the .exe?