Server Help

Misc User Apps - Linux Directory Server (port)

Doc Flabby - Mon Oct 01, 2007 4:41 pm
Post subject: Linux Directory Server (port)
UPDATED - V6

Ported from Catid's Linux Directory Server

Runs natively in Linux (no wine or external depenacies). Uses very little cpu compared to its windows counterpart. Compiles on windows using mingw.

I've included binary but to compile just extract and type "make"

Be careful with the formatting of the ini file, make sure there are no spaces between the = as i've used a "ini reading lib" Make sure the ini file exists or it won't work propery

Give it a try you linux users out there and tell me if it doesnt work. It was surprisingly easy to port (i have very limited knowlegde of c++), it shouldn't be that hard to port the biller (this has been done) and MERVBOT, if anyone fancies the challenge. If there are no problems found i will submit it to ssdownloads.

The file startssdir is an example of a script to run the directory server in the background.
Doc Flabby - Wed Oct 10, 2007 7:52 am
Post subject:
anyone tried it?
L.C. - Mon Feb 04, 2008 4:32 pm
Post subject:
FreeBSD 6.1
Quote:
ELF binary type "0" not known.
-bash: ./ddirserv: cannot execute binary file


All files CHMODed with +x.
L.C. - Thu Feb 07, 2008 6:09 pm
Post subject:
I was able to recompile this and get it running. The IP of the directory server is 69.42.220.194 -- does it work for anyone?

I compiled it using the 'make' command.

EDIT :: I can't connect to the directory server. In my terminal it does display that it "downloads a server list" and "writes to stats."
Doc Flabby - Fri Feb 08, 2008 10:02 am
Post subject:
make sure you open the ports in your firewall to allow connections. Its quite possible it doesn.t work as i only tested the code on linux...
L.C. - Sat Feb 09, 2008 2:43 pm
Post subject:
I gave up on FreeBSD. Works really well on Linux though, and is fully functional. icon_smile.gif

I'll probably run one of these as a personal directory server or something ... maybe contribute another directory server to the community. tongue.gif *shrugs*
Doc Flabby - Sun Feb 10, 2008 4:10 pm
Post subject:
Always nice to see your work going to good use!!!

My directory server has been running this linux version since october.
L.C. - Sun Jul 20, 2008 4:11 pm
Post subject:
Does this run on ports 4990 and 4991?
Doc Flabby - Sun Jul 20, 2008 6:56 pm
Post subject:
yes UDP ports 4990 4991
I'm using the exact same server for ssdir.playsubspace.com

EDIT:Fixed typo
L.C. - Sun Jul 20, 2008 9:58 pm
Post subject:
Hold on now..

You say 4900 and 4901, and I thought 4990 and 4991. Was that a typo on your part?
Doc Flabby - Mon Jul 21, 2008 5:37 am
Post subject:
L.C. wrote:
Hold on now..

You say 4900 and 4901, and I thought 4990 and 4991. Was that a typo on your part?

ya lol woops
Kingsize - Thu Aug 07, 2008 1:35 pm
Post subject:
Works fine with Fedora icon_biggrin.gif
Kingsize - Mon Aug 18, 2008 12:51 am
Post subject:
Hmm, for some reason my directory server started crashing yesterday.

Code: Show/Hide

screen -p directory_server ./ddirserv

After that directory server starts downloading server list, and then it crashes.

Code: Show/Hide

[screen is terminating]

Any ideas? I have tried setting up directory server, and the same problem appears immediately. Till yesterday everything worked just fine. Using Fedora Core 4.
L.C. - Mon Aug 18, 2008 5:50 pm
Post subject:
Try opening a screen for, manually executing ddirserv, and then pressing CTRL (hold this button) and then press A, then press D (no need to hold A or D) to detach from the screen. Does it work?
screen -p ddirserv
./ddirserv
*CTRL A (hold), A, D*



Also try 'nohup ./ddirserv'.


If you are using Putty, try copying and pasting this in (aka copy the following and then just right click in Putty console):
cd ~/location/to/ddirserv/folder
chmod +x *
screen -t ddirserv -S ddirserv
./ddirserv &
screen -d
dir



Guaranteed to work...atleast for me. D:
Kingsize - Tue Aug 19, 2008 1:47 pm
Post subject:
Doesn't work...

How ever I start ddirserv, result is the same:
Quote:

CatID - Distributed Directory Server (Build 4)

Linux Port by Doc Flabby (flabby.tv)

---Downloading server list
Adding : SSCX Alpha West SVS
Adding : SSCX Warzone CTF
Adding : CypherJF's Test Zone
Adding : Digital Core
Adding : SSCC Metal Gear CTF
Adding : SSCC RedStar
Adding : SSCC Desert Storm
Adding : PSS Pirates!
Adding : PSS Shipwar Revolution
Adding : SSCC The CompleX
Adding : SSCU 17th Parallel
Adding : SSCU Extreme Games
Adding : SSCC Star Wars Empire
Adding : SSCX Chaos/League Zone SVS
Adding : SSCX Star Warzone
Adding : SSCU Trench Wars
Adding : T3 The Gauntlet! (SSC)
Adding : SSCW Unreal Tournament
Adding : SSW DeadZone
Adding : SSW Evolution
Adding : SSCE Hyperspace
Adding : BlueT Mobile Suit: Gundam
Adding : BlueT Safety Zone
Adding : BlueT Extreme Wars
Adding : SSCU Super Ships
Adding : BlueT Jackpot SVS
Adding : SSCI Subspace Development
Adding : SSCU Death Star Battle
Adding : BlueT Hosting
Adding : SSCI Mystic Kingdom
Adding : RAVEnet Zones (SSC)
Adding : SSCI Devastation
Adding : SSCI Fusion
Adding : CZ Cheese Zone
Adding : SSCA Supernova
Adding : SSA Digital Core (AS3)
Adding : Dueler's Paradise
Adding : BlueT Counter-Strike 2D
Adding : SSCX PowerBall
Adding : SSCE Hockey/Football Zone
Adding : SSNE Assassination CTF
Adding : SSNE Shattered Galaxy
Adding : SC Call of Duty
Adding : SSNE Development
Adding : <Rr> The Swamp
---Download complete
*** glibc detected *** ./ddirserv: free(): invalid next size (normal): 0x0805b6 90 ***
======= Backtrace: =========
/lib/libc.so.6[0x4c2f2a96]
/lib/libc.so.6(cfree+0x90)[0x4c2f5fb0]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x4fb7d691]
./ddirserv[0x804df6e]
./ddirserv[0x804bea2]
./ddirserv[0x804d0f3]
./ddirserv[0x804d22e]
./ddirserv[0x8050399]
./ddirserv[0x804df6e]
./ddirserv[0x804be64]
./ddirserv[0x805073e]
./ddirserv[0x804df6e]
./ddirserv[0x804bea2]
./ddirserv[0x804d0f3]
./ddirserv[0x804d3be]
./ddirserv[0x80505d9]
./ddirserv[0x804df6e]
./ddirserv[0x804be64]
./ddirserv[0x805073e]
./ddirserv[0x804df6e]
./ddirserv[0x804bea2]
./ddirserv[0x804d0f3]
./ddirserv[0x804d2f6]
./ddirserv[0x804dc04]
./ddirserv[0x804a694]
./ddirserv[0x804e63d]
/lib/libc.so.6(__libc_start_main+0xdc)[0x4c2a1dec]
.//ddirserv(__gxx_personality_v0+0x71)[0x8048b41]
======= Memory map: ========
08048000-08054000 r-xp 00000000 08:01 461931 /home/ssnecentral/directory_ser ver/ddirserv
08054000-08055000 rw-p 0000b000 08:01 461931 /home/ssnecentral/directory_ser ver/ddirserv
08055000-08076000 rw-p 08055000 00:00 0 [heap]
4c26f000-4c288000 r-xp 00000000 08:01 254468 /lib/ld-2.5.so
4c288000-4c289000 r--p 00019000 08:01 254468 /lib/ld-2.5.so
4c289000-4c28a000 rw-p 0001a000 08:01 254468 /lib/ld-2.5.so
4c28c000-4c3c6000 r-xp 00000000 08:01 254719 /lib/libc-2.5.so
4c3c6000-4c3c8000 r--p 0013a000 08:01 254719 /lib/libc-2.5.so
4c3c8000-4c3c9000 rw-p 0013c000 08:01 254719 /lib/libc-2.5.so
4c3c9000-4c3cc000 rw-p 4c3c9000 00:00 0
4c3d4000-4c3f9000 r-xp 00000000 08:01 257351 /lib/libm-2.5.so
4c3f9000-4c3fa000 r--p 00024000 08:01 257351 /lib/libm-2.5.so
4c3fa000-4c3fb000 rw-p 00025000 08:01 257351 /lib/libm-2.5.so
4c6e2000-4c6f1000 r-xp 00000000 08:01 257369 /lib/libresolv-2.5.so
4c6f1000-4c6f2000 r--p 0000e000 08:01 257369 /lib/libresolv-2.5.so
4c6f2000-4c6f3000 rw-p 0000f000 08:01 257369 /lib/libresolv-2.5.so
4c6f3000-4c6f5000 rw-p 4c6f3000 00:00 0
4ceb4000-4cebf000 r-xp 00000000 08:01 257353 /lib/libgcc_s-4.1.2-20070626.so .1
4cebf000-4cec0000 rw-p 0000a000 08:01 257353 /lib/libgcc_s-4.1.2-20070626.so .1
4faca000-4fbaa000 r-xp 00000000 08:01 175494 /usr/lib/libstdc++.so.6.0.8
4fbaa000-4fbae000 r--p 000df000 08:01 175494 /usr/lib/libstdc++.so.6.0.8
4fbae000-4fbaf000 rw-p 000e3000 08:01 175494 /usr/lib/libstdc++.so.6.0.8
4fbaf000-4fbb5000 rw-p 4fbaf000 00:00 0
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f70000-b7f74000 r-xp 00000000 08:01 254497 /lib/libnss_dns-2.5.so
b7f74000-b7f75000 r--p 00003000 08:01 254497 /lib/libnss_dns-2.5.so
b7f75000-b7f76000 rw-p 00004000 08:01 254Aborted

Lib problems and/or is it with the ddirserv? Because of this:
Quote:

/ddirserv: free(): invalid next size (normal)

Any ideas how to fix this?

Noticed that 'error log' after I tried to start simply: ./ddirserv & Normally I have used screen: screen -p dirserver ./ddirserv

I am using Fedora Core 6, and I had the same problem earlier with Core 4. After installation (of FC6) ddirserv worked just fine, but I think after many of yum updates it has started failing...
Doc Flabby - Tue Aug 19, 2008 4:14 pm
Post subject:
I would recommend recompiling
Code: Show/Hide

make
make clean
and seeing if that fixes things. Its probably linked to an old version of libc which is the problem...
Kingsize - Wed Aug 20, 2008 12:19 am
Post subject:
make
Quote:

g++ -c -Wall -O2 getprivateprofile.cpp -o getprivateprofile.o
getprivateprofile.cpp: In function ?long int GetPrivateProfileString(char*, char*, char*, char*, long int, char*)?:
getprivateprofile.cpp:52: warning: suggest parentheses around assignment used as truth value
g++ -c -Wall -O2 checksum.cpp -o checksum.o
g++ -c -Wall -O2 chunk.cpp -o chunk.o
g++ -c -Wall -O2 clientprot.cpp -o clientprot.o
g++ -c -Wall -O2 datatypes.cpp -o datatypes.o
g++ -c -Wall -O2 dserv.cpp -o dserv.o
dserv.cpp: In member function ?void directoryServer::doEvents()?:
dserv.cpp:524: warning: format ?%i? expects type ?int?, but argument 2 has type ?long unsigned int?
g++ -c -Wall -O2 encrypt.cpp -o encrypt.o
encrypt.cpp: In member function ?void SS_ENCR::initializeEncryption(Uint32)?:
encrypt.cpp:63: warning: comparison between signed and unsigned integer expressions
g++ -c -Wall -O2 fileio.cpp -o fileio.o
g++ -c -Wall -O2 host.cpp -o host.o
host.cpp: In member function ?void Host::addPing(Uint32)?:
host.cpp:264: warning: comparison between signed and unsigned integer expressions
g++ -c -Wall -O2 main.cpp -o main.o
md5.h:51: warning: ?void Transform(Uint32*, Uint32*)? declared ?static? but never defined
md5.h:54: warning: ?PADDING? defined but not used
g++ -c -Wall -O2 map.cpp -o map.o
g++ -c -Wall -O2 math.cpp -o math.o
g++ -c -Wall -O2 md5.cpp -o md5.o
md5.cpp:156: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:157: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:159: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:160: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:162: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:163: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:165: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:166: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:167: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:169: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:170: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:178: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:179: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:181: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:182: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:184: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:185: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:187: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:188: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:190: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:191: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:193: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:200: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:201: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:203: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:204: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:206: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:207: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:209: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:210: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:212: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:213: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:215: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:222: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:224: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:225: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:227: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:228: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:229: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:231: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:232: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:234: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:235: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:237: warning: this decimal constant is unsigned only in ISO C90
g++ -c -Wall -O2 prng.cpp -o prng.o
g++ -c -Wall -O2 serverprot.cpp -o serverprot.o
g++ -c -Wall -O2 settings.cpp -o settings.o
g++ -c -Wall -O2 specialprot.cpp -o specialprot.o
g++ -c -Wall -O2 socketslinux.cpp -o socketslinux.o
socketslinux.cpp: In member function ?int UDPSocket::create(Uint32)?:
socketslinux.cpp:155: warning: format ?%i? expects type ?int?, but argument 2 has type ?Uint32?
socketslinux.cpp: In function ?Uint32 resolveHostname(char*)?:
socketslinux.cpp:322: warning: comparison between signed and unsigned integer expressions
g++ getprivateprofile.o checksum.o chunk.o clientprot.o datatypes.o dserv.o encrypt.o fileio.o host.o main.o map.o math.o md5.o prng.o serverprot.o settings.o specialprot.o socketslinux.o -o ddirserv
[ssnecentral@kinkku directory_server]$ yum remove md5.cpp
Loading "installonlyn" plugin
You need to be root to perform this command.
[ssnecentral@kinkku directory_server]$ make clean
rm *.o
echo clean: clean done
clean: clean done
[ssnecentral@kinkku directory_server]$ make clean
rm *.o
rm: cannot remove `*.o': No such file or directory
make: *** [clean] Error 1
[ssnecentral@kinkku directory_server]$ make
g++ -c -Wall -O2 getprivateprofile.cpp -o getprivateprofile.o
getprivateprofile.cpp: In function ?long int GetPrivateProfileString(char*, char*, char*, char*, long int, char*)?:
getprivateprofile.cpp:52: warning: suggest parentheses around assignment used as truth value
g++ -c -Wall -O2 checksum.cpp -o checksum.o
g++ -c -Wall -O2 chunk.cpp -o chunk.o
g++ -c -Wall -O2 clientprot.cpp -o clientprot.o
g++ -c -Wall -O2 datatypes.cpp -o datatypes.o
g++ -c -Wall -O2 dserv.cpp -o dserv.o
dserv.cpp: In member function ?void directoryServer::doEvents()?:
dserv.cpp:524: warning: format ?%i? expects type ?int?, but argument 2 has type ?long unsigned int?
g++ -c -Wall -O2 encrypt.cpp -o encrypt.o
encrypt.cpp: In member function ?void SS_ENCR::initializeEncryption(Uint32)?:
encrypt.cpp:63: warning: comparison between signed and unsigned integer expressions
g++ -c -Wall -O2 fileio.cpp -o fileio.o
g++ -c -Wall -O2 host.cpp -o host.o
host.cpp: In member function ?void Host::addPing(Uint32)?:
host.cpp:264: warning: comparison between signed and unsigned integer expressions
g++ -c -Wall -O2 main.cpp -o main.o
md5.h:51: warning: ?void Transform(Uint32*, Uint32*)? declared ?static? but never defined
md5.h:54: warning: ?PADDING? defined but not used
g++ -c -Wall -O2 map.cpp -o map.o
g++ -c -Wall -O2 math.cpp -o math.o
g++ -c -Wall -O2 md5.cpp -o md5.o
md5.cpp:156: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:157: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:159: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:160: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:162: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:163: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:165: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:166: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:167: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:169: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:170: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:178: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:179: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:181: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:182: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:184: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:185: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:187: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:188: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:190: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:191: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:193: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:200: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:201: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:203: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:204: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:206: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:207: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:209: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:210: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:212: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:213: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:215: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:222: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:224: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:225: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:227: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:228: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:229: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:231: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:232: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:234: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:235: warning: this decimal constant is unsigned only in ISO C90
md5.cpp:237: warning: this decimal constant is unsigned only in ISO C90
g++ -c -Wall -O2 prng.cpp -o prng.o
g++ -c -Wall -O2 serverprot.cpp -o serverprot.o
g++ -c -Wall -O2 settings.cpp -o settings.o
g++ -c -Wall -O2 specialprot.cpp -o specialprot.o
g++ -c -Wall -O2 socketslinux.cpp -o socketslinux.o
socketslinux.cpp: In member function ?int UDPSocket::create(Uint32)?:
socketslinux.cpp:155: warning: format ?%i? expects type ?int?, but argument 2 has type ?Uint32?
socketslinux.cpp: In function ?Uint32 resolveHostname(char*)?:
socketslinux.cpp:322: warning: comparison between signed and unsigned integer expressions
g++ getprivateprofile.o checksum.o chunk.o clientprot.o datatypes.o dserv.o encrypt.o fileio.o host.o main.o map.o math.o md5.o prng.o serverprot.o settings.o specialprot.o socketslinux.o -o ddirserv

md5.cpp fails?

I have to try removing libc and cpp libs, and trying to get Fedoras original back (versions which are installed from the CD)...
Kingsize - Wed Aug 20, 2008 1:09 am
Post subject:
This is not a problem for SSNE Central. We can use WINE to run original directory server, but it would be nicer to use linux version.
Doc Flabby - Wed Aug 20, 2008 4:51 am
Post subject:
Kingsize wrote:

md5.cpp fails?

I have to try removing libc and cpp libs, and trying to get Fedoras original back (versions which are installed from the CD)...

Don't do that you risk screwing up your system.

The compilation was sucessful, it just throw up alot of warnings (which is normal as this is an ugly hack to a piece of windows software). the md5 class isn't really used so it wont have any real impact on the running of the server if it doesnt work right.

"make clean" deleted all the old stuff so should be run first.
"make" rebuilds the exe

have you tried running the recompiled exe?

./ddirserv ?
Doc Flabby - Thu Aug 21, 2008 11:54 am
Post subject:
Kingsize wrote:
This is not a problem for SSNE Central. We can use WINE to run original directory server, but it would be nicer to use linux version.

I've redone my port and cleaned up alot of horrible code.

Try version 6 and see it works (at top).
Kingsize - Fri Aug 22, 2008 6:26 am
Post subject:
This is very strange, but this new version of ddirserv work just fine once after installation. I killed ddirserv process, and tried to start it again, and it failed just like version 4 has done.

I'll test if this same happens on another server computer, which runs on FC6 too.

EDIT: Won't work on another comp eighter

Quote:

*** glibc detected *** ./ddirserv: free(): invalid next size (normal): 0x08ecc07 0 ***
======= Backtrace: =========
/lib/libc.so.6[0xaf7a96]
/lib/libc.so.6(cfree+0x90)[0xafafb0]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x263691]
./ddirserv[0x804e24e]
./ddirserv[0x804c152]
./ddirserv[0x804d3d3]
./ddirserv[0x804d50e]
./ddirserv[0x804ff79]
./ddirserv[0x804e24e]
./ddirserv[0x804c114]
./ddirserv[0x805031e]
./ddirserv[0x804e24e]
./ddirserv[0x804c152]
./ddirserv[0x804d3d3]
./ddirserv[0x804d69e]
./ddirserv[0x80501b9]
./ddirserv[0x804e24e]
./ddirserv[0x804c114]
./ddirserv[0x805031e]
./ddirserv[0x804e24e]
./ddirserv[0x804c152]
./ddirserv[0x804d3d3]
./ddirserv[0x804d5d6]
./ddirserv[0x804dee4]
./ddirserv[0x804a544]
./ddirserv[0x804e9ad]
/lib/libc.so.6(__libc_start_main+0xdc)[0xaa6dec]
./ddirserv(__gxx_personality_v0+0x9d)[0x80491e1]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0 [vdso]
00111000-0011a000 r-xp 00000000 fd:00 19071016 /lib/libnss_files-2.5.so
0011a000-0011b000 r-xp 00008000 fd:00 19071016 /lib/libnss_files-2.5.so
0011b000-0011c000 rwxp 00009000 fd:00 19071016 /lib/libnss_files-2.5.so
0011c000-00120000 r-xp 00000000 fd:00 19071014 /lib/libnss_dns-2.5.so
00120000-00121000 r-xp 00003000 fd:00 19071014 /lib/libnss_dns-2.5.so
00121000-00122000 rwxp 00004000 fd:00 19071014 /lib/libnss_dns-2.5.so
0017e000-00189000 r-xp 00000000 fd:00 19072673 /lib/libgcc_s-4.1.2-20070626.so .1
00189000-0018a000 rwxp 0000a000 fd:00 19072673 /lib/libgcc_s-4.1.2-20070626.so .1
001b0000-00290000 r-xp 00000000 fd:00 15206076 /usr/lib/libstdc++.so.6.0.8
00290000-00294000 r-xp 000df000 fd:00 15206076 /usr/lib/libstdc++.so.6.0.8
00294000-00295000 rwxp 000e3000 fd:00 15206076 /usr/lib/libstdc++.so.6.0.8
00295000-0029b000 rwxp 00295000 00:00 0
009ef000-009fe000 r-xp 00000000 fd:00 19072679 /lib/libresolv-2.5.so
009fe000-009ff000 r-xp 0000e000 fd:00 19072679 /lib/libresolv-2.5.so
009ff000-00a00000 rwxp 0000f000 fd:00 19072679 /lib/libresolv-2.5.so
00a00000-00a02000 rwxp 00a00000 00:00 0
00a74000-00a8d000 r-xp 00000000 fd:00 19071092 /lib/ld-2.5.so
00a8d000-00a8e000 r-xp 00019000 fd:00 19071092 /lib/ld-2.5.so
00a8e000-00a8f000 rwxp 0001a000 fd:00 19071092 /lib/ld-2.5.so
00a91000-00bcb000 r-xp 00000000 fd:00 19071098 /lib/libc-2.5.so
00bcb000-00bcd000 r-xp 0013a000 fd:00 19071098 /lib/libc-2.5.so
00bcd000-00bce000 rwxp 0013c000 fd:00 19071098 /lib/libc-2.5.so
00bce000-00bd1000 rwxp 00bce000 00:00 0
00bd3000-00bf8000 r-xp 00000000 fd:00 19072583 /lib/libm-2.5.so
00bf8000-00bf9000 r-xp 00024000 fd:00 19072583 /lib/libm-2.5.so
00bf9000-00bfa000 rwxp 00025000 fd:00 19072583 /lib/libm-2.5.so
08048000-08053000 r-xp 00000000 fd:00 12977636 /home/ssnecentral/directory_ser ver_linux/ddirserv
08053000-08054000 rw-p 0000a000 fd:00 12977636 /home/ssnecentral/directory_ser ver_linux/ddirserv
08ec8000-08ee9000 rw-p 08ec8000 00:00 0
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f73000-b7f75000 rw-p b7f73000 00:00 0
b7f8c000-b7f8d000 rw-p b7f8c000 00:00 0
bf854000-bf86a000 rw-p bf854000 00:00 0 [stack]



Recompiling doesn't help..

...
Quote:

[ssnecentral@b29 directory_server]$ make clean
rm *.o
echo clean: clean done
clean: clean done
[ssnecentral@b29 directory_server]$ make
g++ -c -Wall -O2 chunk.cpp -o chunk.o
g++ -c -Wall -O2 clientprot.cpp -o clientprot.o
g++ -c -Wall -O2 datatypes.cpp -o datatypes.o
g++ -c -Wall -O2 dserv.cpp -o dserv.o
g++ -c -Wall -O2 encrypt.cpp -o encrypt.o
g++ -c -Wall -O2 fileio.cpp -o fileio.o
g++ -c -Wall -O2 getprivateprofile.cpp -o getprivateprofile.o
getprivateprofile.cpp: In function ?long int GetPrivateProfileString(char*, char *, char*, char*, long int, char*)?:
getprivateprofile.cpp:52: warning: suggest parentheses around assignment used as truth value
g++ -c -Wall -O2 host.cpp -o host.o
host.cpp: In member function ?void Host::addPing(uint32_t)?:
host.cpp:261: warning: comparison between signed and unsigned integer expression s
g++ -c -Wall -O2 linux.cpp -o linux.o
linux.cpp: In function ?unsigned int Sleep(unsigned int)?:
linux.cpp:6: warning: control reaches end of non-void function
g++ -c -Wall -O2 main.cpp -o main.o
g++ -c -Wall -O2 math.cpp -o math.o
g++ -c -Wall -O2 prng.cpp -o prng.o
g++ -c -Wall -O2 serverprot.cpp -o serverprot.o
g++ -c -Wall -O2 settings.cpp -o settings.o
g++ -c -Wall -O2 sockets.cpp -o sockets.o
sockets.cpp: In function ?uint32_t resolveHostname(char*)?:
sockets.cpp:628: warning: comparison between signed and unsigned integer express ions
g++ -c -Wall -O2 specialprot.cpp -o specialprot.o
g++ chunk.o clientprot.o datatypes.o dserv.o encrypt.o fileio.o getprivateprofi le.o host.o linux.o main.o math.o prng.o serverprot.o settings.o sockets.o speci alprot.o -o ddirserv

Doc Flabby - Fri Aug 22, 2008 7:42 am
Post subject:
The good news is i've managed to reproduce the bug now.

The bad news is i'm not sure why its happening. however i do have a work around.

If you launch the program using the following code.
Code: Show/Hide
MALLOC_CHECK_=1 ./ddirserv


This allows the program to continue running after it does something bad. (it attempts to free a non existant pointer, this is why it crashes)

I think its a new security update to libc thats been made in recent updates that now catches these bugs. Normally it kills the program but by adding that change it just shows a warning. As far as i can tell this bug doesnt impact the running of the directory server. I would highly recommend you do not run ddirserv as root (the code is nasty buggy and there it doesnt need root anyway).
Kingsize - Fri Aug 22, 2008 7:55 am
Post subject:
Now it seems to work just fine! Thank you! icon_smile.gif
I need to make some kind of start script to run ddirserv on screen.
Kingsize - Fri Aug 22, 2008 8:06 am
Post subject:
Does version 6 write stats.txt?
Doc Flabby - Fri Aug 22, 2008 8:51 am
Post subject:
Kingsize wrote:
Does version 6 write stats.txt?

It needs a fix to this line in fileio.cpp

Replace the exising fileHandle.open with this line and recomplie.
Code: Show/Hide

fileHandle.open(fileName,  ios::out | ios::app);


I'm working on a fix for the other issue as i think its related to downloading too many zones.
Kingsize - Fri Aug 22, 2008 11:58 am
Post subject:
Okey, thanks. Btw, noticed that ddirserv still may crash sometimes.
"Segmentation fault" -> crash
Doc Flabby - Fri Aug 22, 2008 12:07 pm
Post subject:
Kingsize wrote:
Okey, thanks. Btw, noticed that ddirserv still may crash sometimes.
"Segmentation fault" -> crash


This looks to be caused by a bug in the main program. The unmodified original windows version is also crashing for me when it downloads the server list. I suspect a hard memory limit is being hit somewhere in the program (ss must have more zones than CatId ever invisaged would exist).

The only work around i can offer is to turn off downloading (by putting in fake ip in the ini) I suspect that wont help if a critial number of zones use your dir server though...

I will have to investigate further.
Kingsize - Fri Aug 22, 2008 12:15 pm
Post subject:
Okey, no worries. I'll make a perl script to check every x minutes is ddirserv runnign or not... ...or something like that.
Doc Flabby - Fri Aug 22, 2008 1:16 pm
Post subject:
Kingsize wrote:
Okey, no worries. I'll make a perl script to check every x minutes is ddirserv runnign or not... ...or something like that.


Well its broken on my server too so i will be trying to fix this.
The only consolation is its not my port thats broken, its the original code, in other words it replicates the behaviour of the original program exactly lol
Kingsize - Fri Aug 22, 2008 1:33 pm
Post subject:
Heh, maybe I can wait till you get it fixed then. icon_smile.gif
Kingsize - Tue Aug 26, 2008 3:36 pm
Post subject:
If someone was wondering how to run ddirserv on screen, when using MALLOC_CHECK_=1. Here is an example:

start.sh
Code: Show/Hide

#!/bin/bash

MALLOC_CHECK_=1
cd /path/to/dirserver_location/
screen -p ss_ddirserv ./ddirserv

to run:
./start.sh

Normally you should do it like this:
screen -p ss_dirserv ./ddirserv

...but with MALLOC_CHECK_=1 it's not possible to run like this:
MALLOC_CHECK_=1 screen -p ss_dirserv ./ddirserv
Kingsize - Tue Aug 26, 2008 11:59 pm
Post subject:
Btw, noticed I haven't got the segmentation fault error for while. ddirserv has been running almost four days now...

Update (9/11/2008): Everything is still working fine.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group