Well, if you haven’t noticed that is probably a good thing, but my WP site was dead for a few weeks. I never really had a lot of time to try to figure out why until just now. It all started a few weeks ago when I was going to make a huge update to the blog when all of the sudden after hitting “Publish” every post I ever made went bye-bye. I got so pissed off I just left it that way.
So tonight I go to figure out why my posts went bye-bye and it turns out that a table in the WP database got corrupted. It was a simple matter of repairing the tables and everything was fine again. So here I am, posting away.
Ok, now down to business. I just wanted to at least post a quick update saying that through the help of some guys I work with at Blackened Interactive, my heap corruption is fixed. It was a very simple mistake that I made and I now have a better understanding of what happened so I won’t let it happen again in future coding.
Alright, I’ve been fighting with some heap corruption for the last month or so with the Angel re-write I’ve started. The heap corruption is occurring in the client library test program, meaning the source is probably in the client library itself.
Here’s the source for the test program:
void main()
{
AngelKV *kv = new AngelKV(L"data");
kv->AddKV(L"Name",L"Cale Dunlap");
kv->AddKV(L"Age",L"24");
kv->AddKV(L"Alias",L"Mazor");
AngelClient pClient = AngelClient("pantera","angeltest","angeltest");
AngelResponse *pResponse = pClient.RunCommand( L"AddUser", kv );
if( pResponse != NULL )
delete pResponse;
pClient.Disconnect();
}
The heap corruption is occurring in the default destructor of the AngelClient class. Here is the full source to the Angel Solution. The visual studio project/solution is for Visual Studio 2008. There’s a server and client written in C#, but right now I’m focusing on the client written in C++. I’m tempted to pay a reward to the person who finds it. If you happen to come across this post and find where my heap corruption is coming from, drop me a line at cale@caledunlap.com.
The error messages:
Things I’ve tried so far:
I’m at wits end with this, and I need some help. Thank you.
Well, I haven’t posted anything about this yet but I’ve been working a lot on a new version of XTrac, called KnowIT (btw, if someone has a better name, let me know). I’ve been putting the code out on Google Code and I will be releasing it all under the GPL v3 license. You can see the SVN repository here.
The old version uses a single table per “collection” (information about a specific area of the machine hardware). It was difficult to scale because you’d have to add a new table each time you wanted to track something new. This new version uses a single table for the collections so adding new ones is easy. The database schema is so simple, its almost complex. But at least this way it will scale better.
Instead of MSMQ, I’m using web services to transfer data from the agents to the server. That way there’s no dependency on having it installed. Actually, more specifically, I’m using WCF to perform my data transfers. I’d worked a little bit with WCF in the past and I liked how it could easily the transport technologies could be changed (MSMQ, Web Services, Named Pipes, TCP, etc.) with nothing more than a couple of lines in an XML file.
So anyway, I’m working on it all pretty heavily right now. I’m going to be deploying at work when I finish it, to see how it will perform in a 800+ node environment. Once I test it there, I’ll release it. So far I’ve gotten the Windows agent and server done. The next part is the agent-less scanning, which I’m about 90% done with. After that I need to figure out how I’m going to collect information on UNIX servers with .NET. I may have to look at using Java to do that.