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

Last context: tclhash.c/248 #518

Closed
ghost opened this issue May 17, 2018 · 2 comments · Fixed by #657
Closed

Last context: tclhash.c/248 #518

ghost opened this issue May 17, 2018 · 2 comments · Fixed by #657

Comments

@ghost
Copy link

ghost commented May 17, 2018

./eggdrop name.conf

[09:00:50] * Last context: tclhash.c/248 []
[09:00:50] * Please REPORT this BUG!
[09:00:50] * Check doc/BUG-REPORT on how to do so.
[09:00:50] * Wrote DEBUG
[09:00:50] * SEGMENT VIOLATION -- CRASHING!
Segmentation fault

@thommey
Copy link
Member

thommey commented May 17, 2018

vircio@vps:~/eggdrop$ gdb ./eggdrop core
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./eggdrop...done.

warning: core file may not match specified executable file.
[New LWP 11533]
[New LWP 11534]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./eggdrop -mn Profeta.conf'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f27a20755d0 in __libc_res_nsearch () from /lib/x86_64-linux-gnu/libresolv.so.2
[Current thread is 1 (Thread 0x7f27a4e5d040 (LWP 11533))]
(gdb) bt full
#0  0x00007f27a20755d0 in __libc_res_nsearch () from /lib/x86_64-linux-gnu/libresolv.so.2
No symbol table info available.
#1  0x00007f27a22865f6 in _nss_dns_gethostbyname3_r () from /lib/x86_64-linux-gnu/libnss_dns.so.2
No symbol table info available.
#2  0x00007f27a2286861 in _nss_dns_gethostbyname2_r () from /lib/x86_64-linux-gnu/libnss_dns.so.2
No symbol table info available.
#3  0x00007f27a33ab3ef in gethostbyname2_r () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#4  0x00007f27a33ab0dc in gethostbyname2 () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#5  0x000055e3ff1f6a84 in setsockname (addr=0x7ffe13611e60, src=src@entry=0x55e3ff4305a0 <vhost> "", port=port@entry=0, allowres=allowres@entry=1) at net.c:166
        hp = <optimized out>
        af = 0
        pref = <optimized out>
#6  0x000055e3ff1f6b73 in getvhost (addr=addr@entry=0x7ffe13611e60, af=<optimized out>) at net.c:258
        h = 0x55e3ff4305a0 <vhost> ""
#7  0x000055e3ff1f899b in open_telnet_raw (sock=9, addr=0x55e400803d84) at net.c:512
        name = {family = 0, addrlen = 0, addr = {sa = {sa_family = 0, sa_data = '\000' <repeats 13 times>}, s4 = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0},
              sin_zero = "\000\000\000\000\000\000\000"}, s6 = {sin6_family = 0, sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0,
                    0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}}
        res_len = 0
        sockset = {__fds_bits = {139808196416544, 139808218393339, -1, 0, 139808196416544, 139808196416544, 139809775419391, 139808196416546, -1, 139808221721856, 0, 0, 0, 46, 94437728520000, 139808234517369}}
        tv = {tv_sec = 140729223553200, tv_usec = 140729223553200}
        i = <optimized out>
        rc = <optimized out>
        res = 0
#8  0x00007f27a17ed3b7 in server_resolve_success (servidx=3) at .././server.mod/servmsg.c:1291
        pass = '\000' <repeats 120 times>
#9  0x000055e3ff1e9e17 in dns_dccipbyhost (ip=0x55e402aed01c, hostn=<optimized out>, ok=<optimized out>, other=<optimized out>) at dns.c:159
        idx = 3
#10 0x000055e3ff1ea6f0 in call_ipbyhost (hostn=0x55e402aed050 "irc.linksoft.com.br", ip=0x55e402aed01c, ok=1) at dns.c:446
        de = 0x55e402aece00
        ode = 0x0
        nde = 0x0
#11 0x00007f27a1c223af in dns_ack () at .././dns.mod/coredns.c:1109
        from = {sin_family = 2, sin_port = 13568, sin_addr = {s_addr = 16843009}, sin_zero = "\000\000\000\000\000\000\000"}
        fromlen = 16
---Type <return> to continue, or q <return> to quit---
        r = <optimized out>
        i = <optimized out>
#12 dns_socket (idx=<optimized out>, buf=<optimized out>, len=<optimized out>) at .././dns.mod/dns.c:104
No locals.
#13 0x000055e3ff1f04b0 in mainloop (toplevel=1) at ./main.c:879
        idx = <optimized out>
        socket_cleanup = 4
        xx = <optimized out>
        i = 0
        eggbusy = 1
        tclbusy = 0
        buf = "\000_y\000\344U\000\000\000N\177\000\344U\000\000\001\000\000\000\000\000\000\000}\225\235\244'\177\000\000\030$a\023\376\177\000\000\001\000\000\000\000\000\000\000@\301y\000\344U\000\000\000\000\000\000\001\000\000\000 $a\023\376\177", '\000' <repeats 22 times>, "\a", '\000' <repeats 44 times>, "aR\357n\r@_", '\000' <repeats 17 times>, "N\177\000\344U\000\000\340G?'\177\000\000\200$a\023\376\177\000\000\000\000\000\000\000\000\000\000Pxz\000\344U\000\000/"...
#14 0x000055e3ff1c8dba in main (arg_c=<optimized out>, arg_v=<optimized out>) at ./main.c:1272
        i = <optimized out>
        xx = <optimized out>
        s = "Thu May 17 2018\000:18 2018"
        f = <optimized out>
        sv = {__sigaction_handler = {sa_handler = 0x55e3ff1efab0 <got_alarm>, sa_sigaction = 0x55e3ff1efab0 <got_alarm>}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0x0}
        chan = <optimized out>
        cdlim = {rlim_cur = 18446744073709551615, rlim_max = 18446744073709551615}

Unloading dns.mod fixes it. vhost is empty. setting a vhost didn't help.

@michaelortmann
Copy link
Member

michaelortmann commented Sep 13, 2018

  1. Do you still have the core file?

  2. I am thinking about replacing gethostbyname*() with getaddrinfo(). if replaced this issue could be closed, because the segfault happened in gethostbyname*().

vanosg pushed a commit that referenced this issue Oct 14, 2018
Found by: maimizuno
Patch by: michaelortmann
Fixes: #518
Cizzle pushed a commit that referenced this issue Oct 18, 2018
Found by: maimizuno
Patch by: michaelortmann
Fixes: #518
Cizzle pushed a commit that referenced this issue Oct 18, 2018
Found by: maimizuno
Patch by: michaelortmann
Fixes: #518
@Cizzle Cizzle added this to the v1.8.4 milestone Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants