View Issue Details

IDProjectCategoryView StatusLast Update
0002964GNUnetcadet servicepublic2013-12-24 20:54
ReporterBart Polot Assigned ToFlorian Dold  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.10.0Fixed in Version0.10.0 
Summary0002964: Looping tunnels do not clean properly
Descriptiongnunet-set-profiler -LINFO -A 100 -B 100 -C 100 causes mesh to leave tunnel to timeout, while trying to retransmit a reliable message to himself, after receiving a destroy message.
TagsNo tags attached.

Relationships

child of 0002565 closedBart Polot mesh should provide end-to-end encryption 

Activities

Bart Polot

2013-11-15 13:07

manager   ~0007639

Needs testing.

Bart Polot

2013-11-26 02:56

manager   ~0007688

Test with r30866.

Bart Polot

2013-11-26 13:34

manager   ~0007692

Can't reproduce, profiler crashes:

Core was generated by `/home/bart/g/src/set/.libs/lt-gnunet-set-profiler -LINFO -A 100 -B 100 -C 100'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fa668fa69a4 in GNUNET_MQ_destroy (mq=0x0) at mq.c:705
705 if (NULL != mq->destroy_impl)
(gdb) bt
#0 0x00007fa668fa69a4 in GNUNET_MQ_destroy (mq=0x0) at mq.c:705
#1 0x00007fa668d66d6a in GNUNET_SET_listen_cancel (lh=0x1e79330) at set_api.c:714
#2 0x0000000000401c68 in handle_shutdown (cls=0x0, tc=0x7fff7dac5210) at gnunet-set-profiler.c:184
#3 0x00007fa668fb37eb in run_ready (rs=0x1e6a5c0, ws=0x1e55850) at scheduler.c:593
#4 0x00007fa668fb4079 in GNUNET_SCHEDULER_run (task=0x7fa668fae6fc <program_main>, task_cls=0x7fff7dac54b0) at scheduler.c:808
#5 0x00007fa668faf1be in GNUNET_PROGRAM_run2 (argc=8, argv=0x7fff7dac56d8, binaryName=0x402303 "gnunet-set-profiler", binaryHelp=0x4022fe "help", options=0x4023c0 <options.11231>, task=0x401d0d <run>, task_cls=0x0, run_without_scheduler=0)
    at program.c:281
#6 0x00007fa668faf2eb in GNUNET_PROGRAM_run (argc=8, argv=0x7fff7dac56d8, binaryName=0x402303 "gnunet-set-profiler", binaryHelp=0x4022fe "help", options=0x4023c0 <options.11231>, task=0x401d0d <run>, task_cls=0x0) at program.c:317
#7 0x0000000000402127 in main (argc=8, argv=0x7fff7dac56d8) at gnunet-set-profiler.c:299
(gdb) bt full
#0 0x00007fa668fa69a4 in GNUNET_MQ_destroy (mq=0x0) at mq.c:705
        __FUNCTION__ = "GNUNET_MQ_destroy"
#1 0x00007fa668d66d6a in GNUNET_SET_listen_cancel (lh=0x1e79330) at set_api.c:714
        __FUNCTION__ = "GNUNET_SET_listen_cancel"
#2 0x0000000000401c68 in handle_shutdown (cls=0x0, tc=0x7fff7dac5210) at gnunet-set-profiler.c:184
No locals.
#3 0x00007fa668fb37eb in run_ready (rs=0x1e6a5c0, ws=0x1e55850) at scheduler.c:593
        p = GNUNET_SCHEDULER_PRIORITY_SHUTDOWN
        pos = 0x1e56f20
        tc = {reason = GNUNET_SCHEDULER_REASON_SHUTDOWN, read_ready = 0x1e6a5c0, write_ready = 0x1e55850}
        __FUNCTION__ = "run_ready"
#4 0x00007fa668fb4079 in GNUNET_SCHEDULER_run (task=0x7fa668fae6fc <program_main>, task_cls=0x7fff7dac54b0) at scheduler.c:808
        rs = 0x1e6a5c0
        ws = 0x1e55850
        timeout = {rel_value_us = 0}
        ret = 0
        shc_int = 0x1e6a0a0
        shc_term = 0x1e6a150
        shc_quit = 0x1e55cf0
        shc_hup = 0x1e55da0
        shc_pipe = 0x1e55c40
        last_tr = 299
        busy_wait_warning = 0
        pr = 0x1e557d0
        c = 0 '\000'
        __FUNCTION__ = "GNUNET_SCHEDULER_run"
#5 0x00007fa668faf1be in GNUNET_PROGRAM_run2 (argc=8, argv=0x7fff7dac56d8, binaryName=0x402303 "gnunet-set-profiler", binaryHelp=0x4022fe "help", options=0x4023c0 <options.11231>, task=0x401d0d <run>, task_cls=0x0, run_without_scheduler=0)
    at program.c:281
        cc = {args = 0x7fff7dac5718, cfgfile = 0x1e555b0 "~/.gnunet/gnunet.conf", task = 0x401d0d <run>, task_cls = 0x0, cfg = 0x1e51700}
        path = 0x1e52650 "gnunet-set-profiler-1010"
        loglev = 0x1e52ad0 "INFO"
        logfile = 0x0
        cfg_fn = 0x1e52920 "~/.gnunet/gnunet.conf"
        xdg = 0x0
        ret = 8
        cnt = 9
        skew_offset = 4294967295
        skew_variance = 4196563
        clock_offset = 0
        cfg = 0x1e51700
        defoptions = {{shortName = 99 'c', name = 0x7fa668fccbd0 "config", argumentHelp = 0x7fa668fccbd7 "FILENAME", description = 0x7fa668fccbe0 "use configuration file FILENAME", require_argument = 1,
            processor = 0x401130 <GNUNET_GETOPT_set_string@plt>, scls = 0x7fff7dac54b8}, {shortName = 104 'h', name = 0x7fa668fccc00 "help", argumentHelp = 0x0, description = 0x7fa668fccc05 "print this help", require_argument = 0,
            processor = 0x7fa668fa1f4e <GNUNET_GETOPT_format_help_>, scls = 0x4022fe}, {shortName = 76 'L', name = 0x7fa668fccc15 "log", argumentHelp = 0x7fa668fccc19 "LOGLEVEL", description = 0x7fa668fccc28 "configure logging to use LOGLEVEL",
            require_argument = 1, processor = 0x401130 <GNUNET_GETOPT_set_string@plt>, scls = 0x7fff7dac54a8}, {shortName = 108 'l', name = 0x7fa668fccc4a "logfile", argumentHelp = 0x7fa668fccc52 "LOGFILE",
            description = 0x7fa668fccc60 "configure logging to write logs to LOGFILE", require_argument = 1, processor = 0x401130 <GNUNET_GETOPT_set_string@plt>, scls = 0x7fff7dac54a0}, {shortName = 118 'v', name = 0x7fa668fccc8b "version",
            argumentHelp = 0x0, description = 0x7fa668fccc93 "print the version number", require_argument = 0, processor = 0x7fa668fa1f08 <GNUNET_GETOPT_print_version_>, scls = 0x7fa668fcccac}}
        allopts = 0x1e526e0
        gargs = 0x0
        lpfx = 0x1e52940 "\320W\345\001"
        spc = 0x0
        __FUNCTION__ = "GNUNET_PROGRAM_run2"
#6 0x00007fa668faf2eb in GNUNET_PROGRAM_run (argc=8, argv=0x7fff7dac56d8, binaryName=0x402303 "gnunet-set-profiler", binaryHelp=0x4022fe "help", options=0x4023c0 <options.11231>, task=0x401d0d <run>, task_cls=0x0) at program.c:317
No locals.
#7 0x0000000000402127 in main (argc=8, argv=0x7fff7dac56d8) at gnunet-set-profiler.c:299
        options = {{shortName = 65 'A', name = 0x402354 "num-first", argumentHelp = 0x0, description = 0x40235e "number of values", require_argument = 1, processor = 0x4010b0 <GNUNET_GETOPT_set_uint@plt>, scls = 0x602b08 <num_a>}, {
            shortName = 66 'B', name = 0x40236f "num-second", argumentHelp = 0x0, description = 0x40235e "number of values", require_argument = 1, processor = 0x4010b0 <GNUNET_GETOPT_set_uint@plt>, scls = 0x602b0c <num_b>}, {shortName = 67 'C',
            name = 0x40237a "num-common", argumentHelp = 0x0, description = 0x40235e "number of values", require_argument = 1, processor = 0x4010b0 <GNUNET_GETOPT_set_uint@plt>, scls = 0x602b10 <num_c>}, {shortName = 120 'x',
            name = 0x402385 "operation", argumentHelp = 0x0, description = 0x40238f "oeration to execute", require_argument = 1, processor = 0x401130 <GNUNET_GETOPT_set_string@plt>, scls = 0x602b18 <op_str>}, {shortName = 0 '\000', name = 0x0,
            argumentHelp = 0x0, description = 0x0, require_argument = 0, processor = 0x0, scls = 0x0}}

Florian Dold

2013-11-26 14:37

developer   ~0007694

I can't reproduce the crash, the profiler works fine for me. This looks like an issue I've fixed some commits ago, are you on SVN head?

Bart Polot

2013-11-26 14:40

manager   ~0007695

[bart@saturn ~/g/src/set]$ ./gnunet-set-profiler -LINFO -A 100 -B 100 -C 100
Nov 26 14:38:56-487855 gnunet-set-profiler-20110 ERROR failure
Segmentation fault (core dumped)
[bart@saturn ~/g/src/set]$ svn up
Updating '.':
At revision 30872.
[bart@saturn ~/g/src/set]$

Florian Dold

2013-11-26 14:42

developer   ~0007696

Maybe a forgotten make / make install?
I'm also on r30872 and have simply no idea how to reproduce this ...

Bart Polot

2013-11-26 14:43

manager   ~0007697

Nope, just made 'make install' in gnunet root before running the profiler...

Bart Polot

2013-11-26 14:45

manager   ~0007698

You should be able to ssh into my machine to try it, using team@saturn.net.in...

Just set PATH and GNUNET_PREFIX to /tmp/bartgnunet

Florian Dold

2013-11-26 14:52

developer   ~0007699

[team@saturn ~]$ export PATH=/tmp/bartgnunet:$PATH
[team@saturn ~]$ export GNUNET_PREFIX=/tmp/bartgnunet
[team@saturn ~]$ gnunet-set-profiler -LINFO -A 100 -B 100 -C 100
set a: 0 missing elements
set b: 0 missing elements
[team@saturn ~]$ echo $?
0

Bart Polot

2013-11-26 15:27

manager   ~0007703

[bart@saturn ~/g/src/set]$ valgrind .libs/lt-gnunet-set-profiler -LINFO -A 100 -B 100 -C 100
==22198== Memcheck, a memory error detector
==22198== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==22198== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==22198== Command: .libs/lt-gnunet-set-profiler -LINFO -A 100 -B 100 -C 100
==22198==
Nov 26 15:26:02-320445 gnunet-set-profiler-22198 ERROR failure
==22198== Invalid read of size 8
==22198== at 0x4E709A4: GNUNET_MQ_destroy (mq.c:705)
==22198== by 0x50A8D69: GNUNET_SET_listen_cancel (set_api.c:714)
==22198== by 0x401C67: handle_shutdown (gnunet-set-profiler.c:184)
==22198== by 0x4E7D7EA: run_ready (scheduler.c:593)
==22198== by 0x4E7E078: GNUNET_SCHEDULER_run (scheduler.c:808)
==22198== by 0x4E791BD: GNUNET_PROGRAM_run2 (program.c:281)
==22198== by 0x4E792EA: GNUNET_PROGRAM_run (program.c:317)
==22198== by 0x402126: main (gnunet-set-profiler.c:299)
==22198== Address 0x18 is not stack'd, malloc'd or (recently) free'd
==22198==
==22198==
==22198== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==22198== Access not within mapped region at address 0x18
==22198== at 0x4E709A4: GNUNET_MQ_destroy (mq.c:705)
==22198== by 0x50A8D69: GNUNET_SET_listen_cancel (set_api.c:714)
==22198== by 0x401C67: handle_shutdown (gnunet-set-profiler.c:184)
==22198== by 0x4E7D7EA: run_ready (scheduler.c:593)
==22198== by 0x4E7E078: GNUNET_SCHEDULER_run (scheduler.c:808)
==22198== by 0x4E791BD: GNUNET_PROGRAM_run2 (program.c:281)
==22198== by 0x4E792EA: GNUNET_PROGRAM_run (program.c:317)
==22198== by 0x402126: main (gnunet-set-profiler.c:299)
==22198== If you believe this happened as a result of a stack
==22198== overflow in your program's main thread (unlikely but
==22198== possible), you can try to increase the size of the
==22198== main thread stack using the --main-stacksize= flag.
==22198== The main thread stack size used in this run was 8388608.
==22198==
==22198== HEAP SUMMARY:
==22198== in use at exit: 98,147 bytes in 2,288 blocks
==22198== total heap usage: 17,077 allocs, 14,789 frees, 702,950 bytes allocated
==22198==
==22198== LEAK SUMMARY:
==22198== definitely lost: 0 bytes in 0 blocks
==22198== indirectly lost: 0 bytes in 0 blocks
==22198== possibly lost: 0 bytes in 0 blocks
==22198== still reachable: 98,147 bytes in 2,288 blocks
==22198== suppressed: 0 bytes in 0 blocks
==22198== Rerun with --leak-check=full to see details of leaked memory
==22198==
==22198== For counts of detected and suppressed errors, rerun with: -v
==22198== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
Segmentation fault

Bart Polot

2013-11-26 15:29

manager   ~0007704

In case it helps...

(gdb) bt
#0 0x00007fde30a9b9a4 in GNUNET_MQ_destroy (mq=0x0) at mq.c:705
#1 0x00007fde3085bd4a in GNUNET_SET_listen_cancel (lh=0x20e5330) at set_api.c:714
#2 0x0000000000401bf8 in handle_shutdown (cls=0x0, tc=0x7fff1a1617b0) at gnunet-set-profiler.c:184
#3 0x00007fde30aa87eb in run_ready (rs=0x20d65c0, ws=0x20c1850) at scheduler.c:593
#4 0x00007fde30aa9079 in GNUNET_SCHEDULER_run (task=0x7fde30aa36fc <program_main>, task_cls=0x7fff1a161a50)
    at scheduler.c:808
#5 0x00007fde30aa41be in GNUNET_PROGRAM_run2 (argc=8, argv=0x7fff1a161c78, binaryName=0x402283 "gnunet-set-profiler",
    binaryHelp=0x40227e "help", options=0x402340 <options.11231>, task=0x401c9d <run>, task_cls=0x0,
    run_without_scheduler=0) at program.c:281
#6 0x00007fde30aa42eb in GNUNET_PROGRAM_run (argc=8, argv=0x7fff1a161c78, binaryName=0x402283 "gnunet-set-profiler",
    binaryHelp=0x40227e "help", options=0x402340 <options.11231>, task=0x401c9d <run>, task_cls=0x0) at program.c:317
#7 0x00000000004020b7 in main (argc=8, argv=0x7fff1a161c78) at gnunet-set-profiler.c:299
(gdb) up 1
#1 0x00007fde3085bd4a in GNUNET_SET_listen_cancel (lh=0x20e5330) at set_api.c:714
714 GNUNET_MQ_destroy (lh->mq);
(gdb) p *lh
$1 = {client = 0x0, mq = 0x0, cfg = 0x20bd700, listen_cb = 0x401935 <set_listen_cb>, listen_cls = 0x0,
  operation = GNUNET_SET_OPERATION_UNION, app_id = {bits = {303644372, 4209264393, 2857278005, 3724072119, 81299870,
      814508902, 2761276598, 2619395330, 378832469, 4246441833, 3694798502, 971469598, 2035374831, 3300497345,
      3426074698, 809720262}}, reconnect_backoff = {rel_value_us = 2000}}
(gdb) p/x *lh
$2 = {client = 0x0, mq = 0x0, cfg = 0x20bd700, listen_cb = 0x401935, listen_cls = 0x0, operation = 0x2, app_id = {
    bits = {0x12193ed4, 0xfae44709, 0xaa4e9a35, 0xddf8d4b7, 0x4d8899e, 0x308c6b66, 0xa495bcb6, 0x9c20cd02, 0x16948655,
      0xfd1b8f69, 0xdc3a26a6, 0x39e7731e, 0x79515aef, 0xc4b997c1, 0xcc35c04a, 0x304359c6}}, reconnect_backoff = {
    rel_value_us = 0x7d0}}

Florian Dold

2013-11-26 15:42

developer   ~0007705

Should be fixed in r30873.

Bart Polot

2013-11-26 15:49

manager   ~0007706

Fixed at some point in the past...

Issue History

Date Modified Username Field Change
2013-07-23 00:16 Bart Polot New Issue
2013-07-23 00:16 Bart Polot Status new => assigned
2013-07-23 00:16 Bart Polot Assigned To => Bart Polot
2013-09-22 17:56 Christian Grothoff Target Version Git master => 0.10.0
2013-09-22 21:25 Christian Grothoff Relationship added child of 0002565
2013-11-15 13:07 Bart Polot Note Added: 0007639
2013-11-26 02:56 Bart Polot Note Added: 0007688
2013-11-26 02:56 Bart Polot Status assigned => feedback
2013-11-26 13:34 Bart Polot Note Added: 0007692
2013-11-26 13:34 Bart Polot Status feedback => assigned
2013-11-26 13:34 Bart Polot Assigned To Bart Polot => Florian Dold
2013-11-26 13:34 Bart Polot Status assigned => feedback
2013-11-26 14:37 Florian Dold Note Added: 0007694
2013-11-26 14:40 Bart Polot Note Added: 0007695
2013-11-26 14:40 Bart Polot Status feedback => assigned
2013-11-26 14:42 Florian Dold Note Added: 0007696
2013-11-26 14:43 Bart Polot Note Added: 0007697
2013-11-26 14:45 Bart Polot Note Added: 0007698
2013-11-26 14:52 Florian Dold Note Added: 0007699
2013-11-26 15:27 Bart Polot Note Added: 0007703
2013-11-26 15:29 Bart Polot Note Added: 0007704
2013-11-26 15:42 Florian Dold Note Added: 0007705
2013-11-26 15:49 Bart Polot Note Added: 0007706
2013-11-26 15:49 Bart Polot Status assigned => resolved
2013-11-26 15:49 Bart Polot Fixed in Version => Git master
2013-11-26 15:49 Bart Polot Resolution open => fixed
2013-12-08 23:56 Christian Grothoff Fixed in Version Git master => 0.10.0
2013-12-24 20:54 Christian Grothoff Status resolved => closed
2014-05-09 18:34 Christian Grothoff Category mesh service => cadet service