« May 2009 | June 2009 Archives | July 2009 »
There's a bug in all releases of our performance counter library that may cause the creation of an instance with a name that has been previously used as an instance but that has been released to fail by connecting the new instance to the previously released instance data structure. The bug is in PerformanceDataBlock.cpp, the else if around line 167 in AllocateObjectInstance() should be changed from: if (pInstance->NameLength == 0 && !pFirstFreeInstance) { pFirstFreeInstance = pInstance; firstFreeInstanceIndex = i; } else if (0 == memcmp( reinterpret_cast<byte *="">(pInstance)+ pInstance->NameOffset, unicodeInstanceName.c_str(), unicodeInstanceNameLength)) { allocationDisposition = ConnectedExisting; to if (pInstance->NameLength == 0 &&…

Race condition during service shutdown

| 0 Comments
There's a race condition in the service shutdown code which is most likely to show up if there's an exception thrown from your implementation of ContinueService(), PauseService() or StopService() but that could show up during any service shutdown sequence. This race condition is present in all versions of the Service Library and so far has only been reported by one client. A fix is available, please contact me directly if you need it, or think you need it. The fix will be included in the 6.1 release of The Server Framework which currently has no scheduled release date. Thanks to Richard and…
Eric Lippert has an interesting blog posting (here) on how sometimes you can be so focused on fixing the bug you fail to step back and take a better look at the actual problem that you're trying to solve. I'm guilty of this and, with me at least, it doesn't only apply to bug fixes. Sometimes I can become overcommitted to a design to the point where I don't recognise that it's just one design option I treat it as the only design option. I suppose it's to be expected, especially when you've already committed a lot of thought to…

New Windows Services library

| 0 Comments
I'm currently working on a new version of the Windows Services library that ships as part of the licensed I/O Completion Port Server Framework. The Services library allows you to turn your server into a Windows Service very easily and also allows you to run it as a normal executable inside the debugger, etc. It integrates nicely with our Performance Monitoring library for exposing perfmon counters and comes with several example servers that show you how to use it (see here and here). The library hasn't changed much for many years, it was originally put together back in around 1997…

Why not to compile as 64 bit...

| 0 Comments
Here's a nice piece by Rico Mariani about why Visual Studio is unlikely to go 64 bit any time soon. In a nut shell, unless you have very large data sets that need to be kept in memory you might be worse off as a 64 bit process than you are as a 32 bit process on a 64 bit operating system. Food for thought.…
I've had a couple of requests from clients recently that they be able to handle any structured exceptions in The Server Framework themselves. Up until now all framework threads install a SEH translator and catch the resulting C++ exceptions in their outer catch handlers and report the error to the framework user via various mechanisms. This generally works well and, prevents exceptions going unreported but sometimes users want to integrate the framework with code that deals with uncaught structured exceptions in other ways. The latest version of the framework will include two new configuration defines that can be set in the Config.h…

Allocating page aligned buffers

| 0 Comments
Back in October 2007 I briefly looked at, what seemed to be at the time, a simple change to The Server Framework so that you had the option to use buffers that were aligned to page boundaries. This could help you scale better as one of the two problems with scalability at the time was the 'I/O page lock limit'; there's a finite limit to the number of memory pages that can be locked at one time and in some circumstances data in transit via sockets is locked in memory whilst it is sent. Reducing the number of pages used, by making…

Where's the catch(...)

| 0 Comments
As of the next release of The Server Framework use of catch(...) handlers at thread boundaries, in 'no throw' functions and in destructors will be configurable. At present, in v6.0 and earlier of The Server Framework, we use catch(...) judiciously at thread boundaries in functions that are either marked as 'no throw' (with throw()) or which are 'implicitly no throw' and in some destructors. Generally these handlers let the user of the framework know about the unexpected exception via a callback. Generally there's not a lot you can do about it except log it and hope to find the cause later. I've always felt…
I've been working on a library that works in a similar way to our SChannel code and allows the use of the Microsoft "Negotiate" Security Support Provider Interface (SSPI) to provide NTLM and Kerberos support (see SPNEGO for more details). Things are going well and, in general, using Negotiate or NTLM or Kerberos is easier than using SChannel and the structure that was originally born to work with OpenSSL and then adapted for SChannel works well with the new security providers. It has also been especially useful to have all of the various high level tests that I developed for…
« May 2009 | June 2009 Archives | July 2009 »

About this Archive

This page is an archive of entries from June 2009 listed from newest to oldest.

May 2009 is the previous archive.

July 2009 is the next archive.

I usually write about C++ development on Windows platforms, but I often ramble on about other less technical stuff...

Find recent content on the main index or look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics
Subscribe to feed MegèveSki - skiing