Bugs: eggdrop crashes while posting to channel

Martin Hauke madxhawk at radio-blackpearl.de
Fri Mar 26 14:15:02 CST 2010


Hi,

my eggdrop sometimes crashes while posting a message to a channel.
On my website thers a formular for greeting an whishes for our radio.
Data from this formular will be stored in an mysql table and the eggdrop 
checks every 60 seconds for new data.
If there are new data in the database the eggdropp wil post them to the 
channel.

Mostly the bot crashes after the Name oder Nick:
Here it doesn't matters if there is an email given or not.( Field Email 
für Rückfragen)

Hope i got all nessesary information you need

Regards
Martin
(madxhawk at radio-blackpearl.de)

Channellog during crash
------------------------
[20:51:00] [!Kantorka] Mail von der Wunschbox
[20:51:00] [!Kantorka] ---------------------------------------
[20:51:01] [!Kantorka] IP: 89.0.185.211
[20:51:01] [!Kantorka] Name oder Nick: MADxHAWK
[20:51:01] ‹— [QUIT] [Kantorka] 
(Kantorka at Die.Juwelen.der.Musikgeschichte.de) hat iZ-smart.net 
verlassen! (Input/output error)

This should be postet to channel

---------------------------------
[20:51:24] —› [JOIN] [Kantorka] 
(Kantorka at Die.Juwelen.der.Musikgeschichte.de) hat #BlackPearl-Studio 
betreten! [10]
[20:51:59] [!Kantorka] Mail von der Wunschbox
[20:52:00] [!Kantorka] ---------------------------------------
[20:52:00] [!Kantorka] IP: 89.0.185.211
[20:52:01] [!Kantorka] Name oder Nick: MADxHAWK
[20:52:02] [!Kantorka] Email für Rückfragen:
[20:52:04] [!Kantorka] Wunsch:
[20:52:06] [!Kantorka] Gruss: kleiner test Teil II
[20:52:08] [!Kantorka] ---------------------------------------


Eggdrop Infos
--------------
[21:03:28] [Kantorka] [21:03] #MADxHAWK# status
[21:03:28] [Kantorka] I am Kantorka, running eggdrop v1.6.19+ctcpfix: 9 
users (mem: 134k).
[21:03:28] [Kantorka] Online for 00:12 (background) - CPU: 00:00 - Cache 
hit: 38.2%
[21:03:28] [Kantorka] Admin: madxhawk <email: madxhawk at radio-blackpearl.de>
[21:03:28] [Kantorka] Config file: ./kantorka.conf
[21:03:28] [Kantorka] OS: Linux 2.6.26-2-amd64
[21:03:28] [Kantorka] Tcl library: /usr/share/tcltk/tcl8.4
[21:03:28] [Kantorka] Tcl version: 8.4.19 (header version 8.4.19)
[21:03:28] [Kantorka] Tcl is threaded.
[21:03:28] [Kantorka] Loaded module information:
[21:03:28] [Kantorka] Channels: #Radio-BlackPearl, #BlackPearl-Studio
[21:03:28] [Kantorka] Online as: 
Kantorka!Kantorka at Die.Juwelen.der.Musikgeschichte.de (Radio-BlackPearl)
[21:03:28] [Kantorka] Server irc.iz-smart.net:6697 (connected for 00:12)
[21:03:28] [Kantorka] #Radio-BlackPearl : 34 members, enforcing "" (greet)
[21:03:28] [Kantorka] #BlackPearl-Studio : 10 members, enforcing "+s" 
(greet)

Eggdrop uses ssl patch, ssl connection established to server
Eggdrop uses mySQL
#### mysql ####
load /usr/lib/tcltk/mysqltcl-3.05/libmysqltcl3.05.so

Eggdrop Command Log:
-------------------------
[20:51] check for greetings
[20:51] * Last context: tclhash.c/695 []
[20:51] * Please REPORT this BUG!
[20:51] * Check doc/BUG-REPORT on how to do so.
[20:51] * Wrote DEBUG
[20:51] * SEGMENT VIOLATION -- CRASHING!

Content of DEBUG
--------------------
Debug (eggdrop v1.6.19+ctcpfix) written Fri Mar 26 20:51:00 2010
Full Patch List: ctcpfix
Tcl library: /usr/share/tcltk/tcl8.4
Tcl version: 8.4.19 (header version 8.4.19)
Tcl is threaded
Compile flags: gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H
Link flags: gcc -pipe
Strip flags: touch
Context: tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:irc:msg, param: $_raw1 $_raw2 $_raw3]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:PRIVMSG, param: $_raw1 $_raw2 $_raw3]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:irc:msg, param: $_raw1 $_raw2 $_raw3]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: *raw:PRIVMSG, param: $_raw1 $_raw2 $_raw3]
tclhash.c/695, []
tclhash.c/680, []
tclhash.c/684, [Tcl proc: sc::check, param: $_time1 $_time2 $_time3 
$_time4 $_time5]
tclhash.c/695 []

SOCK ADDR PORT NICK HOST TYPE
---- -------- ----- --------- ----------------- ----
7 D5EFC1DE 3340 (telnet) * lstn 3340
8 00000000 0 (dns) dns (ready)
11 551983A9 6697 (server) irc.iz-smart.net serv (lag: 0)

Compiled without extensive memory debugging (sorry).
Open sockets: 7 (listen), 8 (passed on), 11, 34 (file), done.


Script causes the Crash
------------------------
set dbhost "localhost"
set dbuser "xxxxxxxxxx"
set dbpass "xxxxxxxxxx"
set dbname "xxxxxxxxx"

set table_name "phpbb_greeting_box"

set column_1 "user_ip"
set column_2 "user_name"
set column_3 "user_email"
set column_4 "user_wish"
set column_5 "user_msg"

set adv_timer "1"
set chan "#BlackPearl-Studio"

set db_handle [mysqlconnect -host $dbhost -user $dbuser -password 
$dbpass -db $dbname]

proc adv:timer {} {
global adv_timer db_handle
if {[timerexists wunschbox] == ""} { timer $adv_timer wunschbox }
}
adv:timer

proc wunschbox { } {
global adv_timer chan table_name dbhost dbuser dbpass dbname
putlog "check for greetings"
set db_handle [mysqlconnect -host $dbhost -user $dbuser -password 
$dbpass -db $dbname]

set sql "SELECT * FROM $table_name"

if {[mysqlsel $db_handle $sql] > 0} {
set count 0
mysqlmap $db_handle {id user_ip user_name user_email user_wish user_msg} {
# putlog "id: $id, user_ip: $user_ip, user_name: $user_name, user_email: 
$user_email, user_wish: $user_wish, user_msg: $user_msg"

regsub -all -- {\\} $user_wish "" user_wish
regsub -all -- {\\} $user_msg "" user_msg

putquick "PRIVMSG $chan :Mail von der Wunschbox"
putquick "PRIVMSG $chan :---------------------------------------"
putquick "PRIVMSG $chan :IP: $user_ip"
putquick "PRIVMSG $chan :Name oder Nick: $user_name"
putquick "PRIVMSG $chan :Email für Rückfragen: $user_email"
putquick "PRIVMSG $chan :Wunsch: $user_wish"
putquick "PRIVMSG $chan :Gruss: $user_msg"
putquick "PRIVMSG $chan :---------------------------------------"

mysqlexec $db_handle "DELETE FROM $table_name WHERE id = '$id'"
incr count
}
}
::mysql::close $db_handle
adv:timer
}



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4736 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.eggheads.org/pipermail/bugs/attachments/20100326/295c76c6/attachment.bin>


More information about the Bugs mailing list