This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

bot went bezerk after a stoned server msg

Old posts that have not been replied to for several years.
Locked
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

bot went bezerk after a stoned server msg

Post by Galadhrim »

I've had alot of sudden crashes and reboots with eggdrop in the past but this top it all.

I woke up and found that the bot has been rebooting from 4am till 11am every 5 mins. (which is my eggdrop boot script). I haven't changed a thing in my server setup in months except for the mysql server. Which I changed sunday and the errors came up today (tuesday). The everything worked like a charm then so I have no idea why it just started off like this.

The bot seems to have problems getting mysql results but I made the module myself and has been running for months without reboots.

The core file says:

Code: Select all

Loaded symbols for /home/ukr/irc/eggdrop1.6.17/modules/warmanager.so
Reading symbols from /usr/lib/libmysqlclient.so.12...done.
Loaded symbols for /usr/lib/libmysqlclient.so.12
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /home/ukr/irc/eggdrop1.6.17/blowfish.so...done.
Loaded symbols for /home/ukr/irc/eggdrop1.6.17/modules/blowfish.so
#0  0xffffe410 in __kernel_vsyscall ()
And the log entry I found before it started to reboot constantly is:

Code: Select all

[04:05] Server got stoned; going for munchies...
[04:05] Trying server freddyshouse.uk.quakenet.org:6668
[04:05] Connected to freddyshouse.uk.quakenet.org
I've tried to boot the bot without any scripts or module and that works fine. Then I tried to add my module and it just crashes in the first minute.

I downgraded the mysql server from 4.1 to 4.0 together with all related stuff and recompile the bot like 100 times and rebooted it but without any result. The core dumps always point to the blowfish .so so I can't see what is wrong.

Could the stoned message do andything that would influence the bot in later boots?
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

right i just got a clean set of files from eggheads and my module and its working now. just wondering how a bot just cant stay live out of nothing
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I'd guess your module somehow corrupts some global mem struct in nonobvious way, resulting in crash on a particular set of circumstances - a nasty bug, but it happens

proceed as usual, gdb the core, post a backtrace
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

I already removed all the cores and started from scratch. It's all good now.
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Same deal again! This time it crashed right after the "WaitForTCL..." command at "clone". I cleaned it, installed a new kernel (2.6.12.3) and tried again. It works now. I will try to remember to post a full bug report here if it happens again. I have a feeling it was a kernel bug tho...
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

and today a different error. I'm thinking this is my module but i havent changed it in months...

Code: Select all

Reading symbols from /usr/lib/libtcl8.4.so.0...done.
Loaded symbols for /usr/lib/libtcl8.4.so.0
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /home/ukr/irc/eggdrop-galadriel/blowfish.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/blowfish.so
Reading symbols from /home/ukr/irc/eggdrop-galadriel/dns.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/dns.so
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /home/ukr/irc/eggdrop-galadriel/channels.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/channels.so
Reading symbols from /home/ukr/irc/eggdrop-galadriel/server.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/server.so
Reading symbols from /home/ukr/irc/eggdrop-galadriel/ctcp.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/ctcp.so
Reading symbols from /home/ukr/irc/eggdrop-galadriel/irc.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/irc.so
Reading symbols from /home/ukr/irc/eggdrop-galadriel/console.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/console.so
Reading symbols from /home/ukr/irc/eggdrop-galadriel/warmanager.so...done.
Loaded symbols for /home/ukr/irc/eggdrop-galadriel/modules/warmanager.so
Reading symbols from /usr/lib/libmysqlclient.so.12...done.
Loaded symbols for /usr/lib/libmysqlclient.so.12
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
#0  0xffffe410 in __kernel_vsyscall ()
The backtrace:

Code: Select all

(gdb) backtrace
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dce751 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7f11ec9 in Tcl_WaitForEvent () from /usr/lib/libtcl8.4.so.0
#3  0xb7e4dca3 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7dd4f5a in clone () from /lib/tls/i686/cmov/libc.so.6
Anyone? I'm confused as to why it would say it crashed on a select function... It already joined 2 channels so where could it be crashing...
Could it have anything to do with an add_hook that is added at starttime for a channel that isnt joined before the bot crash?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

/lib/tls? what's your OS?

recompile Tcl without thread support
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Linux 2.6.12.3 // Debian 3.0 Testing.

I didn't compile anything. I just use the apt-get tool to install software that Debian packaged for me.

And the silly thing is. The eggdrop boots perfectly once in a while so i'm guessing that thanks to the add_hook the function that checks the topic of a channel crashes because the channel isnt joined yet when the bot crashes. Could make some sort of failsafe for that but it shouldnt make the bot crash just cause it cant return a channel struct should it?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

it is your responsibility to deal with NULL pointers passed to your code - you could complain only if the pointer passed to you is not NULL but points to invalid/corrupt data

give a Tcl lib w/o threads a try anyway - compile from source
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

I know how to code things ;)

Will try no threads and static debug. As normal debug only provides debug stuff for eggdrop core and not modules. That is as far as the previous debugging messages showed me...

Thanks for the hints.
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

well that was a short try. it wont join irc when i compile without threads. waited 10 mins. tried 3 times. :|

Can't make a static compile as I'm including mysql header and lib files.

We'll have to continue with blinds on then.

tnx anyway.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

I am guessing this is a problem with your module. If it is something you wrote and you want some insight on where the problem is in the module, try installing valgrind (google) and run the bot with ./valgrind ./eggdrop eggdrop.conf. valgrid will spit memory errors it finds out to the console (it can also log to a file).

Hope this helps,
Will
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

Thanks, it found some errors in TLS and TCL. :lol: So far none in my module. But will test it more, it might just be a small annoying bug.
Locked