Bug 687906 - Long-running WCF client based on System.ServiceModel.ClientBase<TChannel> crashes with 'The operation has timed-out'
Summary: Long-running WCF client based on System.ServiceModel.ClientBase<TChannel> cra...
Status: NEW
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: WCF (show other bugs)
Version: 2.10.x
Hardware: 64bit Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Atsushi Enomoto
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 16:22 UTC by Emily Lewis
Modified: 2011-04-15 16:32 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
This is a working example that reproduces the bug (9.84 KB, application/zip)
2011-04-15 16:22 UTC, Emily Lewis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lewis 2011-04-15 16:22:00 UTC
Created attachment 425216 [details]
This is a working example that reproduces the bug

User-Agent:       Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

I have constructed a very simple WCF server with a single method, void Ping(). I have also built a client based on System.ServiceModel.ClientBase<TChannel> that repeatedly calls the server in order to measure call-time. When you run the server and the client in very short order the client will throw the following exception:

     ---->System.TimeoutException
     Message
          The operation has timed-out.
     Stack
          at System.ServiceModel.Channels.HttpRequestChannel+HttpChannelRequestA
syncResult.WaitEnd () [0x0003c] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10
.1\mcs\class\System.ServiceModel\System.ServiceModel.Channels\HttpRequestChannel
.cs:435
          at System.ServiceModel.Channels.HttpRequestChannel.EndRequest (IAsyncR
esult result) [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\c
lass\System.ServiceModel\System.ServiceModel.Channels\HttpRequestChannel.cs:289
          at System.ServiceModel.Channels.HttpRequestChannel.Request (System.Ser
viceModel.Channels.Message message, TimeSpan timeout) [0x00000] in C:\cygwin\tmp
\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.ServiceModel\System.ServiceM
odel.Channels\HttpRequestChannel.cs:63
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (Syst
em.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x0000b] in C:\cygwin\t
mp\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.ServiceModel\System.Servic
eModel\ClientRuntimeChannel.cs:579
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (Syst
em.ServiceModel.Description.OperationDescription od, System.Object[] parameters)
 [0x00066] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.S
erviceModel\System.ServiceModel\ClientRuntimeChannel.cs:534
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (Sy
stem.Reflection.MethodBase method, System.String operationName, System.Object[]
parameters) [0x00038] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\cla
ss\System.ServiceModel\System.ServiceModel\ClientRuntimeChannel.cs:499
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (Syst
em.Reflection.MethodBase method, System.String operationName, System.Object[] pa
rameters) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\class
\System.ServiceModel\System.ServiceModel\ClientRuntimeChannel.cs:479

Reproducible: Always

Steps to Reproduce:
1. Donwload and open the attached solution
2. Run the server in Microsoft .Net, you MUST run the server in Microsoft .Net due to a different mono bug, 687902
3. Run the client in mono.
4. Observe that the client will report average call time every 10 seconds, and further, note that the call times grow progressively worse:

The client is running, press a key to stop...
Contact!
0.356038481360591ms
0.455139100098399ms
0.500788488074118ms
0.531477380575767ms
0.669040636782572ms
0.667665567875337ms
0.714867617107943ms
0.833405514652808ms
0.847995121207501ms
1ms
1.01244019138756ms

In a few minutes the client eventually crashes with this exception:

     ---->System.TimeoutException
     Message
          The operation has timed-out.
     Stack
          at System.ServiceModel.Channels.HttpRequestChannel+HttpChannelRequestA
syncResult.WaitEnd () [0x0003c] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10
.1\mcs\class\System.ServiceModel\System.ServiceModel.Channels\HttpRequestChannel
.cs:435
          at System.ServiceModel.Channels.HttpRequestChannel.EndRequest (IAsyncR
esult result) [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\c
lass\System.ServiceModel\System.ServiceModel.Channels\HttpRequestChannel.cs:289
          at System.ServiceModel.Channels.HttpRequestChannel.Request (System.Ser
viceModel.Channels.Message message, TimeSpan timeout) [0x00000] in C:\cygwin\tmp
\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.ServiceModel\System.ServiceM
odel.Channels\HttpRequestChannel.cs:63
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (Syst
em.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x0000b] in C:\cygwin\t
mp\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.ServiceModel\System.Servic
eModel\ClientRuntimeChannel.cs:579
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (Syst
em.ServiceModel.Description.OperationDescription od, System.Object[] parameters)
 [0x00066] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.S
erviceModel\System.ServiceModel\ClientRuntimeChannel.cs:534
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (Sy
stem.Reflection.MethodBase method, System.String operationName, System.Object[]
parameters) [0x00038] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\cla
ss\System.ServiceModel\System.ServiceModel\ClientRuntimeChannel.cs:499
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (Syst
em.Reflection.MethodBase method, System.String operationName, System.Object[] pa
rameters) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\class
\System.ServiceModel\System.ServiceModel\ClientRuntimeChannel.cs:479
Actual Results:  
The client quickly crashes with this exception:

     ---->System.TimeoutException
     Message
          The operation has timed-out.
     Stack
          at System.ServiceModel.Channels.HttpRequestChannel+HttpChannelRequestA
syncResult.WaitEnd () [0x0003c] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10
.1\mcs\class\System.ServiceModel\System.ServiceModel.Channels\HttpRequestChannel
.cs:435
          at System.ServiceModel.Channels.HttpRequestChannel.EndRequest (IAsyncR
esult result) [0x00029] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\c
lass\System.ServiceModel\System.ServiceModel.Channels\HttpRequestChannel.cs:289
          at System.ServiceModel.Channels.HttpRequestChannel.Request (System.Ser
viceModel.Channels.Message message, TimeSpan timeout) [0x00000] in C:\cygwin\tmp
\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.ServiceModel\System.ServiceM
odel.Channels\HttpRequestChannel.cs:63
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (Syst
em.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x0000b] in C:\cygwin\t
mp\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.ServiceModel\System.Servic
eModel\ClientRuntimeChannel.cs:579
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (Syst
em.ServiceModel.Description.OperationDescription od, System.Object[] parameters)
 [0x00066] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\class\System.S
erviceModel\System.ServiceModel\ClientRuntimeChannel.cs:534
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (Sy
stem.Reflection.MethodBase method, System.String operationName, System.Object[]
parameters) [0x00038] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\cla
ss\System.ServiceModel\System.ServiceModel\ClientRuntimeChannel.cs:499
          at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (Syst
em.Reflection.MethodBase method, System.String operationName, System.Object[] pa
rameters) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.1\mcs\class
\System.ServiceModel\System.ServiceModel\ClientRuntimeChannel.cs:479



Expected Results:  
The client should be able to call the server in perpetuity without the client crashing.

I tried a number of variations in this test setup - I tried newing the client once and then calling it over and over, I also tried newing the client once, calling it and then disposing it over and over - both approaches eventually crash.