Geek Speak

Framework releases

Back in October 2019 I pointed out that I didn’t normally do roadmaps of where the framework was going but did one anyway. Looking at how long it has taken to get from there to here I think I’m generally correct not to do roadmaps… I’ve been very busy with client work and the pandemic has caused us some disruption, but thankfully not too much. However, I think the main reason that it has taken so long to get the 7.

Are all fully patched Windows boxes really vulnerable to this easy UDP DDOS attack?

UPDATED: 23 August 2021 see here As I mentioned a while ago, it seems there’s a strangely fatal bug in the Windows networking stack at present. This manifests as massive non-paged pool memory usage if a process creates a UDP socket, binds it to an address and fails to read from it faster than other people are writing to it. The issue appears to be present on all current Windows operating systems but is NOT present on Windows Server 2012 R2 if recent patches have NOT been applied but IS present as soon as the box is patched up to date… My test box was patched up until March 2020 and ran fine, as soon as it was patched to June 2020 it started to behave badly.

Strangely fatal UDP issue on Windows...

UPDATED: 23 August 2021 see here One of my clients runs game servers on the cloud. They have an AWFUL lot of them and have run them for a long time. Every so often they have problems with DDOS attacks on their servers. They have upstream DDOS protection from their hosting providers but these take a while to recognise the attacks and so there’s usually a period when the servers are vulnerable.

I don't do roadmaps, but...

I’m in the process of putting together a series of releases for The Server Framework. It’s a little more complex than usual so I thought I’d explain why that is.For the past year we’ve been working on a Linux/Mac version of The Server Framework with several clients. This has involved adjusting a lot of the code and moving some stuff around; for example there was code in our “Win32Tools” library that isn’t Win32 or even Windows specific and so that now lives in a new tools library, “CoreTools”, that contains code that can build on all platforms.

VMWare bridged networking intermittently failing

This is one of those ’note to self’ postings… I have a VMWare box that uses bridged networking and has a static DHCP address that I use for a specific client’s testing as a db server. Every so often the virtual machine fails to connect to the network properly and ends up with a bogus ip address. I then spend ages trying to work out what’s going wrong… This link, may help.

More thoughts on C++ Tools (on Windows)

Last Friday’s rant about C++ static and dynamic analysis tools was picked up by Reddit and I have had quite a few helpful suggestions for other tools to try. Thanks! Dr. Memory. Microsoft’s Application Verifier. CPPDepend PVS Studio Microsoft’s CRT Debug heap. CLang - various options, especially using AddressSanitizer. So far I’ve had a quick look at Dr. Memory, which seems to be pretty good. Free, easy to download and install and it’s faster than DevPartner and ‘just works’.

It must be about time for a 'the state of C++ tooling' rant...

I tend to develop code with JITT (Just in time testing), this is like TDD when I’m doing it but it doesn’t always get done. What does get done, generally, is the “first test” for each class. This ensures that subsequent testing is possible as the code doesn’t have hidden dependencies and it gives me a test harness that’s ready to go when I find that I need it. More complex code end up being TDD, easier bits end up as JITT where the tests are only written when I’ve wasted time banging my head on the desk trying to debug problems the “old fashioned way”.

Hosting .Net Core in C++

One of the things that came out of my conversations with clients last night was an interest in hosting .Net Core from native code. Of course we already host the CLR and provide an easy way to write servers that do the heavy lifting in native code and call out to managed code for the business logic. We have several clients using this to host managed “plugins” inside a native host and it works very well.

SChannel ALPN support, documentation 'bug'...

I’m looking at adding support for the TLS Application-Layer Protocol Negotiation Extension to The Server Framework as a precursor to looking into HTTP 2.0 support. This TLS extension is supported by both SChannel and OpenSSL. It’s relatively new (only having been included in SChannel since June 2014 (!)) but there seems to be no documentation on MSDN for the structures and how to use them to add the appropriate entries to the TLS handshake and then to select and validate the protocol of your choice… Searching today with Google for something like “SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT” just gives just the usual selection of hits to people who think it’s clever to run the Windows header files through their document generators and then publish the results on the web…

The real solution to 'error MSB4175: The task factory 'CodeTaskFactory' could not be loaded from the assembly'

I now have a real solution to the problem that I outlined on Saturday night and this solution, unlike the one developed during my “Macallan driven development” session on Saturday evening actually works. The problem is that when using code to run build using VS2010 by running a project into devenv.com I get the following error message: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(214,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Windows\Microsoft.