View Issue Details

IDProjectCategoryView StatusLast Update
0000819unrealircdpublic2003-11-20 19:46
ReporterAI Assigned Tocodemastr 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version3.2-beta15 
Summary0000819: Beta15 crashes with Throtteling enabled on OpenBSD and FreeBSD
DescriptionAfter a while of running Beta15 updated to latest CVS last Monday crashes, this happens on both OpenBSD and FreeBSD, on FreeBSD I have not been able to get a core file however on the OpenBSD box the program left a core file after terminating, this is what I got from the core file:

$ gdb src/ircd ircd.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.2"...
Core was generated by `ircd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libpthread.so.1.0...done.
Reading symbols from /usr/lib/libc.so.29.0...done.
Reading symbols from /home/[censored]/Unreal3.2-B-15/src/modules/commands.so...done.
#0 0x400c04dc in bcmp ()
(gdb) bt
#0 0x400c04dc in bcmp ()
#1 0x110b38 in ?? ()
#2 0x13c17 in throttle_can_connect (in=0x110b38) at hash.c:803
#3 0x2091d in add_connection (cptr=0x10e000, fd=22) at s_bsd.c:1265
#4 0x214da in read_message (delay=1, listp=0xda430) at s_bsd.c:1840
#5 0x161c4 in main (argc=1, argv=0xcfbfd748) at ircd.c:1336
(gdb)

On another box running FreeBSD 4.7-RELEASE It also crashed and got this from the core file there:

[user@server4 user]$ cd Unreal3.2-B-15/
[user@server4 Unreal3.2-B-15]$ gdb src/ircd ircd.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf

Core was generated by `ircd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libc_r.so.4...done.
Reading symbols from /home/irc1/Unreal3.2-B-15/src/modules/commands.so...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 0x281473c4 in bcmp () from /usr/lib/libc_r.so.4
(gdb) bt
#0 0x281473c4 in bcmp () from /usr/lib/libc_r.so.4
#1 0x81bff38 in ?? ()
#2 0x80606e3 in throttle_can_connect (in=0x81bff38) at hash.c:803
#3 0x806a479 in add_connection (cptr=0x81b9c00, fd=43) at s_bsd.c:1265
#4 0x806aea6 in read_message (delay=1, listp=0x811d120) at s_bsd.c:1840
#5 0x80621b4 in main (argc=1, argv=0xbfbffbb0) at ircd.c:1336
Steps To ReproduceEnable throttling, Enabled some throttle exception for bots and services, and enabled thottle on config.h , start program and after a while it will terminate.
3rd party modules

Activities

AI

2003-03-17 12:43

reporter   ~0001954

Here's the results of another core file, when thotteling was still enabled, this one however doesnt look related to throttleing though:

$ gdb src/ircd ircd.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.2"...
Core was generated by `ircd'.
Program terminated with signal 11, Segmentation fault.
#0 0x400c04dc in ?? ()
(gdb) bt
#0 0x400c04dc in ?? ()
#1 0x13c17 in Find_Help (command=0x10eb38 "Íû©£") at help.c:45
#2 0x2091d in read_packet (cptr=0x10e000, rfd=0x13) at s_bsd.c:1408
#3 0x214da in connect_server (aconf=0x6, by=0xfb5b4, hp=0xcfbfd7dc) at s_bsd.c:2355
#4 0x1626f in check_fdlists (now=1) at ircd.c:755
(gdb)

codemastr

2003-03-17 15:24

reporter   ~0001957

Both of these are b15?

codemastr

2003-03-17 15:33

reporter   ~0001958

In the first core you pasted, in gdb can you do the following:

select 2
p *in

AI

2003-03-17 15:34

reporter   ~0001959

Yeah Beta15, updated them all with CVS at certain point last week too.

AI

2003-03-17 15:41

reporter   ~0001960

too bad, :( unfortunately I deleted the .core file by mistake,I ll try to reproduce this again and then I ll post here. sometimes it doesnt create a core file too when it crashes so its weird.

codemastr

2003-03-17 20:18

reporter   ~0001963

Do you have IPv6 enabled? And if so, do you have IPv6 clients connecting to your server?

AI

2003-03-17 20:40

reporter   ~0001964

No, IPv6 is not enabled, as far as I know there's no IPv6 clients connecting either.

codemastr

2003-04-07 22:02

reporter   ~0002168

A bunch of throttling bugs were fixed in the current cvs version, can you try updating and see if it still occurs?

AI

2003-04-10 14:32

reporter   ~0002209

I tried but for some reason it is not accepting my throtteling settings my config.h shows this:

/*
 * THROTTLING
 * This will only allow 1 connection per ip in set::throttle::period time
 */
/* #define THROTTLING */

and the unrealircd.conf shows as:

    throttle "10";
    anti-flood "60";
    cloak-keys {

However Unreal refuses to start with those settings, is the Config.h and urealircd.conf settings wrong? what am I missing? previous CVS versions would work just like that.

syzop

2003-04-10 14:42

administrator   ~0002212

Use:
#define THROTTLING
instead of
/* #define THROTTLING */

in config.h, and recompile.

AI

2003-04-10 14:47

reporter   ~0002213

Also will this really give me the latest CVS version and clean recompile?

cvs update -P -d -r devel; ./Config -q; make clean all

That's what I have been doing but I want to be sure Im doing the right thing.

syzop

2003-04-10 15:00

administrator   ~0002214

Probably right, if you look at the first few lines of the Changes file (head Changes), you'll see:
 * $Id: Changes,v 1.1.1.1.2.1.2.1.2.1711 2003/04/08 23:49:00 codemastr Exp $
The .1711 is the build number, .1711 is the latest _at this moment_ :P.
It's the same number you see if you do /info @ irc.
Blablabla :).

AI

2003-04-10 15:06

reporter   ~0002215

Ok the Im fine I guess mine shows:

 $Id: Changes,v 1.1.1.1.2.1.2.1.2.1711 2003/04/08 23:49:00 codemastr Exp $

Also is it safe to one one server with throtteling enabled while another server without it?

syzop

2003-04-10 15:10

administrator   ~0002216

Yes.
Btw, I don't recommend using throttling at your main 900 user server.
Looks like there are still some bugs :/. OUCH! Don't hit me sts/code :[... I can't help it ;P.

AI

2003-04-10 15:17

reporter   ~0002218

Hmm I see this, now it started with no problems however it looks like once the IRCd bans you for throtteling the ban continues regarless of the time specified on the unrealircd.conf file I have set it to:

throttle "10";

However my client keeps receiving the same message, no matter how long I have waited for it to allow me back in.

Closing Link: [208.67.187.198] (Throttling: Reconnecting too fast) -Email [email protected] for more information.)
-
* Disconnected
-
* Connect retry #2 208.67.187.198 (6667)
-
Closing Link: [208.67.187.198] (Throttling: Reconnecting too fast) -Email [email protected] for more information.)
-
* Disconnected
-
* Connect retry #3 208.67.187.198 (6667)
-
Closing Link: [208.67.187.198] (Throttling: Reconnecting too fast) -Email [email protected] for more information.)
-
* Disconnected
-
* Cancelled connect

Looks like the ban is not being removed after the specified time on unrealircd.conf

syzop

2003-04-10 15:24

administrator   ~0002219

Fun!! :P

AI

2003-04-10 15:29

reporter   ~0002220

lol, little by little it will get there.

syzop

2003-04-10 19:30

administrator   ~0002226

I've heard of that not-removing-throttle-marked-client problems before ;P.
Seems to work fine here however (Linux, debian, latest cvs).
The throttle period can vary a few secs, so 25s instead of 15s (maximum I got here), but it still removes it right / pretty on-time ;).
I tried it with 200 clones at 50 different ips, blabla ;)
[unreleated]
It's
throttle { period 10; };
otherwise it will default to 15.
[/unrelated]

codemastr

2003-04-10 21:06

reporter   ~0002227

Syzop: I agree the throttling system is flawed (have a nice cybercafe connect and watch the bans) but Stskeeps says thats how he designed it to work, which to me is stupid... I'll probably recode the whole thing when he isn't looking ;)

syzop

2003-04-11 15:05

administrator   ~0002259

Hehe ;P.

codemastr

2003-04-13 18:13

reporter   ~0002301

All of this should be fixed now, including a feature to allow you to specify the # of connections that must occur before someone is throttled.

Issue History

Date Modified Username Field Change
2003-04-10 14:32 AI Note Added: 0002209
2003-04-10 14:42 syzop Note Added: 0002212
2003-04-10 14:47 AI Note Added: 0002213
2003-04-10 15:00 syzop Note Added: 0002214
2003-04-10 15:06 AI Note Added: 0002215
2003-04-10 15:10 syzop Note Added: 0002216
2003-04-10 15:17 AI Note Added: 0002218
2003-04-10 15:24 syzop Note Added: 0002219
2003-04-10 15:29 AI Note Added: 0002220
2003-04-10 19:30 syzop Note Added: 0002226
2003-04-10 21:06 codemastr Note Added: 0002227
2003-04-11 15:05 syzop Note Added: 0002259
2003-04-13 18:13 codemastr Status new => resolved
2003-04-13 18:13 codemastr Resolution open => fixed
2003-04-13 18:13 codemastr Assigned To => codemastr
2003-04-13 18:13 codemastr Note Added: 0002301
2003-11-20 19:46 syzop Status resolved => closed