==[ UnrealIRCd & MPATROL ]== SECTION 0: WARNINGS mpatrol should run at Linux, FreeBSD, and all other *NIX's... There's currently (Feb 2004) an issue with Linux 2.6* however, but all other versions / operating systems should run fine. Mpatrol will detect a lot of heap memory errors like memory corruption, out of bounds reads, etc... on the downside however the ircd will run like 10x slower, this is especially noticable during booting and /rehashes, but once booted it should be able to deal with hundreds of clients on a decent machine. Also mpatrol (in our configuration) will use A LOT of memory... Possibly something like 256Mb... so you need a decent server again. To give an idea: a PIII 450MHz w/384Mb ram works fine for hundreds of clients and a few gig of traffic per dag (=insane). SECTION 1: Setting up mpatrol 1. Extract mpatrol-1.4.8-with-patch2.tar.gz (tar xzvf blabla.tar.gz) 2. cd mpatrol/build/unix 4. run "make all" If you have problems during compiling you are probably missing the BFD (development) and/or ELF (development) library and header files, find the appropiate package for your distribution/OS and try again. [DEBIAN: 'apt-get install libelfg0-dev binutils-dev', for other dists, probably 'libelf', 'libbfd', or something similar] 5. unfortunately mpatrol doesn't come with an install script so you will have to copy the stuff manually like this (you can copy/paste): cp libmp* /usr/lib cp mpatrol mprof mptrace /usr/bin cp ../../src/mpatrol.h /usr/include/ cp ../../bin/mpsym /usr/bin Your mpatrol should now be installed SECTION 2: using UnrealIRCd with mpatrol 1. Extract the unreal .tar.gz, go to the directory and run ./Config (do NOT run 'make' yet) 2. open Makefile, you'll have to add stuff to 2 lines... Find the line with IRCDLIBS= and add -lmpatrol -lelf -lbfd at the end Find the line with XCFLAGS= and add -include /usr/include/mpatrol.h at the end. Be careful that your editor does not wrap lines and that you add a space before between the new and old stuff.. An example of how it now would look is: IRCDLIBS=-lcrypt -lnsl -lz -L/home/root/curl/lib -lcurl -lz -ldl -lz -lares -ldl -L../extras/regexp/lib -ltre and: -I/home/syzop/Unreal3.2/extras/regexp/include -pipe -g -O2 -DZIP_LINKS -I/home/root/curl/include -DUSE_LIBCURL -export-dynamic -include /usr/include/mpatrol.h 3. now open src/s_bsd.c and go to line 617 or so... it looks like: for (fd = 3; fd < MAXCONNECTIONS; fd++) { (void)close(fd); } remove those 4 lines. 4. run 'make', hopefully everything compiles fine. SECTION 3: running unrealircd w/mpatrol 1. export MPATROL_OPTIONS="CHECKALL SHOWALL OFLOWSIZE=32 SAFESIGNALS PAGEALLOC=UPPER NOFREE=200 TRACE" 2. ./unreal start 3. Now an mpatrol logfile (mpatrol.log?) will be created... if this does not happen then something is wrong. SECTION 4: if the ircd crashes [If the ircd has crashed and a core file has been created etc...] The last 200 lines or so from mpatrol.log are very helpful, however... it's even better if the symbols/blah are also resolved, to do this use mpsym: mpsym src/ircd name.of.mpatrol.log >somefile and then 'somefile' will have "nicer output" (function calls, line nrs, etc), this is still not 100% perfect but a lot better :). Please mail the last 200 lines or so from 'somefile' along with a gdb backtrace ('gdb src/ircd core' and then 'bt').