View Issue Details

IDProjectCategoryView StatusLast Update
0004677GNUnetcadet servicepublic2018-06-07 00:24
Reporterch3 Assigned ToChristian Grothoff  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0004677: crash when destroying cadet channel
DescriptionService crashes when trying to destroy a cadet channel.
It seems if this is always the case when a peer (A) has two open channels towards another peer (B), the other peer (B) closes one and A in turn closes the other one.
In this case GNUNET_CADET_channel_destroy () (at cadet_api.c:1594) seems to call GNUNET_MQ_send (mq=0x0, ev=0x1f19f60) at mq.c:369. Note the empty mq!

Program terminated with signal SIGABRT, Aborted.
#0 0x00007fd4e00c904f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007fd4e00c904f in raise () from /usr/lib/libc.so.6
#1 0x00007fd4e00ca47a in abort () from /usr/lib/libc.so.6
#2 0x00007fd4e1e245f7 in GNUNET_abort_ () at common_logging.c:293
#3 0x00007fd4e1e52a4c in GNUNET_MQ_send (mq=0x0, ev=0x1f19f60) at mq.c:369
#4 0x00007fd4e1c0642b in GNUNET_CADET_channel_destroy (channel=0x1f05aa0) at cadet_api.c:1594
#5 0x0000000000407f9e in Peers_remove_peer (peer=0x1f052e0) at gnunet-service-rps_peers.c:1164
#6 0x000000000040b9a3 in remove_peer (peer=0x1f052e0) at gnunet-service-rps.c:787
#7 0x000000000040be17 in cleanup_destroyed_channel (cls=0x0, channel=0x1f05c10, channel_ctx=0x1f05a50)
    at gnunet-service-rps.c:888
#8 0x00007fd4e1c022bf in destroy_channel (ch=0x1f05c10, call_cleaner=1) at cadet_api.c:449
#9 0x00007fd4e1c050c6 in reconnect (h=0x1f036b0) at cadet_api.c:1334
#10 0x00007fd4e1c03c87 in handle_mq_error (cls=0x1f036b0, error=GNUNET_MQ_ERROR_READ) at cadet_api.c:827
#11 0x00007fd4e1e528b6 in GNUNET_MQ_inject_error (mq=0x1f03920, error=GNUNET_MQ_ERROR_READ) at mq.c:325
#12 0x00007fd4e1e53cf6 in handle_client_message (cls=0x1f03920, msg=0x0) at mq.c:753
#13 0x00007fd4e1e20a41 in receive_helper (cls=0x1f038a0, buf=0x7ffcf53f7ae0, available=0,
    addr=0x1f03740, addrlen=110, errCode=0) at client.c:533
#14 0x00007fd4e1e2d7e9 in receive_ready (cls=0x1f037c0) at connection.c:1189
#15 0x00007fd4e1e65078 in run_ready (rs=0x1f09480, ws=0x1f09510) at scheduler.c:620
#16 0x00007fd4e1e659c3 in GNUNET_SCHEDULER_run (task=0x7fd4e1e7569a <service_main>,
    task_cls=0x7ffcf5407f20) at scheduler.c:887
#17 0x00007fd4e1e7a09f in GNUNET_SERVICE_ruN_ (argc=3, argv=0x7ffcf54082d8, service_name=0x413ca7 "rps",
    options=GNUNET_SERVICE_OPTION_NONE, service_init_cb=0x4117eb <run>,
    connect_cb=0x41148b <client_connect_cb>, disconnect_cb=0x4116fd <client_disconnect_cb>, cls=0x0,
    handlers=0x7ffcf54080b0) at service_new.c:1700
#18 0x00000000004121a2 in main (argc=3, argv=0x7ffcf54082d8) at gnunet-service-rps.c:2416
Steps To ReproduceRun some of src/rps/test_rps_*
(or simply cd src/rps/ && make check)
Additional Information(gdb) bt f
#0 0x00007fd4e00c904f in raise () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007fd4e00ca47a in abort () from /usr/lib/libc.so.6
No symbol table info available.
#2 0x00007fd4e1e245f7 in GNUNET_abort_ () at common_logging.c:293
No locals.
#3 0x00007fd4e1e52a4c in GNUNET_MQ_send (mq=0x0, ev=0x1f19f60) at mq.c:369
        __FUNCTION__ = "GNUNET_MQ_send"
#4 0x00007fd4e1c0642b in GNUNET_CADET_channel_destroy (channel=0x1f05aa0) at cadet_api.c:1594
        h = 0x1f036b0
        msg = 0x1f19fa8
        env = 0x1f19f60
        th = 0x0
        next = 0x0
        __FUNCTION__ = "GNUNET_CADET_channel_destroy"
#5 0x0000000000407f9e in Peers_remove_peer (peer=0x1f052e0) at gnunet-service-rps_peers.c:1164
        peer_ctx = 0x1f19b70
        __FUNCTION__ = "Peers_remove_peer"
#6 0x000000000040b9a3 in remove_peer (peer=0x1f052e0) at gnunet-service-rps.c:787
No locals.
#7 0x000000000040be17 in cleanup_destroyed_channel (cls=0x0, channel=0x1f05c10, channel_ctx=0x1f05a50) at gnunet-service-rps.c:888
        peer = 0x1f052e0
        __FUNCTION__ = "cleanup_destroyed_channel"
#8 0x00007fd4e1c022bf in destroy_channel (ch=0x1f05c10, call_cleaner=1) at cadet_api.c:449
        h = 0x1f036b0
        th = 0x100000001
        next = 0x7fd4e1c08878 <__FUNCTION__.14129>
        __FUNCTION__ = "destroy_channel"
#9 0x00007fd4e1c050c6 in reconnect (h=0x1f036b0) at cadet_api.c:1334
        ch = 0x1f05c10
        __FUNCTION__ = "reconnect"
#10 0x00007fd4e1c03c87 in handle_mq_error (cls=0x1f036b0, error=GNUNET_MQ_ERROR_READ) at cadet_api.c:827
        h = 0x1f036b0
        __FUNCTION__ = "handle_mq_error"
#11 0x00007fd4e1e528b6 in GNUNET_MQ_inject_error (mq=0x1f03920, error=GNUNET_MQ_ERROR_READ) at mq.c:325
        __FUNCTION__ = "GNUNET_MQ_inject_error"
#12 0x00007fd4e1e53cf6 in handle_client_message (cls=0x1f03920, msg=0x0) at mq.c:753
        mq = 0x1f03920
        state = 0x1f02850
#13 0x00007fd4e1e20a41 in receive_helper (cls=0x1f038a0, buf=0x7ffcf53f7ae0, available=0, addr=0x1f03740, addrlen=110, errCode=0) at client.c:533
        client = 0x1f038a0
        remaining = {rel_value_us = 18446744073709551615}
        receive_handler = 0x7fd4e1e53cba <handle_client_message>
        receive_handler_cls = 0x1f03920
        __FUNCTION__ = "receive_helper"
#14 0x00007fd4e1e2d7e9 in receive_ready (cls=0x1f037c0) at connection.c:1189
        connection = 0x1f037c0
        tc = 0x7fd4e209c090 <tc>
        buffer = "\000\b\003\374\200\000\000\004\000\004\003\270\000\000\000\003\063]\274\243\305\n\264\rB\265\216\016\243\226$?{\351\071\370\377z\\n鹲\177\221\071\367tl\313\317\316m\214@e\304\061\003\\\017\241\226^\240\225\065\026Ar\360\v\234\030\220Uh{\006\312\067\252\271\320\332\324\314G\252\tk\300$\211\\,\224\226\061L\001%\257\002/Gcc\f\261\262\327bedItvSAc/0/transport-unix.sock\000\000\220\001L\000\000\000\000\067\252\271\320\332\324\314G\252\tk\300$\211\\,\224\226\061L\001%\257\002/Gcc\f\261\262\327\000h\000\021\000\000\000\000\067\252\271\320\332\324\314G\252\t"...
        ret = 0
        receiver = 0x7fd4e1e207a9 <receive_helper>
        __FUNCTION__ = "receive_ready"
#15 0x00007fd4e1e65078 in run_ready (rs=0x1f09480, ws=0x1f09510) at scheduler.c:620
        p = GNUNET_SCHEDULER_PRIORITY_DEFAULT
        pos = 0x1f19c20
        __FUNCTION__ = "run_ready"
---Type <return> to continue, or q <return> to quit---
#16 0x00007fd4e1e659c3 in GNUNET_SCHEDULER_run (task=0x7fd4e1e7569a <service_main>, task_cls=0x7ffcf5407f20) at scheduler.c:887
        rs = 0x1f09480
        ws = 0x1f09510
        timeout = {rel_value_us = 2736013}
        ret = 1
        shc_int = 0x1f095a0
        shc_term = 0x1f09660
        shc_quit = 0x1f02040
        shc_hup = 0x1f02100
        shc_pipe = 0x1f09720
        last_tr = 435
        busy_wait_warning = 0
        pr = 0x1f0bae0
        c = 91 '['
        __FUNCTION__ = "GNUNET_SCHEDULER_run"
#17 0x00007fd4e1e7a09f in GNUNET_SERVICE_ruN_ (argc=3, argv=0x7ffcf54082d8, service_name=0x413ca7 "rps", options=GNUNET_SERVICE_OPTION_NONE, service_init_cb=0x4117eb <run>,
    connect_cb=0x41148b <client_connect_cb>, disconnect_cb=0x4116fd <client_disconnect_cb>, cls=0x0, handlers=0x7ffcf54080b0) at service_new.c:1700
        sh = {cfg = 0x1eff720, service_name = 0x413ca7 "rps", service_init_cb = 0x4117eb <run>, connect_cb = 0x41148b <client_connect_cb>, disconnect_cb = 0x4116fd <client_disconnect_cb>, cb_cls = 0x0,
          slc_head = 0x1f08350, slc_tail = 0x1f08350, clients_head = 0x0, clients_tail = 0x0, handlers = 0x7ffcf54080b0, task_cls = 0x0, v4_denied = 0x0, v6_denied = 0x0, v4_allowed = 0x1f104f0,
          v6_allowed = 0x1f10bf0, match_uid = 0, match_gid = 1, got_shutdown = 0, options = GNUNET_SERVICE_OPTION_NONE, ready_confirm_fd = -1, ret = 0, require_found = 1}
        cfg_filename = 0x1eff700 "~/.config/gnunet.conf"
        opt_cfg_filename = 0x1eff850 "/tmp/testbedItvSAc/2/config"
        loglev = 0x0
        xdg = 0x0
        logfile = 0x0
        do_daemonize = 0
        skew_offset = 44349769
        skew_variance = 2838385273
        clock_offset = 3
        cfg = 0x1eff720
        ret = 3
        err = 0
        service_options = {{shortName = 99 'c', name = 0x7fd4e1e8ca37 "config", argumentHelp = 0x7fd4e1e8ca3e "FILENAME", description = 0x7fd4e1e8ca48 "use configuration file FILENAME", require_argument = 1,
            processor = 0x7fd4e1e4e9f3 <GNUNET_GETOPT_set_string>, scls = 0x7ffcf5407f10}, {shortName = 100 'd', name = 0x7fd4e1e8ca68 "daemonize", argumentHelp = 0x0,
            description = 0x7fd4e1e8ca78 "do daemonize (detach from terminal)", require_argument = 0, processor = 0x7fd4e1e4e9c6 <GNUNET_GETOPT_set_one>, scls = 0x7ffcf5407efc}, {shortName = 104 'h',
            name = 0x7fd4e1e8ca9c "help", argumentHelp = 0x0, description = 0x7fd4e1e8caa1 "print this help", require_argument = 0, processor = 0x7fd4e1e4e44a <GNUNET_GETOPT_format_help_>, scls = 0x0}, {
            shortName = 76 'L', name = 0x7fd4e1e8cab1 "log", argumentHelp = 0x7fd4e1e8cab5 "LOGLEVEL", description = 0x7fd4e1e8cac0 "configure logging to use LOGLEVEL", require_argument = 1,
            processor = 0x7fd4e1e4e9f3 <GNUNET_GETOPT_set_string>, scls = 0x7ffcf5407f08}, {shortName = 108 'l', name = 0x7fd4e1e8cae2 "logfile", argumentHelp = 0x7fd4e1e8caea "LOGFILE",
            description = 0x7fd4e1e8caf8 "configure logging to write logs to LOGFILE", require_argument = 1, processor = 0x7fd4e1e4e9f3 <GNUNET_GETOPT_set_string>, scls = 0x7ffcf5407f00}, {shortName = 118 'v',
            name = 0x7fd4e1e8cb23 "version", argumentHelp = 0x0, description = 0x7fd4e1e8cb2b "print the version number", require_argument = 0, processor = 0x7fd4e1e4e404 <GNUNET_GETOPT_print_version_>,
            scls = 0x7fd4e1e8cb44}, {shortName = 0 '\000', name = 0x0, argumentHelp = 0x0, description = 0x0, require_argument = 0, processor = 0x0, scls = 0x0}}
        __FUNCTION__ = "GNUNET_SERVICE_ruN_"
#18 0x00000000004121a2 in main (argc=3, argv=0x7ffcf54082d8) at gnunet-service-rps.c:2416
        mh = {{mv = 0x0, cb = 0x40cb1d <handle_client_request>, cls = 0x0, type = 954, expected_size = 12}, {mv = 0x0, cb = 0x40cf24 <handle_client_request_cancel>, cls = 0x0, type = 956, expected_size = 8}, {
            mv = 0x0, cb = 0x40d208 <handle_client_seed>, cls = 0x0, type = 957, expected_size = 4}, {mv = 0x0, cb = 0x40e8ba <handle_client_act_malicious>, cls = 0x0, type = 958, expected_size = 4}, {mv = 0x0,
            cb = 0x0, cls = 0x0, type = 0, expected_size = 0}}
TagsNo tags attached.

Activities

Christian Grothoff

2017-02-21 18:26

manager   ~0011807

No longer relevant after CADET rewrite.

Issue History

Date Modified Username Field Change
2016-09-25 17:19 ch3 New Issue
2016-09-25 17:19 ch3 Status new => assigned
2016-09-25 17:19 ch3 Assigned To => Bart Polot
2017-02-21 18:26 Christian Grothoff Assigned To Bart Polot => Christian Grothoff
2017-02-21 18:26 Christian Grothoff Status assigned => resolved
2017-02-21 18:26 Christian Grothoff Resolution open => fixed
2017-02-21 18:26 Christian Grothoff Fixed in Version => 0.11.0pre66
2017-02-21 18:26 Christian Grothoff Note Added: 0011807
2017-02-21 18:26 Christian Grothoff Target Version => 0.11.0pre66
2018-06-07 00:24 Christian Grothoff Status resolved => closed