Bugs: latest snapshot eggdrop 1.8 with tcl8.6

Wouter Snels nospam at ofloo.net
Sat Apr 6 04:42:15 CST 2013


Threads under tcl8.6 the same code works fine under 8.5

./configure --with-handlen=32 --enable-ipv6 --enable-tls
--with-tcllib=/usr/local/lib/libtcl86.so
--with-tclinc=/usr/local/include/tcl8.6/tcl.h

compiled with above flags under freebsd9.0 with default tcl8.6 from
ports tree and default tcllib under portstree with Thread 2.7.0 & tcl-8.6.0

problem occours with following script code. And can be recreated using
just !tpool1 or !tpool2

namespace eval tpool_test {

  package require Thread

  tsv::set THREAD MASTER [thread::id]

  if {![info exists pool]} {
    variable pool [tpool::create -minworkers 1 -maxworkers 10 -idletime
120 -initcmd {

      package require Thread

      proc putserv {text {arg {}}}  {
        thread::send -async [tsv::get THREAD MASTER] [concat putserv
[list ${text}] ${arg}]
      }

      proc putlog {text}  {
        thread::send -async [tsv::get THREAD MASTER] [concat putlog
[list ${text}]]
      }

      proc tpool1_proc {nick host hand chan arg}  {
        after 10000
        putserv "PRIVMSG $chan :REPLY_TPOOL1:[clock seconds]"
      }

      proc tpool2_proc {nick host hand chan arg}  {
        putserv "PRIVMSG $chan :REPLY_TPOOL2:[clock seconds]"
      }

    }]
  }

  proc tpool1_proc_pub {nick host hand chan arg}  {
    variable pool
    tpool::post -detached $pool [list tpool1_proc $nick $host $hand
$chan $arg]
    putserv "PRIVMSG $chan :TPOOL1_DELAY:[clock seconds]"
  }

  proc tpool2_proc_pub {nick host hand chan arg}  {
    variable pool
    tpool::post -detached $pool [list tpool2_proc $nick $host $hand
$chan $arg]
    putserv "PRIVMSG $chan :TPOOL2_NODELAY:[clock seconds]"
  }

  bind pub -|- !tpool1 [namespace current]::tpool1_proc_pub
  bind pub -|- !tpool2 [namespace current]::tpool2_proc_pub
 
  putlog "\002loaded tpool test script\002"

}



Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 801c07c00 (LWP 249654/eggdrop-1.8.0)]
0x00000008009bea23 in Tcl_AlertNotifier () from /usr/local/lib/libtcl86.so.1
(gdb) bt
#0  0x00000008009bea23 in Tcl_AlertNotifier () from
/usr/local/lib/libtcl86.so.1
#1  0x000000080097d42b in Tcl_ThreadAlert () from
/usr/local/lib/libtcl86.so.1
#2  0x00000008032b22bd in ThreadSend () from
/usr/local/lib/thread2.7.0/libthread.so.1
#3  0x00000008032b4d30 in ThreadSendObjCmd ()
   from /usr/local/lib/thread2.7.0/libthread.so.1
#4  0x00000008008e068b in TclNREvalObjv () from /usr/local/lib/libtcl86.so.1
#5  0x000000080094884e in TEBCresume () from /usr/local/lib/libtcl86.so.1
#6  0x00000008008dbc47 in TclNRRunCallbacks () from
/usr/local/lib/libtcl86.so.1
#7  0x00000008008e13e4 in TclEvalEx () from /usr/local/lib/libtcl86.so.1
#8  0x00000008008e1916 in Tcl_EvalEx () from /usr/local/lib/libtcl86.so.1
#9  0x00000008032bba5d in TpoolEval () from
/usr/local/lib/thread2.7.0/libthread.so.1
#10 0x00000008032bbe77 in TpoolWorker () from
/usr/local/lib/thread2.7.0/libthread.so.1
#11 0x0000000801435274 in pthread_getprio () from /lib/libthr.so.3
#12 0x0000000000000000 in ?? ()
Error accessing memory address 0x7fffffbfe000: Bad address.


(gdb) bt full
#0  0x00000008009bea23 in Tcl_AlertNotifier () from
/usr/local/lib/libtcl86.so.1
No symbol table info available.
#1  0x000000080097d42b in Tcl_ThreadAlert () from
/usr/local/lib/libtcl86.so.1
No symbol table info available.
#2  0x00000008032b22bd in ThreadSend () from
/usr/local/lib/thread2.7.0/libthread.so.1
No symbol table info available.
#3  0x00000008032b4d30 in ThreadSendObjCmd ()
   from /usr/local/lib/thread2.7.0/libthread.so.1
No symbol table info available.
#4  0x00000008008e068b in TclNREvalObjv () from /usr/local/lib/libtcl86.so.1
No symbol table info available.
#5  0x000000080094884e in TEBCresume () from /usr/local/lib/libtcl86.so.1
No symbol table info available.
#6  0x00000008008dbc47 in TclNRRunCallbacks () from
/usr/local/lib/libtcl86.so.1
No symbol table info available.
#7  0x00000008008e13e4 in TclEvalEx () from /usr/local/lib/libtcl86.so.1
No symbol table info available.
#8  0x00000008008e1916 in Tcl_EvalEx () from /usr/local/lib/libtcl86.so.1
No symbol table info available.
#9  0x00000008032bba5d in TpoolEval () from
/usr/local/lib/thread2.7.0/libthread.so.1
No symbol table info available.
#10 0x00000008032bbe77 in TpoolWorker () from
/usr/local/lib/thread2.7.0/libthread.so.1
No symbol table info available.
#11 0x0000000801435274 in pthread_getprio () from /lib/libthr.so.3
No symbol table info available.
#12 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
Error accessing memory address 0x7fffffbfe000: Bad address.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.eggheads.org/pipermail/bugs/attachments/20130406/bba4df0c/attachment.bin>


More information about the Bugs mailing list