egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bot went bezerk after a stoned server msg

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Tue Jul 19, 2005 9:00 am    Post subject: bot went bezerk after a stoned server msg Reply with quote

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:
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:
[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?
Back to top
View user's profile Send private message
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Tue Jul 19, 2005 9:20 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Tue Jul 19, 2005 12:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Tue Jul 19, 2005 5:06 pm    Post subject: Reply with quote

I already removed all the cores and started from scratch. It's all good now.
Back to top
View user's profile Send private message
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Sat Jul 30, 2005 11:40 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Sun Jul 31, 2005 4:04 pm    Post subject: Reply with quote

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

Code:
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:
(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?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Jul 31, 2005 4:13 pm    Post subject: Reply with quote

/lib/tls? what's your OS?

recompile Tcl without thread support
Back to top
View user's profile Send private message Visit poster's website
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Mon Aug 01, 2005 11:32 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Aug 01, 2005 1:50 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Wed Aug 03, 2005 3:53 pm    Post subject: Reply with quote

I know how to code things Wink

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.
Back to top
View user's profile Send private message
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Wed Aug 03, 2005 4:05 pm    Post subject: Reply with quote

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

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.
Back to top
View user's profile Send private message
Wcc
Master


Joined: 28 Oct 2001
Posts: 278
Location: USA

PostPosted: Sun Aug 14, 2005 11:23 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Galadhrim
Op


Joined: 11 Apr 2003
Posts: 123
Location: Netherlands, Enschede

PostPosted: Wed Aug 17, 2005 5:34 am    Post subject: Reply with quote

Thanks, it found some errors in TLS and TCL. Laughing So far none in my module. But will test it more, it might just be a small annoying bug.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber