View Issue Details

IDProjectCategoryView StatusLast Update
0001749GNUnetVPN servicepublic2011-09-19 10:45
Reporterroot Assigned Totoelke  
PrioritynormalSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Summary0001749: crash in free call in receive_query, gnunet-service-dns.c:734
DescriptionCore was generated by `gnunet-service-dns -c /home/grothoff/.gnunet/gnunet.conf -l ~/.gnunet//dns-logs'.
Program terminated with signal 6, Aborted.
#0 0x00007f65b3a78405 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) ba
#0 0x00007f65b3a78405 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f65b3a7b680 in abort () at abort.c:92
#2 0x00007f65b3aaedbb in __libc_message (do_abort=<value optimized out>, fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#3 0x00007f65b3ab8606 in malloc_printerr (action=3, str=0x7f65b3b8f1d0 "munmap_chunk(): invalid pointer", ptr=<value optimized out>) at malloc.c:6283
#4 0x00007f65b466adca in GNUNET_xfree_ (ptr=0x1409740, filename=0x4070c3 "gnunet-service-dns.c", linenumber=734) at common_allocation.c:196
#5 0x0000000000404674 in receive_query (cls=0x0, client=0x14042b0, message=0x7fffd6d1d860) at gnunet-service-dns.c:734
#6 0x00007f65b468d518 in GNUNET_SERVER_inject (server=0x1400b30, sender=0x14042b0, message=0x7fffd6d1d860) at server.c:721
#7 0x00007f65b468d974 in client_message_tokenizer_callback (cls=0x1400b30, client=0x14042b0, message=0x7fffd6d1d860) at server.c:961
#8 0x00007f65b468e6fb in GNUNET_SERVER_mst_receive (mst=0x1404330, client_identity=0x14042b0, buf=0x7fffd6d1d860 "", size=50, purge=0, one_shot=-1) at server_mst.c:271
#9 0x00007f65b468d855 in process_incoming (cls=0x14042b0, buf=0x7fffd6d1d860, available=50, addr=0x1404190, addrlen=2, errCode=0) at server.c:889
#10 0x00007f65b46707a9 in receive_ready (cls=0x14041b0, tc=0x7fffd6d2d8f0) at connection.c:1213
#11 0x00007f65b468b49b in run_ready (rs=0x1400a10, ws=0x1400aa0) at scheduler.c:659
#12 0x00007f65b468b958 in GNUNET_SCHEDULER_run (task=0x7f65b46926d2 <service_task>, task_cls=0x7fffd6d2dba0) at scheduler.c:836
#13 0x00007f65b46936bc in GNUNET_SERVICE_run (argc=5, argv=0x7fffd6d2ddc8, serviceName=0x4074f8 "dns", opt=GNUNET_SERVICE_OPTION_NONE, task=0x406331 <run>, task_cls=0x0) at service.c:1639
#14 0x000000000040649f in main (argc=5, argv=0x7fffd6d2ddc8) at gnunet-service-dns.c:1352
(gdb) bt full
#0 0x00007f65b3a78405 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        pid = <value optimized out>
        selftid = <value optimized out>
#1 0x00007f65b3a7b680 in abort () at abort.c:92
        act = {__sigaction_handler = {sa_handler = 0x6, sa_sigaction = 0x6}, sa_mask = {__val = {18446744073709551528, 140736797463488, 140074782806844, 21012640, 140074783176397, 0,
              140074783666400, 17179869240, 42949672970, 476741369863, 949187772419, 1, 7200, 21003760, 0, 112}}, sa_flags = 0, sa_restorer = 0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007f65b3aaedbb in __libc_message (do_abort=<value optimized out>, fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
        ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffd6d1d4f0, reg_save_area = 0x7fffd6d1d400}}
        ap_copy = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffd6d1d4f0, reg_save_area = 0x7fffd6d1d400}}
        fd = 2
        on_2 = <value optimized out>
        list = <value optimized out>
        nlist = 7
        cp = <value optimized out>
        written = false
#3 0x00007f65b3ab8606 in malloc_printerr (action=3, str=0x7f65b3b8f1d0 "munmap_chunk(): invalid pointer", ptr=<value optimized out>) at malloc.c:6283
        buf = "0000000001409740"
        cp = 0x5 <Address 0x5 out of bounds>
#4 0x00007f65b466adca in GNUNET_xfree_ (ptr=0x1409740, filename=0x4070c3 "gnunet-service-dns.c", linenumber=734) at common_allocation.c:196
No locals.
#5 0x0000000000404674 in receive_query (cls=0x0, client=0x14042b0, message=0x7fffd6d1d860) at gnunet-service-dns.c:734
        pkt = 0x7fffd6d1d860
        dns = 0x7fffd6d1d86e
        pdns = 0x1409760
        virt_dns = 0x7f65b468c02f "H\211C8\213\025\347I!"
        virt_dns_bytes = 32767
        dest = {sin_family = 62912, sin_port = 45753, sin_addr = {s_addr = 305}, sin_zero = "\260B@\001\000\000\000"}
#6 0x00007f65b468d518 in GNUNET_SERVER_inject (server=0x1400b30, sender=0x14042b0, message=0x7fffd6d1d860) at server.c:721
        pos = 0x1404060
        mh = 0x407540
        i = 0
        type = 205
        size = 50
        found = 0
#7 0x00007f65b468d974 in client_message_tokenizer_callback (cls=0x1400b30, client=0x14042b0, message=0x7fffd6d1d860) at server.c:961
        server = 0x1400b30
        sender = 0x14042b0
        ret = 0
#8 0x00007f65b468e6fb in GNUNET_SERVER_mst_receive (mst=0x1404330, client_identity=0x14042b0, buf=0x7fffd6d1d860 "", size=50, purge=0, one_shot=-1) at server_mst.c:271
        hdr = 0x7fffd6d1d860
        delta = 140074782938730
        want = 50
        ibuf = 0x14012a0 ""
        need_align = 0
        offset = 140736797464672
        ret = 1
#9 0x00007f65b468d855 in process_incoming (cls=0x14042b0, buf=0x7fffd6d1d860, available=50, addr=0x1404190, addrlen=2, errCode=0) at server.c:889
        client = 0x14042b0
        server = 0x1400b30
        end = {abs_value = 18446744073709551615}
        now = {abs_value = 1312963496800}
---Type <return> to continue, or q <return> to quit---
        ret = 0
#10 0x00007f65b46707a9 in receive_ready (cls=0x14041b0, tc=0x7fffd6d2d8f0) at connection.c:1213
        sh = 0x14041b0
        now = {abs_value = 1312963496800}
        buffer = 0x7fffd6d1d860 ""
        ret = 50
        receiver = 0x7f65b468d688 <process_incoming>
#11 0x00007f65b468b49b in run_ready (rs=0x1400a10, ws=0x1400aa0) at scheduler.c:659
        p = GNUNET_SCHEDULER_PRIORITY_HIGH
        pos = 0x1401240
        tc = {reason = GNUNET_SCHEDULER_REASON_READ_READY, read_ready = 0x1400a10, write_ready = 0x1400aa0}
#12 0x00007f65b468b958 in GNUNET_SCHEDULER_run (task=0x7f65b46926d2 <service_task>, task_cls=0x7fffd6d2dba0) at scheduler.c:836
        rs = 0x1400a10
        ws = 0x1400aa0
        timeout = {rel_value = 3385687}
        ret = 1
        shc_int = 0x1400d80
        shc_term = 0x1400e30
        shc_quit = 0x1400f90
        shc_hup = 0x1401040
        shc_pipe = 0x1400ee0
        last_tr = 997
        busy_wait_warning = 0
        pr = 0x1400970
        c = 0 '\000'
#13 0x00007f65b46936bc in GNUNET_SERVICE_run (argc=5, argv=0x7fffd6d2ddc8, serviceName=0x4074f8 "dns", opt=GNUNET_SERVICE_OPTION_NONE, task=0x406331 <run>, task_cls=0x0) at service.c:1639
        err = 0
        cfg_fn = 0x13fa070 "/home/grothoff/.gnunet/gnunet.conf"
        loglev = 0x13f9f00 "WARNING"
        logfile = 0x13f9f20 "~/.gnunet//dns-logs"
        do_daemonize = 0
        i = 4219697
        skew_offset = 4294967297
        skew_variance = 140074801669922
        clock_offset = 140736797531592
        sctx = {cfg = 0x13f9f40, server = 0x1400b30, addrs = 0x0, serviceName = 0x4074f8 "dns", task = 0x406331 <run>, task_cls = 0x0, v4_denied = 0x0, v6_denied = 0x0,
          v4_allowed = 0x1400980, v6_allowed = 0x14009c0, my_handlers = 0x13f9fe0, addrlens = 0x0, lsocks = 0x13f9f60, timeout = {rel_value = 18446744073709551615}, ret = 1,
          ready_confirm_fd = -1, require_found = 1, match_uid = -1, match_gid = -1, options = GNUNET_SERVICE_OPTION_NONE}
        cfg = 0x13f9f40
        service_options = {{shortName = 99 'c', name = 0x7f65b469839d "config", argumentHelp = 0x7f65b46983a4 "FILENAME", description = 0x7f65b46983b0 "use configuration file FILENAME",
            require_argument = 1, processor = 0x7f65b4681ee6 <GNUNET_GETOPT_set_string>, scls = 0x7fffd6d2dc50}, {shortName = 100 'd', name = 0x7f65b46983d0 "daemonize",
            argumentHelp = 0x0, description = 0x7f65b46983e0 "do daemonize (detach from terminal)", require_argument = 0, processor = 0x7f65b4681eb9 <GNUNET_GETOPT_set_one>,
            scls = 0x7fffd6d2dc3c}, {shortName = 104 'h', name = 0x7f65b4698404 "help", argumentHelp = 0x0, description = 0x7f65b4698409 "print this help", require_argument = 0,
            processor = 0x7f65b4681909 <GNUNET_GETOPT_format_help_>, scls = 0x4074f8}, {shortName = 76 'L', name = 0x7f65b4698419 "log", argumentHelp = 0x7f65b469841d "LOGLEVEL",
            description = 0x7f65b4698428 "configure logging to use LOGLEVEL", require_argument = 1, processor = 0x7f65b4681ee6 <GNUNET_GETOPT_set_string>, scls = 0x7fffd6d2dc48}, {
            shortName = 108 'l', name = 0x7f65b469844a "logfile", argumentHelp = 0x7f65b4698452 "LOGFILE", description = 0x7f65b4698460 "configure logging to write logs to LOGFILE",
            require_argument = 1, processor = 0x7f65b4681ee6 <GNUNET_GETOPT_set_string>, scls = 0x7fffd6d2dc40}, {shortName = 118 'v', name = 0x7f65b469848b "version",
            argumentHelp = 0x0, description = 0x7f65b4698493 "print the version number", require_argument = 0, processor = 0x7f65b46818c0 <GNUNET_GETOPT_print_version_>,
            scls = 0x7f65b46984ac}, {shortName = 0 '\000', name = 0x0, argumentHelp = 0x0, description = 0x0, require_argument = 0, processor = 0, scls = 0x0}}
#14 0x000000000040649f in main (argc=5, argv=0x7fffd6d2ddc8) at gnunet-service-dns.c:1352
No locals.
TagsNo tags attached.

Activities

toelke

2011-09-07 13:42

reporter   ~0004566

I am quite sure this is a double-free I fixed in r16652 or r16653

Issue History

Date Modified Username Field Change
2011-08-10 10:10 root New Issue
2011-08-10 10:11 root Product Version => Git master
2011-09-07 13:42 toelke Note Added: 0004566
2011-09-07 13:42 toelke Status new => closed
2011-09-07 13:42 toelke Assigned To => toelke
2011-09-07 13:42 toelke Resolution open => fixed
2011-09-07 13:42 toelke Fixed in Version => Git master
2011-09-19 10:45 Christian Grothoff Fixed in Version Git master => 0.9.0pre3
2011-09-19 10:45 Christian Grothoff Target Version => 0.9.0pre3