View Issue Details

IDProjectCategoryView StatusLast Update
0003095unrealircdpublic2006-11-03 13:23
ReporterdimasAssigned Tosyzop 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformi586OSlinuxOS VersionSLES 9 Sp 3
Product Version3.2.5 
Target VersionFixed in Version3.2.6 
Summary0003095: Daemon crashes with no errors in the log file
DescriptionIRCD have been installed on the intranet server (net 10.9.0.0/255.255.254.0)
server IP is local intranet address, and it`s address accesible from the internet by cisco router address forvard (NAT with 1 intranet <-> 1 internet address)

when daemon start, all work from the internet, client connected and good work

but, if client have local address from the server subnet, in the begin of the connecting process daemon crashes, on the client screen we have:

[00:56] * Connecting to 10.9.0.3 (6667)
-
[00:56] -dixy-lx.intra.net- *** Looking up your hostname...
-
[00:56] * [10053] Software caused connection abort
-
[00:56] * Disconnected
-
[00:56] * Connect retry #1 10.9.0.3 (6667)
-
[00:56] * Unable to connect (Connection refused)


address of the DNS server in the unrealircd.conf correct and DNS work right

this problem i have also with Unreal IRCD 3.2.4
TagsNo tags attached.
3rd party modules

Activities

syzop

2006-10-21 16:09

administrator   ~0012505

Do you have a core file? In your ircd directory type: ./unreal backtrace

dimas

2006-10-22 15:58

reporter   ~0012508

Last edited: 2006-10-26 17:35

=================== START HERE ======================
.. -- SNIP SEE NEWER BACKTRACE FOR INFO ON THAT SNIP -- ..
GCC: gcc version 3.3.3 (SuSE Linux)
UNAME: Linux dixy-lx 2.6.5-7.267-smp #1 SMP Wed Jun 21 10:50:51 UTC 2006 i686 i686 i386 GNU/Linux
UNREAL: Unreal3.2.5 build 1.1.1.1.2.23 2006/06/16 18:29:12
CORE: -rw------- 1 root root 1671168 2006-10-22 00:54 core
=================== STOP HERE ======================

syzop

2006-10-22 16:01

administrator   ~0012509

ok, I'll get back to you in a few days again (or tomorrow).

syzop

2006-10-23 17:16

administrator   ~0012513

Could you recompile the IRCd like this:
1) Run 'make clean'
2) Run './Config' (but not 'make')
3) Edit the 'Makefile' and edit the line with XCFLAGS= on it.
   Remove the "-O2" part (just those 3 letters) and add "-fno-inline" in that place and save the file
4) Run 'make' (and 'make install' if needed)

If it fails, something went wrong ;)

Then... try to have someone connect again and wait till it crashes.

Then, run gdb manually on the core file...
First, you might want to check which core file is newest:
ls -al *core*
Then, run gdb with this:
gdb src/ircd core.something
(could be just 'core', or 'core.somenumber', or.. anything)
Then, run:
'bt'
And when it asks to press enter for more info, press enter... you can do this up to like 5 times.

Then paste these results back to me.

Thanks :)

If it's too much of a problem, then I could also do it myself from the shell I guess, but maybe you can try first ;).

dimas

2006-10-26 15:59

reporter   ~0012515

The crash happens pretty soon:

[00:44] * Connecting to 10.9.0.3 (6667)
[00:44] -dixy-lx.intra.net- *** Looking up your hostname...
[00:44] * [10053] Software caused connection abort
[00:44] * Disconnected
[00:44] * Connect retry #1 10.9.0.3 (6667)
[00:44] * Unable to connect (Connection refused)

-----------------------------------

dixy-lx:/unreal # ls -al *core*
-rw------- 1 root root 1675264 2006-10-27 00:42 core
dixy-lx:/unreal # gdb src/ircd core
GNU gdb 6.3
Copyright 2004 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 "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

Core was generated by `/unreal/src/ircd'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

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 /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /unreal/tmp/B26E8215.commands.so...done.
Loaded symbols for tmp/B26E8215.commands.so
Reading symbols from /unreal/tmp/4C790C3C.cloak.so...done.
Loaded symbols for tmp/4C790C3C.cloak.so
#0 0x08063153 in ircvsprintf (
    str=0xbfffe8d0 "\020
    format=0x401fedea ") made by %s (Reason: %s) set %li seconds ago", vl=0xbffff0f4 "%\vI") at ircsprintf.c:289
289 if ((*str = *p1))
(gdb) bt
#0 0x08063153 in ircvsprintf (
    str=0xbfffe8d0 "\020
    format=0x401fedea ") made by %s (Reason: %s) set %li seconds ago", vl=0xbffff0f4 "%\vI") at ircsprintf.c:289
#1 0x0808a874 in sendto_snomask (snomask=128,
    pattern=0x401fedd4 "*** Expiring %s (%s@%s) made by %s (Reason: %s) set %li seconds ago") at send.c:1466
#2 0x401c976d in _tkl_expire (tmp=0x8188330) at m_tkl.c:1101
#3 0x401c9a78 in _tkl_check_expire (data=0x0) at m_tkl.c:1141
#4 0x0805f02e in DoEvents () at events.c:175
#5 0x08062c5c in main (argc=0, argv=0xbffff4e4) at ircd.c:1506
(gdb)

syzop

2006-10-26 16:03

administrator   ~0012516

Thanks :)

Could you send the following files to syzop@unrealircd.com:
* The core file
* src/ircd
* src/modules/commands.so

TIA.

dimas

2006-10-26 16:31

reporter   ~0012517

Done

syzop

2006-10-26 17:33

administrator   ~0012518

** heap corruption **

What would help me is if you could run the ircd in valgrind (a memory corruption detection tool). There might be a ready available package by your distribution. Otherwise, see www.valgrind.org

If you can, please recompile the IRCd like this (not mandatory, but this might help me, so if you can.. please do..):
1) Run 'make clean'
2) Edit the 'Makefile' and edit the line with XCFLAGS= on it.
   Remove the "-O2" part (just those 3 letters) and save the file
3) Run 'make' (and 'make install' if needed)

Then, to run the IRCd in valgrind (naturally, be sure to kill the old ircd process, if any):
valgrind --log-file=valgrind.log --trace-children=yes src/ircd

Then, make it crash ;)

When the ircd crashed (or should have crashed), then you can email me the valgrind.log.somenumber file(s).

Thanks!

dimas

2006-10-27 08:30

reporter   ~0012519

dixy-lx:/unreal # valgrind --log-file=valgrind.log --trace-children=yes src/ircd
valgrind: Missing --tool option
Available tools:
        helgrind
        addrcheck
        cachegrind
        memcheck
        corecheck
        lackey
        none
        massif
valgrind: Use --help for more information.

syzop

2006-10-27 09:00

administrator   ~0012520

'valgrind --log-file=valgrind.log --trace-children=yes --tool=memcheck src/ircd'
would do the trick, but...

It seems like your valgrind is not so new then. Ah well, just try that command and we'll see what kind of results you get ;)

dimas

2006-10-27 14:19

reporter   ~0012521

logs has been sent

syzop

2006-10-27 14:36

administrator   ~0012522

Ok, I've read the logs and hmm...
I'm afraid it would indeed be better if you could get an updated valgrind.
Could you get the latest from www.valgrind.org ?

wget http://www.valgrind.org/downloads/valgrind-3.2.1.tar.bz2
tar xjvf valgrind-3.2.1.tar.bz2
cd valgrind-3.2.1
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var && make && make install

(or something like that ;p)

And then run valgrind again, this time by:
valgrind --log-file=valgrind.log --trace-children=yes --time-stamp=yes src/ircd

(if that gives 'missing --tool option' again then something is wrong)

And of course, then make the ircd crash, and send me the files again.

Thanks!

If that doesn't work out then I might ask for shell access, but I'm trying to avoid that ;)

dimas

2006-10-27 14:56

reporter   ~0012523

Last edited: 2006-10-27 15:00

i download valgrind from www.valgrind.org today, his version 3.2.1 and file name valgrind-3.2.1.tar.bz2.

syzop

2006-10-27 15:01

administrator   ~0012524

I see. Then there is an old valgrind installation on your system, which was used instead of the newer one you installed.

In your logs you sent to me you can see this:
==8820== Memcheck, a memory error detector for x86-linux.
==8820== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==8820== Using valgrind-2.2.0, a program supervision framework for x86-linux.

As you can see it is using 2.2.0.

So, I would suggest to remove the old valgrind (possible the old one is in /usr/bin and the new one in /usr/local/bin), and then retry running valgrind.
Be sure to check the version number with 'valgrind --version'.

Don't worry, this is a common mistake ;)

FYI, my valgrind shows (3.1.0) this when it starts up (no version number, but notice the copyright of 2002-2005 instead of 2002-2004):
==28848== Memcheck, a memory error detector.
==28848== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==28848== Using LibVEX rev 1471, a library for dynamic binary translation.
==28848== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==28848== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
==28848== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==28848== For more details, rerun with: -v

dimas

2006-10-27 15:29

reporter   ~0012525

new log has been send

syzop

2006-10-27 15:42

administrator   ~0012526

Thanks :)

The log shows the problem is indeed in the c-ares resolver we use.

Would it be possible for me to get shell access? I don't really see a way to trace the issue otherwise.
Feel free to make it a seperate account instead of root, if that makes you more comfortable.

If ok, let me know the info at syzop@unrealircd.com
If you're uncomfortable sending me the password, you can also use my SSH public key instead (if you know how to use it) from http://www.vulnscan.org/tmp/pubkey_4096b_oneline.txt

I'll also be on IRC (irc.unrealircd.org as 'Syzop'), so you can also PM me there ;)

dimas

2006-10-27 16:01

reporter   ~0012527

my answer in the e-mail

syzop

2006-11-03 13:23

administrator   ~0012552

Seems upgrading to latest CVS fixed this :).

Issue History

Date Modified Username Field Change
2006-10-21 16:03 dimas New Issue
2006-10-21 16:09 syzop Note Added: 0012505
2006-10-22 15:58 dimas Note Added: 0012508
2006-10-22 16:01 syzop Note Added: 0012509
2006-10-23 17:16 syzop Note Added: 0012513
2006-10-26 15:59 dimas Note Added: 0012515
2006-10-26 16:03 syzop Note Added: 0012516
2006-10-26 16:31 dimas Note Added: 0012517
2006-10-26 17:33 syzop Note Added: 0012518
2006-10-26 17:35 syzop Note Edited: 0012508
2006-10-27 08:30 dimas Note Added: 0012519
2006-10-27 09:00 syzop Note Added: 0012520
2006-10-27 14:19 dimas Note Added: 0012521
2006-10-27 14:36 syzop Note Added: 0012522
2006-10-27 14:56 dimas Note Added: 0012523
2006-10-27 15:00 dimas Note Edited: 0012523
2006-10-27 15:01 syzop Note Added: 0012524
2006-10-27 15:29 dimas Note Added: 0012525
2006-10-27 15:42 syzop Note Added: 0012526
2006-10-27 16:01 dimas Note Added: 0012527
2006-11-03 13:23 syzop Status new => resolved
2006-11-03 13:23 syzop Fixed in Version => 3.2.6
2006-11-03 13:23 syzop Resolution open => fixed
2006-11-03 13:23 syzop Assigned To => syzop
2006-11-03 13:23 syzop Note Added: 0012552