AppFabric DataCacheFactory() initialization hangs in VS2013, works fine in VS2010 and VS2012
Asked Answered
C

2

6

I have an application that has been working for a while. I tried running it with VS2013 and it hangs on a line where it tries to initialize a DataCacheFactory object. The same code works fine with VS2010 and VS2012.

    private static DataCacheFactory GetDataCacheFactory()
    {
        if (factory == null)
        {
            lock (lockObject)
            {
                if (factory == null)
                {
                    factory = new DataCacheFactory();  //VS2013 hangs on this line
                }
            }
        }
        return factory;
    }

No errors are generated. The code just hangs on the line factory = new DataCacheFactory().

The AppFabric DLLs are current versions.

I welcome any suggestions for identifying why the code hangs on this line.

Caning answered 30/10, 2013 at 16:19 Comment(6)
could you please describe your environment. Is it a remote cluster or a single host running on your machine ?Neurasthenia
Could you attach windbg to your vshost & devenv processes, and print what ~*e!clrstack command yields (using sosex) ?Tammitammie
Or just attach another devenv to your running process, and see what threads are alive, and what they are doing/hanging on...Tammitammie
I am running the app in debug mode on my local boxCaning
I had a similar issue and resolved it: [#20968424 [1]: #20968424Obscure
I checked the port. I also tried changing it, but no luck. Still hanging on that line.Caning
C
0

I have resolved this issue, but I don't know what was causing it. I tried using DebugDiag to take a dump and analyze it. The analysis indicated that the process was waiting for something to complete in a Compatibility module in some Microsoft code.

I noticed that there were two Compatibility Databases installed with IIS 8. I uninstalled both items and tried running my app again. This time the app successfully executed the line that was hanging.

While this resolved the issue on this machine, I still don't know what is causing the problem. I have a colleague with a similar configuration and he has no problem with the app hanging on the line above, even with the Compatibility databases installed.

Caning answered 27/3, 2014 at 20:41 Comment(0)
C
0

As you are developing your app on VS, this might be a .net application. please check the targeted .net framework version from project properties when running on VS13.

Counterproof answered 20/1, 2014 at 12:12 Comment(3)
The targeted .net framework is 4.0. It is the same code that runs in VS 2010 and 2012, but hangs in 2013.Caning
perform that operation on a try block and catch any exception. try { factory = new DataCacheFactory(); } catch(//relevant exception )Counterproof
I have tried the same code in a try/catch block, but that didn't yield anything as there was no exception. The code is just hanging on this line.Caning
C
0

I have resolved this issue, but I don't know what was causing it. I tried using DebugDiag to take a dump and analyze it. The analysis indicated that the process was waiting for something to complete in a Compatibility module in some Microsoft code.

I noticed that there were two Compatibility Databases installed with IIS 8. I uninstalled both items and tried running my app again. This time the app successfully executed the line that was hanging.

While this resolved the issue on this machine, I still don't know what is causing the problem. I have a colleague with a similar configuration and he has no problem with the app hanging on the line above, even with the Compatibility databases installed.

Caning answered 27/3, 2014 at 20:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.