View Issue Details

IDProjectCategoryView StatusLast Update
0001558unrealircdpublic2004-02-19 22:55
Reporterhybridz Assigned Tocodemastr 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSRedhatOS Version8
Product Version3.2-RC1 
Summary0001558: IRCd crashing after making a few rehashes
DescriptionUnrealIRCd 3.2 RC1 crashes after making a few /rehashes. This has been tested on various systems, all built with SSL, Ziplinks, Remote Includes and no IPv6. Installation completes without a single error.
Steps To ReproduceSetup UnrealIRCd 3.2 RC1 with SSL, Ziplinks and Remote Includes using current versions of arescurl and curl. After starting the IRCd oper up as netadmin and hit /refresh a few times. The IRCd is crashing there...
Additional InformationCoredump available.
TagsNo tags attached.
3rd party modules

Activities

penna2

2004-02-18 06:43

reporter   ~0005053

1)wrong ending it's only a .gz not a .tar.gz
2)a core file is useless on linux/unix without the corresponding binary file
3)no need to post it anyway. read again what the main page tells you about reporting bugs

codemastr

2004-02-18 09:39

reporter   ~0005054

Last edited: 2004-02-18 09:41

You should never post the coredump to a public forum. A coredump contains sensitive information (such as all your oper passwords). Instead do as the main page instructs:

gdb src/ircd the.core.file
bt

Additionally a more detailed description would be helpful. In between those rehashes, did you change anything in the configuration file? Also, are you using the new spamfilter {} system?

edited on: 2004-02-18 09:41

hybridz

2004-02-18 11:11

reporter   ~0005055

Sorry, didn't know that, thanks for the hint. The GDB backtrace shows the following errors:

Error while reading shared library symbols:
tmp/EED0EB68.commands.so: No such file or directory.
Error while reading shared library symbols:
tmp/8A0203DC.m_antidccbug.so: No such file or directory.
Error while reading shared library symbols:
tmp/D200A87E.m_getinfo.so: No such file or directory.
#0 config_entry_free (ceptr=0x493e0) at s_conf.c:1213
1213 if (ceptr->ce_entries)

Unfortunately the command 'bt' is not available on the system. I did not change anything between the rehashes and I am not using the spamfilter system. Thanks.

syzop

2004-02-18 11:20

administrator   ~0005056

Last edited: 2004-02-18 11:21

'bt' is a gdb command, just type it when you are in gdb :).

Can you reproduce this error if you don't load any 3rd party modules (so only commands.so, not getinfo etc)?

Just to make things clear: I was unable to reproduce it on my system, and I actually tested the rehash flood 2 days before release (that doesn't mean there can't be no bug, just that it's not easy to reproduce for everyone).

edited on: 2004-02-18 11:21

hybridz

2004-02-18 11:45

reporter   ~0005057

The IRCd also crashes without the two thirdparty modules, here's the backtrace then:

This GDB was configured as "i386-redhat-linux"...
Core was generated by `/home/ircd/Unreal3.2/src/ircd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypto.so.2...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from tmp/30B1A01A.commands.so...done.
Loaded symbols for tmp/30B1A01A.commands.so
#0 0x42074d91 in calloc () from /lib/i686/libc.so.6
(gdb) bt
#0 0x42074d91 in calloc () from /lib/i686/libc.so.6
#1 0x42075bcc in free () from /lib/i686/libc.so.6
#2 0x080a4369 in Curl_close (data=0x4213920c) at url.c:239
#3 0x080a0439 in url_do_transfers_async () at url.c:333
#4 0x08075c21 in read_message (delay=0, listp=0x8182560) at s_bsd.c:1657
#5 0x0806c2d9 in main (argc=1077122319, argv=0x8182560) at ircd.c:1430
#6 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6


With thirdparty modules the entire backtrace looks like this:

This GDB was configured as "i386-redhat-linux"...
Core was generated by `/home/ircd/Unreal3.2/src/ircd'.
Program terminated with signal 11, Segmentation fault.
Error while mapping shared library sections:
tmp/251805AE.commands.so: No such file or directory.
Error while mapping shared library sections:
tmp/E7C84354.m_antidccbug.so: No such file or directory.
Error while mapping shared library sections:
tmp/A1858E40.m_getinfo.so: No such file or directory.
Error while mapping shared library sections:
tmp/AA6C9F74.commands.so: No such file or directory.
Error while mapping shared library sections:
tmp/FDBC54A2.m_antidccbug.so: No such file or directory.
Error while mapping shared library sections:
tmp/F6982167.m_getinfo.so: No such file or directory.
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypto.so.2...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Error while reading shared library symbols:
tmp/251805AE.commands.so: No such file or directory.
Error while reading shared library symbols:
tmp/E7C84354.m_antidccbug.so: No such file or directory.
Error while reading shared library symbols:
tmp/A1858E40.m_getinfo.so: No such file or directory.
Error while reading shared library symbols:
tmp/AA6C9F74.commands.so: No such file or directory.
Error while reading shared library symbols:
tmp/FDBC54A2.m_antidccbug.so: No such file or directory.
Error while reading shared library symbols:
tmp/F6982167.m_getinfo.so: No such file or directory.
#0 0x42075bba in free () from /lib/i686/libc.so.6
(gdb) bt
#0 0x42075bba in free () from /lib/i686/libc.so.6
#1 0x08079294 in config_rehash () at s_conf.c:1836
#2 0x080787d5 in init_conf (rootconf=0x80c8293 "unrealircd.conf", rehash=1) at s_conf.c:1423
#3 0x08083a69 in rehash_internal (cptr=0x81c1078, sptr=0x81c1078, sig=0) at s_conf.c:7202
#4 0x080a0413 in url_do_transfers_async () at url.c:321
#5 0x08075c21 in read_message (delay=0, listp=0x8182560) at s_bsd.c:1657
#6 0x0806c2d9 in main (argc=1077122264, argv=0x8182560) at ircd.c:1430
#7 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6

syzop

2004-02-18 12:14

administrator   ~0005058

I see... that helps (especially the ones without 3rd party modules is more clear).
It seems there's a problem related to curl (remote includes), could you give some more information on how you use remote includes in your config file?
http? https? ftp? password protected (user:pass) or not? how many remote includes? etc :).

Thanks.

hybridz

2004-02-18 12:33

reporter   ~0005059

I use 7 password protected http links (http://user:pass@url/file.conf) for remote includes. Files are: aliases.conf, allow.conf, badwords.*.conf, network.conf and opers.conf. I am using very current versions of arescurl and curl. Thanks for your help, I appreciate it. Hope we get this thingy fixed... :)

syzop

2004-02-18 13:50

administrator   ~0005060

Cannot reproduce it here... Using 5 remote includes files: aliases, the 3 badwords files and a network file... all http:// with user:pass... tried 30 rehashes.

This is my /version output (shortend a bit):
Unreal3.2-RC1+(debug). [..], OpenSSL 0.9.6c 21 dec 2001, zlib 1.2.1, libcurl/7.10.8 zlib/1.2.1

Could you check if you perhaps have a different (newer) curl/ares version?

If you are bored then you could also check this CVS Version: http://www.vulnscan.org/UnrealIrcd/cvs/Unr3.2-20040217.tar.gz
but I don't think any bug related to this has been fixed :(.

codemastr

2004-02-18 17:00

reporter   ~0005071

Saying "very current versions" is virtually useless to us. We need version numbers. When one person says "very current" they mean latest stable, another means latest beta, another latest daily CVS snapshot, and another still the CVS as of this moment. We need more specifics.

Also, do the URLs contain any "strange" characters? Meaning like "http://&*$#:*$#[email protected]/file.conf" Meaning any non-alphanumeric characters or anything like that?

codemastr

2004-02-18 17:06

reporter   ~0005076

Oh one other thing, is there any chance you could play around with the remote include files? Like I mean you say you have 7 included, well if you only have 6, does it still crash? What about 5? Etc. Doing that we can determine if perhaps it is one specific file that causes the problem.

hybridz

2004-02-19 05:07

reporter   ~0005084

Last edited: 2004-02-19 05:08

My shortened version reply looks like this:
Unreal3.2-RC1., OpenSSL 0.9.6b 9 Jul 2001, zlib/1.1.4, libcurl/7.11.0

I only use alphanumeric characters in the protected http link, the versions of arescurl and curl are: arescurl-1.0-pre1, curl-7.11.0. Ah, I downloaded all remote included files and set one after another to use the remote included file instead of the local file. The result was that it crashed with every file except for badwords.quit.conf. With that file I could rehash maybe a thousand times. Other files caused a crash after max. 5 rehashes.

edited on: 2004-02-19 05:08

codemastr

2004-02-19 11:50

reporter   ~0005086

Ok, so you're saying even with just 1 remote include it crashes? Would you mind trying the following for me?

Try changing the user:password to something else, does it still crash?

If so (and the file contains no sensitive information), would you possibly be able to send me an email with the URL with the changed user:password so that I can try and test on my machine? It would be a lot easier to debug if I could reproduce it myself. If not, we can continue the way we've been going. I do have a hunch about what it might be and I'll write up a little patch later today to try and experiment with my theory.

hybridz

2004-02-19 13:16

reporter   ~0005089

Uh well sorry, I can't just change the user data as some other servers also use these remote includes and it seems to work on there. :( All servers use the same config and the same versions of curl though (about 5 machines (from SuSE over Redhat to SunOS) crash, approximately the same number of Gentoo machines are working). I've setup a second, testing IRCd on a "crash"-machine so I can test anything you want.

codemastr

2004-02-19 18:23

reporter   ~0005095

Could you try applying the following patch:

http://www.codemastr.com/urlfix.patch

Rerun make, then start the IRCd and see if it still crashes?

hybridz

2004-02-19 18:34

reporter   ~0005096

Excellent, it works now with all remote included files enabled! Thanks.

codemastr

2004-02-19 18:57

reporter   ~0005097

Great, I'll add that patch in a bit, and thanks for the debugging help :)

Honestly though it's strange that this problem doesn't occur for everyone...

codemastr

2004-02-19 22:55

reporter   ~0005098

Fixed in .2121

Issue History

Date Modified Username Field Change
2004-02-18 06:35 hybridz New Issue
2004-02-18 06:35 hybridz File Added: core.21960.tar.gz
2004-02-18 06:43 penna2 Note Added: 0005053
2004-02-18 09:37 codemastr File Deleted: core.21960.tar.gz
2004-02-18 09:39 codemastr Note Added: 0005054
2004-02-18 09:41 codemastr Note Edited: 0005054
2004-02-18 11:11 hybridz Note Added: 0005055
2004-02-18 11:20 syzop Note Added: 0005056
2004-02-18 11:21 syzop Note Edited: 0005056
2004-02-18 11:45 hybridz Note Added: 0005057
2004-02-18 12:14 syzop Note Added: 0005058
2004-02-18 12:33 hybridz Note Added: 0005059
2004-02-18 13:50 syzop Note Added: 0005060
2004-02-18 17:00 codemastr Note Added: 0005071
2004-02-18 17:06 codemastr Note Added: 0005076
2004-02-19 05:07 hybridz Note Added: 0005084
2004-02-19 05:08 hybridz Note Edited: 0005084
2004-02-19 11:50 codemastr Note Added: 0005086
2004-02-19 13:16 hybridz Note Added: 0005089
2004-02-19 18:23 codemastr Note Added: 0005095
2004-02-19 18:34 hybridz Note Added: 0005096
2004-02-19 18:57 codemastr Note Added: 0005097
2004-02-19 22:55 codemastr Status new => resolved
2004-02-19 22:55 codemastr Resolution open => fixed
2004-02-19 22:55 codemastr Assigned To => codemastr
2004-02-19 22:55 codemastr Note Added: 0005098