Bugs: Bug report: Unexpected crash, maybe caused by tcl timers?

Espen Wang contact at nepse.net
Fri Apr 7 20:10:16 CST 2006


Hi!

As before, I'll be more than glad to be of any assistance...

=====================================================================
              Eggheads Eggdrop 1.6 Bug Report Form
=====================================================================

1) INFORMATION ABOUT YOUR EGGDROP

1.1) Eggdrop version:
     1.6.17

1.2) Make type:
     ( ) dynamic
     (X) static
     ( ) debug
     ( ) sdebug

1.3) List of any options passed to ./configure:

1.4) List of patches and/or modules you use:

=====================================================================
2) INFORMATION ABOUT TCL

2.1) Tcl library version:
     ( ) 7.0
     ( ) 7.1
     ( ) 7.2
     ( ) 7.3
     ( ) 7.4
     ( ) 7.5
     ( ) 7.6
     ( ) 8.0
     ( ) 8.1
     ( ) 8.2
     ( ) 8.3
     (X) 8.4
     ( ) 8.5
     ( ) Other - Which? ____

2.2) Tcl library patchlevel: 11
  eg; p1, p2, etc for Tcl versions up to 8.0p2
      or the 3rd part of the version number for 8.0.3 and newer

2.3) Tcl scripts used:
     [ ] alltools
     [ ] sentinel
     [ ] getops
     [X] others - Please mention all others: speednet.tcl (mine)

=====================================================================
3) INFORMATION ABOUT THE OS

3.1) OS type:
     ( ) BeOS
     ( ) BSD/OS
     ( ) Cygwin
     ( ) Darwin/Mac OS X
     ( ) Dell SVR4
     (X) FreeBSD
     ( ) HP-UX
     ( ) IRIX
     ( ) Linux
     ( ) Lynx
     ( ) NetBSD
     ( ) NeXT
     ( ) OpenBSD
     ( ) OSF/Tru64
     ( ) QNX
     ( ) SINIX
     ( ) Solaris/SunOS
     ( ) Ultrix
     ( ) Other - Which? _____________

3.2) OS Version/Release: 6.0-STABLE

=====================================================================
4) BUG DETAILS

4.1) The logged last context (example: Last context: userent.c/973 []):

[00:59:48] sidhatt [00:00] --- Sat Apr  8 2006
[00:59:48] sidhatt [00:00] Backing up user file...
[00:59:48] sidhatt [00:00] Backing up channel file...
[03:00:49] sidhatt [02:00] * Last context: tclhash.c/688 []
[03:00:49] sidhatt [02:00] * Please REPORT this BUG!
[03:00:49] sidhatt [02:00] * Check doc/BUG-REPORT on how to do so.
[03:00:49] sidhatt [02:00] * Wrote DEBUG
[03:00:49] sidhatt [02:00] * SEGMENT VIOLATION -- CRASHING!

4.2) If the bot wrote to the file DEBUG, copy the text -contents- of
     that file here (NOTE: It should be about 20 lines of info, but it
     could be a few lines more):

Debug (eggdrop v1.6.17) written Sat Apr  8 02:00:48 2006
Full Patch List: 
STATICALLY LINKED
Tcl library: /usr/local/lib/tcl8.4
Tcl version: 8.4.11 (header version 8.3.5)
Compile flags: gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H
-DSTATIC 
Link flags: gcc -pipe
Strip flags: touch
Context: tclhash.c/688, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: *raw:irc:msg, param:  $_raw1 $_raw2
$_raw3]
         tclhash.c/688, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: *raw:PRIVMSG, param:  $_raw1 $_raw2
$_raw3]
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: net:msg:aidle, param:  $_msg1 $_msg2
$_msg3 $_msg4]
         tclhash.c/688, []
         tclhash.c/688, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: *raw:PONG, param:  $_raw1 $_raw2
$_raw3]
         tclhash.c/688, []
         tclhash.c/680, []
         tclhash.c/684, [Tcl proc: <null>, param:  $_raw1 $_raw2 $_raw3]
         tclhash.c/688 []

SOCK ADDR     PORT  NICK      HOST              TYPE
---- -------- ----- --------- ----------------- ----
3    00000000     0 (dns)                       dns   (ready)
4    XXXXXXXX 60000 (telnet)  *                 lstn  60000
8    XXXXXXXX 52349 aurboda   XX                bot   flags: pUCosgwLiA
6    XXXXXXXX  2132 kvase     XX                bot   flags: pUCosgwLiA
9    XXXXXXXX 41101 dizz      XX                chat  flags: cPtep/0
5    XXXXXXXX  6667 (server)  XX                serv  (lag: 0)
7    XXXXXXXX 41966 eitre     XX                bot   flags: pUCosgwLiA

Compiled without extensive memory debugging (sorry).
Open sockets: 3 (passed on), 4 (listen), 5, 6, 8, 7, 9, 10 (file), done.

4.3) Your comments and a description of the bug:

The bot is a hub for three other bots. At the time there was *no*
activity the last hour in any channels it was on. 

4.4) Can you cause the bug condition to repeat? If so, please outline
     step by step what causes the error:

Sorry, no idea :\

4.5) Do you have ideas on what is wrong that causes this error?
     Please list them:

I think it may have something to do with timers and the TCL "anti-idle"
script running on the bot.

>From the timestamps in the partyline, I assume it was a minutely timer
setting off at the point in time the bot crashed.

>From DEBUG I deduce that an function call to this anti-idle script was
invoked right before the crash.

The bot had been running for nearly 57 days. As this script sets a timer
for restarting itself every few minutes, the timer-ID might overflow? If
that is possible?

-- snip "anti-idle" script --

proc net:do:aidle {} {
  global botnick net

  if {![string match "*net:do:aidle*" [timers]]} {
    timer [expr 5 + [rand 9]] net:do:aidle
  }
  set bots [net:do:getircbots $net(basechan)]
  set num [llength $bots]
  if {$num == 0} {
    set bots $botnick
    set num 1
    set msg "anti-idle"
  } {
    set msg ""
  }
  puthelp "PRIVMSG [xindex $bots [rand $num]] :net $msg [net:do:randstr
[expr 2 + [rand 3]] 0]"
}

4.6) Do you have ideas on how to correct it?  Please list them:

Sorry...

4.7) Other comments?

I'm sorry I can't help you with any more data. This was an
out-of-the-blue crash for my part.

4.8) If the bot dumped a 'core' file when it crashed, it would be *very*
     useful if you could paste gdb's output during the following steps:
     First call gdb
         $ gdb eggdrop -c core
     and then enter 'bt' on gdb's command line:
         (gdb) bt
     Keep your core file for at least one week, so that the dev team
     can ask for further information if needed. However, don't send
     us the core file unless we ask for it.

     NOTE: If this is a bug you can reproduce, please compile with
           make debug and follow the above step. It can greatly help
           find and fix the bug.

Sorry, no core. :\


-- 
Best regards,
Espen Wang
[ Mail: contact(at)nepse(dot)net | Web: http://nepse.net/ ]




More information about the Bugs mailing list