Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault #871

Open
Robby- opened this issue Sep 27, 2019 · 0 comments

Comments

@Robby-
Copy link
Contributor

commented Sep 27, 2019

Eggdrop version: 1.9 0fe7812
Make type: debug
List of any options passed to ./configure: CFLAGS='-O0 -ggdb' ./configure --with-handlen=9
List of patches and/or modules you use: blowfish dns channels server ctcp irc notes console
Tcl library version: 8.6.9
Tcl scripts used: a custom script that reacts to commands like !test, it gets its commands and responses from an SQL db
OS type: Linux
OS Version/Release: Debian 10.1 x86_64
The logged last context (example: Last context: userent.c/973 []): * Last context: tclhash.c/734 [Tcl proc: pubm_searchh, param: $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
DEBUG file output:

Debug (eggdrop v1.9.0+sasl) written Fri Sep 27 05:38:01 2019
Patch level: sasl
Tcl library: /usr/share/tcltk/tcl8.6
Tcl version: 8.6.9 (header version 8.6.9)
Tcl is threaded
Compiled with IPv6 support
Compiled with TLS support
Configure flags: '--with-handlen=9' 'CFLAGS=-O0 -ggdb'
Compile flags: gcc -O0 -ggdb -pipe -Wall -I.. -I..  -DHAVE_CONFIG_H -I/usr/include/tcl8.6 -g3 -DDEBUG -DDEBUG_ASSERT -DDEBUG_MEM -DDEBUG_DNS
Link flags: gcc
Strip flags: touch
Context: tclhash.c/734, [Tcl proc: pubm_searchh5, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/749, []
         tclhash.c/729, []
         tclhash.c/734, [Tcl proc: pubm_searchh4, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/749, []
         tclhash.c/729, []
         tclhash.c/734, [Tcl proc: pubm_searchh3, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/749, []
         tclhash.c/729, []
         tclhash.c/734, [Tcl proc: pubm_searchh2, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/749, []
         tclhash.c/729, []
         tclhash.c/734, [Tcl proc: pubm_searchh1, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/749, []
         tclhash.c/729, []
         tclhash.c/734 [Tcl proc: pubm_searchh, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]

IDX ADDR                                     + PORT NICK      TYPE  INFO
--- ---------------------------------------- ------ --------- ----- ---------
5   0.0.0.0                                   44039 (bots)    lstn  44039
6   0.0.0.0                                   33039 (users)   lstn  33039
7   0.0.0.0                                       0 (dns)     dns   (ready)
8   1.2.3.4                                  +57491 Hub       conn  bot
10  5.6.7.8                                   16667 (server)  serv  (lag: 0)

File 'language.c' accounted for 22589/22589 (ok)
File 'chanprog.c' accounted for 0/0 (ok)
File 'misc.c    ' accounted for 91327/91327 (ok)
File 'userrec.c ' accounted for 3124/3124 (ok)
File 'net.c     ' accounted for 0/0 (ok)
File 'dccutil.c ' accounted for 5840/5840 (ok)
File 'botnet.c  ' accounted for 0/0 (ok)
File 'tcl.c     ' accounted for 3296/3296 (ok)
File 'tclhash.c ' accounted for 34383/34383 (ok)
File 'tclmisc.c ' accounted for 48/48 (ok)
File 'modules.c ' accounted for 1310/1310 (ok)
File 'tcldcc.c  ' accounted for 32/32 (ok)
File 'dns.c     ' accounted for 0/0 (ok)
File 'tls.c     ' accounted for 280/280 (ok)
Module 'console   ' accounted for 0/0 (ok)
Module 'notes     ' accounted for 0/0 (ok)
Module 'irc       ' accounted for 0/0 (ok)
Module 'ctcp      ' accounted for 0/0 (ok)
Module 'server    ' accounted for 109/109 (ok)
Module 'channels  ' accounted for 28194/29042 (debug follows:)
   udefchan.c/113 :(0020) udefchan.c/114 :(0009) udefchan.c/113 :(0020)
   udefchan.c/114 :(000C) udefchan.c/113 :(0020) udefchan.c/114 :(0010)
   udefchan.c/113 :(0020) udefchan.c/114 :(000D) udefchan.c/113 :(0020)
   udefchan.c/114 :(000F) udefchan.c/113 :(0020) udefchan.c/114 :(000F)
   tclchan.c /2059:(07A0) tclchan.c /1943:(01A8) chan.c    /1553:(0026)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   udefchan.c/85  :(0018) udefchan.c/86  :(0012) udefchan.c/85  :(0018)
   udefchan.c/86  :(0012) udefchan.c/85  :(0018) udefchan.c/86  :(0012)
   udefchan.c/85  :(0018) udefchan.c/86  :(0012) udefchan.c/85  :(0018)
   udefchan.c/86  :(0012) udefchan.c/85  :(0018) udefchan.c/86  :(0012)
   tclchan.c /2059:(07A0) chan.c    /45  :(01A8) tclchan.c /1943:(01A8)
   irc.c     /303 :(0013) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   udefchan.c/85  :(0018) udefchan.c/86  :(000A) udefchan.c/85  :(0018)
   udefchan.c/86  :(000A) udefchan.c/85  :(0018) udefchan.c/86  :(000A)
   udefchan.c/85  :(0018) udefchan.c/86  :(000A) udefchan.c/85  :(0018)
   udefchan.c/86  :(000A) udefchan.c/85  :(0018) udefchan.c/86  :(000A)
   irc.c     /301 :(000C) tclchan.c /1961:(0020) irc.c     /298 :(0001)
   tclchan.c /1965:(0020) tclchan.c /1926:(0001) tclchan.c /1969:(0020)
   tclchan.c /1926:(0001) irc.c     /296 :(0020) irc.c     /261 :(000A)
   irc.c     /301 :(0013) irc.c     /303 :(0013) irc.c     /303 :(0013)
   irc.c     /296 :(0020) irc.c     /303 :(0013) irc.c     /296 :(0020)
   irc.c     /301 :(000F) irc.c     /303 :(0013) irc.c     /296 :(0020)
   irc.c     /301 :(000F) irc.c     /303 :(0013) irc.c     /296 :(0020)
   irc.c     /301 :(001D) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) irc.c     /301 :(000F) tclchan.c /1961:(0020)
   irc.c     /298 :(0001) tclchan.c /1965:(0020) tclchan.c /1926:(0001)
   tclchan.c /1969:(0020) tclchan.c /1926:(0001) irc.c     /296 :(0020)
   irc.c     /261 :(0009) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8) chan.c    /45  :(01A8) chan.c    /45  :(01A8)
   chan.c    /45  :(01A8)
Module 'dns       ' accounted for 0/0 (ok)
Module 'encryption' accounted for 0/0 (ok)
Module 'eggdrop   ' accounted for 0/0 (ok)
--- End of debug memory list.
Open sockets: 5 (listen), 6 (listen), 7 (passed on), 8 (connecting) (TLS), 10, 11 (file), done.

Your comments and a description of the bug: Segfault upon typing !test
Can you cause the bug condition to repeat? Yes
Do you have ideas on what is wrong that causes this error? No
Do you have ideas on how to correct it? No
Other comments? This same setup/script/etc works fine on Debian 8
gdb bt:

(gdb) bt
#0  0x00007f8d5eff69cc in ?? () from /lib/x86_64-linux-gnu/libmariadb.so.3
#1  0x00007f8d5f03c596 in ?? () from /usr/lib/tcltk/x86_64-linux-gnu/mysqltcl-3.052/libmysqltcl3.052.so
#2  0x00007f8d605b0fb7 in TclNRRunCallbacks () from /lib/x86_64-linux-gnu/libtcl8.6.so
#3  0x00007f8d605b23af in ?? () from /lib/x86_64-linux-gnu/libtcl8.6.so
#4  0x00007f8d605b1d13 in Tcl_EvalEx () from /lib/x86_64-linux-gnu/libtcl8.6.so
#5  0x00007f8d605b2f05 in Tcl_Eval () from /lib/x86_64-linux-gnu/libtcl8.6.so
#6  0x00007f8d605b3f08 in Tcl_VarEvalVA () from /lib/x86_64-linux-gnu/libtcl8.6.so
#7  0x00007f8d605b3fd9 in Tcl_VarEval () from /lib/x86_64-linux-gnu/libtcl8.6.so
#8  0x000055aef9eabfcd in trigger_bind (proc=0x55aefb19e140 "pubm_searchh", param=0x7f8d5f084ea0 " $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5",
    mask=0x55aefb19e0e0 "*") at tclhash.c:748
#9  0x000055aef9eac4ba in check_tcl_bind (tl=0x55aefb163d00, match=0x7fff990abe30 "#botschan !test", atr=0x7fff990ac230,
    param=0x7f8d5f084ea0 " $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5", match_type=562) at tclhash.c:891
#10 0x00007f8d5f07ffd3 in check_tcl_pubm (nick=0x7fff990ac490 "Robby", from=0x7fff990ac496 "~robby@redacted",
    chname=0x55aefb19f7c8 "#botschan", msg=0x55aefb193dfb "!test") at .././irc.mod/irc.c:886
#11 0x00007f8d5f064827 in gotmsg (from=0x55aefb194030 "Robby!~robby@redacted", msg=0x55aefb193dfb "!test") at .././irc.mod/chan.c:2393
#12 0x00007f8d5f09c8a5 in server_raw (cd=0x7f8d5f064142 <gotmsg>, irp=0x55aefb0a79c0, argc=4, argv=0x55aefb0abeb0) at .././server.mod/server.c:1275
#13 0x00007f8d605af1eb in TclInvokeStringCommand () from /lib/x86_64-linux-gnu/libtcl8.6.so
#14 0x00007f8d605b0fb7 in TclNRRunCallbacks () from /lib/x86_64-linux-gnu/libtcl8.6.so
#15 0x00007f8d605b23af in ?? () from /lib/x86_64-linux-gnu/libtcl8.6.so
#16 0x00007f8d605b1d13 in Tcl_EvalEx () from /lib/x86_64-linux-gnu/libtcl8.6.so
#17 0x00007f8d605b2f05 in Tcl_Eval () from /lib/x86_64-linux-gnu/libtcl8.6.so
#18 0x00007f8d605b3f08 in Tcl_VarEvalVA () from /lib/x86_64-linux-gnu/libtcl8.6.so
#19 0x00007f8d605b3fd9 in Tcl_VarEval () from /lib/x86_64-linux-gnu/libtcl8.6.so
#20 0x000055aef9eabfcd in trigger_bind (proc=0x55aefb163790 "*raw:irc:msg", param=0x7f8d5f0a120b " $_raw1 $_raw2 $_raw3", mask=0x55aefb153fa0 "PRIVMSG")
    at tclhash.c:748
#21 0x000055aef9eac4ba in check_tcl_bind (tl=0x55aefb153dd0, match=0x7fff990ace08 "PRIVMSG", atr=0x0, param=0x7f8d5f0a120b " $_raw1 $_raw2 $_raw3",
    match_type=161) at tclhash.c:891
#22 0x00007f8d5f08fe26 in check_tcl_raw (from=0x7fff990acde1 "Robby!~robby@redacted", code=0x7fff990ace08 "PRIVMSG",
    msg=0x7fff990ace10 "#botschan :!test") at .././server.mod/servmsg.c:190
#23 0x00007f8d5f0939c7 in server_activity (idx=4, msg=0x7fff990ace10 "#botschan :!test", len=64) at .././server.mod/servmsg.c:1086
#24 0x000055aef9e944ee in mainloop (toplevel=1) at ./main.c:867
#25 0x000055aef9e95767 in main (arg_c=2, arg_v=0x7fff990ad278) at ./main.c:1283
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.