some notes

Releases and bugs in here...
Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

some notes

Post by Sedulus » 2003-02-03 22:43

I'm using the linux version.

it works.. great as far as I can see, but I haven't had more than 60 users on my system so far.

bugs
  • on the first serious run, it SEGFAULTed after ~1.5hrs. but then I didn't have core dumps enabled. so I have nothing to show for it.
    now it has run for 4:20hrs.. and it's still looking good.
  • the +stats shows "0:04:23:00 (CPU time used: 0:00:00:05)", 5 seconds CPU time. but actually it's one thread that used 5 secs.

    Code: Select all

    18580 pts/4    S      0:00      \_ ./dchpp eth0
    18581 pts/4    S      0:00          \_ ./dchpp eth0
    18582 pts/4    S      0:05              \_ ./dchpp eth0
    18583 pts/4    S      0:24              \_ ./dchpp eth0

features
  • Core
    • ip allow lists (the inverse of ip ban lists). ipban works with subnet ranges already, so implementing an ipallow should not be hard.
  • OpCom plugin
    • +ipinfo <ip> = lookup user(s) by IP
    • +cleartemp = clear the tempban list (important)
    • +reload = reload configuration from disk (compare refresh)
    • more precise specification of subnets. it's a pain to enter x.x.x.x/17 and there are often big cable (slow) blocks in fast subnets
  • DCPPChecker plugin
    • <CheckISP> does not allow dots in names... (which blocked most of my guinea pigs on the first testing round). it would be nice if it either allowed dots, or a regex could be specified.

I hope the segfault was caused by physically corrupted memory on my box (I've had strange problems before that would probably indicate some hardware failure). at least now I have enabled core dumps.

most feature suggestions could be implemented in Lua, but like you said.. lua is slow ;)
some of the above thingies aren't even that hard to implement. (I would try, if I had the source)
or do you have the C++ plugin API docs laying around somewhere?

/sed
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2003-02-03 22:51

oohh.. now I forgot the most annoying thing.

did you use SO_REUSEADDR on the listening socket?

it won't listen until the FIN_WAIT has passed... and that's not good if I need to wrap the hub in a loop or restart it quickly.
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2003-02-04 11:53

3 core dumps now,
all say:

Code: Select all

Program terminated with signal 11, Segmentation fault.

[snip]

#0  0x08066351 in SocketManager::Writer::run() (this=0x808d9a8) at ../../hub/ManagedSocket.h:85
85      ../../hub/ManagedSocket.h: No such file or directory.
        in ../../hub/ManagedSocket.h

do you want the dumps?
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 22:15

Post by arnetheduck » 2003-02-04 17:18

Nah, I think I can do without this time (i've had that one as well...it's only in the linux version afaik)...uhm, where do I enable core dumps btw?

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 22:15

Post by arnetheduck » 2003-02-04 17:20

Sedulus wrote:oohh.. now I forgot the most annoying thing.

did you use SO_REUSEADDR on the listening socket?

it won't listen until the FIN_WAIT has passed... and that's not good if I need to wrap the hub in a loop or restart it quickly.


Probably not. I didn't change any ioctl:s...

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 22:15

Re: some notes

Post by arnetheduck » 2003-02-04 17:21

Sedulus wrote:the +stats shows "0:04:23:00 (CPU time used: 0:00:00:05)", 5 seconds CPU time. but actually it's one thread that used 5 secs.


that's what clock() gives me, you know of a better call?

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2003-02-04 21:17

arnetheduck wrote:uhm, where do I enable core dumps btw?
ulimit -c <blocks> (where blocks are 1024 bytes) sets the maximum core size.
this is a bash command (dunno what it might be for csh or some other shell)
my cores did not exceed 5mb, so 8192 or 16384 should be enough.
(note that the ulimit is set for _the current shell_. no use changing it in another shell)


arnetheduck wrote:
Sedulus wrote:did you use SO_REUSEADDR on the listening socket?
Probably not. I didn't change any ioctl:s...
no ioctl (luckily).
use:

Code: Select all

int n = 1;
if( setsockopt( socket, SOL_SOCKET, SO_REUSEADDR, &n, sizeof( n ) ) < 0 )
    perror( "setsockopt" );


arnetheduck wrote:that's what clock() gives me, you know of a better call?
hmmz.. no. maybe there is one. alternately you could get a clock() from all threads and add the results, but this might involve ugly IPCing.
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2003-02-06 22:00

forget the SO_REUSEADDR... it doesn't work.
it's not the listening socket that's the problem... it's the dying connected sockets. dunno how to fix that though.
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 22:15

Post by arnetheduck » 2003-02-07 15:15

Actually, I added SO_REUSEADDR, and it does start faster if you're kind enough to turn it off yourself...haven't tried an evil crash exit yet though...

Who is online

Users browsing this forum: Google [Bot] and 0 guests