The ABC of Blue-Screen Dump Analysis

June 28, 2008

Kernel-mode crash dump analysis, affectionately called "Blue-Screen Analysis" thanks to the manifestation of kernel-mode crashes in Windows, is an extremely complicated topic to master.  Analyzing user-mode crash dumps is hard enough, plagued by missing information, mismatched symbols, dump corruption and inability to reproduce the live problem.  Kernel-mode crash dumps add a new dimension of complexity due to the interaction of multiple components (drivers, user-mode processes, Windows core services and components) which is often the root cause of the dump.  Additionally, analyzing a dump of significant complexity requires a great amount of knowledge about Windows system mechanisms and kernel-mode programming...

The Case of RegSvr32 and the Haunted DLL

Last week I've resolved a simple "debugging" case by phone, and figured that it might benefit putting it online.  Here's the approximate outline of the call: Customer: Sasha, we have a COM component registration that is failing because regsvr32 says it can't find the DLL. Myself: Where is it looking for that DLL? Customer: It doesn't matter where it's looking.  We put the component in the System32 directory, but it still complained that it can't find it. Myself: Is it a 64-bit system and you're trying to register a 32-bit component?  You should...
no comments

Non-Paging CLR Host

June 27, 2008

I've just uploaded a new open-source project called "Non-Paged CLR Host" to CodePlex, in collaboration with Alon Fliess.  This project features a custom CLR host that can be used for executing any existing .NET application with little or no modification.  This custom CLR host ensures that all memory given out to the CLR is locked into physical memory if possible, thus eliminating paging completely. This can provide two important and distinct advantages to server and client applications alike: Applications will benefit from no paging during normal operation.  Even if other applications are actively allocating memory, allocations performed under...

Forwarding Context-ful Messages

June 22, 2008

Workflow Services (introduced in .NET 3.5) are based on a simple convention for passing the workflow instance identifier from the client to the workflow and from the workflow to any services it invokes.  This convention revolves around the use of context-ful bindings (BasicHttpContextBinding, WSHttpContextBinding, NetTcpContextBinding and others) and a simple dictionary which contains a key called "instanceId" and a value that contains the workflow instance identifier. This information is passed out-of-band to facilitate cleaner interfaces - it's passed in a SOAP header called ContextMessageHeader (which is an internal WCF class), and can be accessed from the channel's context manager...
tags: ,

Constructing an Empty WCF Reply Message

June 17, 2008

We're continuing the series of posts arising from the implementation intricacies of a WCF router.  Today's post features a seemingly simple task: Constructing an empty WCF reply message, which is the equivalent of the message sent in response to an operation which returns void (but is not one-way). The motivation for this could be the following: A router needs to dispatch a message to multiple subscribers.  However, the router itself is unaware of the data contract - it is willing to work on an untyped Message-based contract.  The operation doesn't have a return type - it's void.  On the...

Obtaining an Untyped WCF Message from a Typed Service Operation

June 15, 2008

Most WCF services operate on a typed message contract.  In other words, the underlying Message object is not available because it is parsed by the default WCF operation invoker into the data contract that the service operation expects. However, oftentimes you need access to the underlying Message object even though your typed service does not directly consume it.  For example, you might want to automatically serialize the message, or pass it to other services that expose an untyped message contract (such as routing services or notification publishing services outlined in my previous posts). This can be accomplished by making...

Parallel Extensions and Native Code?

June 11, 2008

In my recent post series on the June '08 Parallel Extensions CTP we have looked at a multitude of new features for concurrent programming in managed code.  When the framework is finally released, we will have a lightning-fast scheduler, a fully functional parallel execution model for LINQ queries, new concurrent collection classes, new synchronization primitives featuring better performance, pipeline and out-of-order task execution models, and so much more. But what about native code?  What about us native developers?  Surely there must be an ongoing effort to provide concurrent programming libraries for native code? There surely is!  The Native Concurrency...
no comments

Waltzing Through the Parallel Extensions June CTP: Known Issues

In the previous posts in this series, we have looked at a multitude of features provided by the PFX June CTP, including synchronization mechanisms, task-related features and new collection classes.  However, there's also a large list of known issues with this release - it's obviously not production-ready, but nonetheless is a great milestone by the Parallel Extensions team.  The most interesting issues mentioned are: TPL threads are not cleanly shut down when run in the Visual Studio test host.  This effectively means that it's difficult to write unit tests for code that uses the Parallel Extensions.  There's a...
no comments

Waltzing Through the Parallel Extensions June CTP: Collection Classes

In the previous posts in this series, we have looked at the new synchronization mechanisms and the new task-related features in the PFX June CTP.  This post features a brief overview of the new collection classes introduced in the CTP. In the new System.Threading.Collections namespace we find three new classes which facilitate concurrent programming.  These collections do not yet represent the wealth of concurrent and non-blocking collections that might be implemented in the future, but they are certainly a good sign. A concurrent collection in the PFX nomenclature is what we recognize by the names of a non-blocking or...
no comments

Waltzing Through the Parallel Extensions June CTP: Tasks

In the previous post in this series, we have looked at the new synchronization primitives offered by the PFX June CTP.  In this post, we will look at task-related features and at the new task scheduler. Task Continuation Another interesting feature in the CTP is the task continuation paradigm, allowing us to specify what should happen when a task completes.  This is accomplished through the use of the ContinueWith method on the Task and Future classes.  Among other things, this mechanism can be used for chaining multiple asynchronous operations in an ordered pipeline of execution.  Since most of the...
no comments