Geek Speak

SetServiceStatus framework bug

One of my clients has been reporting an intermittent issue with the deployment of new releases of their game server. This runs as a Windows service on many, many, cloud machines and, just sometimes, the service seems to have issues during start up after upgrading the code on a machine that it has otherwise been running fine on. I’ve been adding debug code to our service start up code to try and work out what’s going on and today we had our first hit.

Migrating to Hugo

I have just completed migrating the blog from Movable Type to Hugo. Hopefully everything still works and is in the right place, but do let me know if you find any issues. The comments have been migrated to Disqus. I’ve been wanting to update my websites for quite a while now. I spent quite a lot of effort trying to find someone to do it for me but all of the web companies seemed to lose interest when they realised that I didn’t want an ongoing “SEO” package (I’ve always viewed SEO as “snake oil”).

Allowing renaming but not deleting for files on Windows

I’ve had a client ask if it’s possible to rename his server log file whilst the server is running but not allow deletion. This is harder than you’d expect to achieve. The established view of “the internet” is that NTFS doesn’t support permissions to allow file renaming and still prevent file deletion. This is true. If you want to allow renaming you need to create or open the file with FILE_SHARE_DELETE access and this allows rename AND delete.

Breakpoints that are conditional on other breakpoints...

Back in 2009 I mused on the idea of ‘breakpoint sequences’, where a breakpoint was only hit if a series of previous breakpoints have been hit. This functionality now exists in Visual Studio 2022, and it’s wonderful. It’s useful enough for me to immediately switch from VS2017 to VS2022 as my “day to day” IDE for Windows. Normally I take forever to make the move as I have tools that manage projects and solutions across all the compilers that I support, I just develop in the one that works best for me.

Be careful what you ask for...

As I mentioned in May last year, I’d was having trouble with a client’s system where a UDP DDOS was causing Windows Server machines to use all available non-paged pool and then blue screen. The issue could be reproduced with, what I thought at the time was, a minimal test program that simply created a UDP socket, bound it to a port and then didn’t do anything with it. If something sent a stream of datagrams to that port then non-paged pool usage would grow in an uncontrolled manner until the box became unusable and eventually died.

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.