/unreal: line 134: 26071 Segmentation fault (core dumped)

If your having any problems with Unreal IRCD 3.2.x, post them here, and someone in the community will help you out.

Moderators: Admins, Supporters

/unreal: line 134: 26071 Segmentation fault (core dumped)

Postby nullsystems on Tue Jan 13, 2009 3:30 pm

Hello, trying to get Unreal3.2.7 to work on Suse 10.3

After setting up a config ( which works on another box, not suse ) and compiling everything I get the following:

---------------------------------------------------------------
* Loading IRCd configuration ..
./unreal: line 134: 23244 Segmentation fault (core dumped) /srv/www/vhosts/x/Unreal3.2.7/src/ircd
Possible error encountered (IRCd seemingly not started)
=====================================================
Check above for possible errors, and this output of
ircd.log. If you cannot solve the problem, read
Unreal.nfo on where to get support
----------------------------------------------------------------

Backtrace Shows this :
=================== START HERE ======================
BACKTRACE:
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Core was generated by `/srv/www/vhosts/xxx/Unreal3.2.7/src/ircd'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000435b62 in unreal_encodespace (s=0x0) at s_misc.c:1076
1076 for (i = s, o = buf; (*i) && (o < buf+509); i++)
#0 0x0000000000435b62 in unreal_encodespace (s=0x0) at s_misc.c:1076
#1 0x0000000000429503 in init_conf (rootconf=0x45b86c "unrealircd.conf", rehash=0) at s_conf.c:1563
#2 0x000000000041c252 in main (argc=0, argv=<value optimized out>) at ircd.c:1293

#0 0x0000000000435b62 in unreal_encodespace (s=0x0) at s_misc.c:1076
1076 for (i = s, o = buf; (*i) && (o < buf+509); i++)

0x727220 <backupbuf>: ""

#0 0x0000000000435b62 in unreal_encodespace (s=0x0) at s_misc.c:1076
buf = "Spamming_users_with_an_mIRC_trojan._Type_'/unload_-rs_newb'_to_remove_the_trojan.\000.asp?VName=TROJ%5F SOEX.A", '\0' <repeats 405 times>
i = 0x0
o = 0x70dba0 "Spamming_users_with_an_mIRC_trojan._Type_'/unload_-rs_newb'_to_remove_the_trojan."
#1 0x0000000000429503 in init_conf (rootconf=0x45b86c "unrealircd.conf", rehash=0) at s_conf.c:1563
No locals.
#2 0x000000000041c252 in main (argc=0, argv=<value optimized out>) at ircd.c:1293
type = <value optimized out>
result = <value optimized out>
p = 0x7fff76d18ed8 "\003@"
uid = 0
euid = 0
gid = 0
egid = 0
delay = <value optimized out>
corelim = {rlim_cur = 18446744073709551615, rlim_max = 18446744073709551615}
nextfdlistcheck = <value optimized out>
alllasttime = 0
GCC: gcc version 4.2.1 (SUSE Linux)
UNAME: Linux xxx 2.6.27.9rootserver-20081216a #1 SMP Tue Dec 16 02:29:13 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
UNREAL: Unreal3.2.7 build 1.1.1.1.2.1.2.1.2.2234.2.676 2007/07/13 10:43:04
CORE: -rw------- 1 root root 2371584 Jan 13 15:20 core
=================== STOP HERE ======================

I reinstalled GDB, as at first the backtrace showed an error in one of the /unreal lines, which was a GDB command. This then produced the above error.
Server is a Quad Core, 64bit with 4gb of ram.

Anyone able to help?
PS: tried in user an root mode.
nullsystems
 
Posts: 4
Joined: Tue Jan 13, 2009 3:21 pm

Re: /unreal: line 134: 26071 Segmentation fault (core dumped)

Postby nullsystems on Tue Jan 13, 2009 3:59 pm

After researching the line:
warning: Can't read pathname for load map: Input/output error.
This line is also reproduced in GDB
I found the following URLS associated, it appears to be GDB and 64bit system specific:

http://www.omniorb-support.com/pipermai ... 11304.html
http://www.cygwin.com/ml/gdb-patches/20 ... 00041.html
http://www.ffnn.nl/pages/articles/linux ... -intro.php

Doing some research, if anyone can help please update. Will get back in touch shortly
nullsystems
 
Posts: 4
Joined: Tue Jan 13, 2009 3:21 pm

Re: /unreal: line 134: 26071 Segmentation fault (core dumped)

Postby nullsystems on Tue Jan 13, 2009 4:12 pm

Used GDB to view the core dump :
------------------------------------------
gdb src/ircd core

GNU gdb 6.6.50.20070726-cvs
This GDB was configured as "x86_64-suse-linux"...
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libnsl.so.1...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /srv/www/vhosts/x/Unreal3.2.7/tmp/4913886B.commands.so...done.
Loaded symbols for tmp/4913886B.commands.so
Reading symbols from /srv/www/vhosts/x/Unreal3.2.7/tmp/D4B3A34B.cloak.so...done.
Loaded symbols for tmp/D4B3A34B.cloak.so
Core was generated by `/srv/www/vhosts/x/Unreal3.2.7/src/ircd'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000435b62 in unreal_encodespace (s=0x0) at s_misc.c:1076
1076 for (i = s, o = buf; (*i) && (o < buf+509); i++)


In s_misc.c:1076 the code is:

Code: Select all
char *unreal_encodespace(char *s)
{
static char buf[512], *i, *o;
#line 1076       for (i = s, o = buf; (*i) && (o < buf+509); i++)
        {
                if (*i == ' ')
                        *o++ = '_';
                else if (*i == '_')
                {
                        *o++ = '_';
                        *o++ = '_';
                }
                else
                        *o++ = *i;
        }
        *o = '\0';
        return buf;
}


Obviously this is distro/system specific and ive seen this go unresolved on the forums and bug tracker, so I would like to help resolve it once and for all.

#0 0x0000000000435b62 in unreal_encodespace (s=0x0) at s_misc.c:1076
buf = "Spamming_users_with_an_mIRC_trojan._Type_'/unload_-rs_newb'_to_remove_the_trojan.\000.asp?VName=TROJ%5F SOEX.A", '\0' <repeats 405 times>
i = 0x0
o = 0x70dba0 "Spamming_users_with_an_mIRC_trojan._Type_'/unload_-rs_newb'_to_remove_the_trojan."

This surely shows the lines which are affected, so its to do with s_misc.c and those lines, but I dont know how to resolve this im afraid.
nullsystems
 
Posts: 4
Joined: Tue Jan 13, 2009 3:21 pm

Re: /unreal: line 134: 26071 Segmentation fault (core dumped)

Postby nullsystems on Tue Jan 13, 2009 5:44 pm

I tried to remove all instances of unreal_encodespace() from src/s_conf.c but this is a hack fix and doesnt really help. Also the ircd did boot, but I couldnt connect.

I took at look at src/s_misc.c and the block mentioned
Some of the debugs above mention problems with s=0x0, which is NULL ( empty ).
So, I looked at 3.2.8 rc1..tried the code in 3.2.7 and it didnt work either!
Same segfault.

I tried my own versoin:

Code: Select all
char *unreal_encodespace(char *s)
{
if (s != NULL) {
static char buf[512], *i, *o;
        for (i = s, o = buf; (*i) && (o < buf+509); i++)
        {
                if (*i == ' ')
                        *o++ = '_';
                else if (*i == '_')
                {
                        *o++ = '_';
                        *o++ = '_';
                }
                else
                        *o++ = *i;
        }
        *o = '\0';
        return buf;
}
}


This boots but I cant connect on this server.
Need some further help on this, anyone ?
nullsystems
 
Posts: 4
Joined: Tue Jan 13, 2009 3:21 pm


Return to Unreal 3.2 Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

cron