Search
Closed
as Not Reproducible Help for as Not Reproducible

1
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 500515
Opened: 10/23/2009 6:24:23 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I have a singleton service with this SBA:
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple,
UseSynchronizationContext = false,
IncludeExceptionDetailInFaults = true,
InstanceContextMode = InstanceContextMode.Single)]

In the ServiceHost constructor, I pass in an instance of my service class (and not the type of the service class). I then add multiple service endpoints, and call Open() on the service host. NOTE that Open() is called before any of the clients connect.

Clients then connect to one of the various endpoints hosted by the service.

I randomly see these errors:

Details:"System.ServiceModel.FaultException: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault</a:Action><a:RelatesTo>urn:uuid:fddf06c9-e530-44c6-82d2-b5c38c95ea2b</a:RelatesTo><a:To s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</a:To></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Receiver</s:Value><s:Subcode><s:Value xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">The communication object, System.ServiceModel.InstanceContext, cannot be modified while it is in the Opening state.</s:Text></s:Reason><s:Detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"></HelpLink><InnerException i:nil="true"></InnerException><Message>The communication object, System.ServiceModel.InstanceContext, cannot be modified while it is in the Opening state.</Message><StackTrace> at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrImmutable()
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.SingletonInstanceContextProvider.get_SingletonInstance()
at System.ServiceModel.Dispatcher.SingletonInstanceContextProvider.GetExistingInstanceContext(Message message, IContextChannel channel)
at System.ServiceModel.Dispatcher.ChannelHandler.TryRetrievingInstanceContext(RequestContext request)</StackTrace><Type>System.InvalidOperationException</Type></ExceptionDetail></s:Detail></s:Fault></s:Body></s:Envelope>
Details (expand)

Product Version

.NET Framework 3.5 SP1
Product Language
English

Operating System
Windows 7 (client)
Operating System Language
English

Architecture
x64

Priority
(1=blocking, 2=important, 3=nice to have)
2

Severity
(1=major functionality issue, 2=important functionality issue, 3=nice to have)
1

Steps to Reproduce
Host a singleton service with multiple endpoints. Have clients which stress the service.
Actual Results
Exception gets thrown to the client, as mentioned above.
Expected Results
No exceptions should be thrown, unless timeouts occur. In this case, no timeouts occur.
Component Usage
(any information on your scenario that may help in investigating your issue)
 

How often does this happen?
Sometimes Happens

Have you seen this problem in other versions?
I don't know if this issue existed previously
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 10/26/2009 at 5:00 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Microsoft on 11/16/2009 at 12:59 PM
Thanks for reporting this issue. It is hard to tell just by the exception stack what exactly the problem might be. We do perform a number of stress tests on the product, some very similar to the scenario you describe and there are no issues that we know of. Can you share a standalone repro that I could look at?
Since you are using concurrency mode multiple, the service implementation needs to be thread safe. It is possible that a bug in your service might be casuing some race conditions down the line resulting in these faults.

You probably already know this but just in case, additional information on MSDN:
http://msdn.microsoft.com/en-us/library/ms731193.aspx

Thanks,
Asad
WCF Team