View Issue Details

IDProjectCategoryView StatusLast Update
0001919GNUnettesting librarypublic2011-11-30 18:38
ReporterLRN Assigned ToLRN  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.9.0Fixed in Version0.9.0 
Summary0001919: Crash in test_dht_multipeer
Descriptionr18222
Additional Information­®п 21 11:57:20-00000000000077183955 util-7344 WARNING `open' failed on file `\\.\pipe\gnunet-10672730922860978176' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:20-00000000000077184059 transport-7784 ERROR Session AA9990 to peer `FC74' ended
­®п 21 11:57:21-00000000000077185348 util-6016 WARNING `open' failed on file `\\.\pipe\gnunet-2589648815548080128' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:21-00000000000077185466 transport-7040 ERROR Session 1E39C88 to peer `B3CP' ended
­®п 21 11:57:22-00000000000077186463 transport-7040 ERROR Session 79C698 to peer `OH4T' ended
­®п 21 11:57:22-00000000000077186463 transport-7040 ERROR Session 79F6D8 to peer `2TTQ' ended
­®п 21 11:57:22-00000000000077186466 transport-7040 ERROR Session 79EF38 to peer `2GDS' ended
­®п 21 11:57:22-00000000000077186466 transport-7040 ERROR Session 1E39C88 to peer `4Q99' ended
­®п 21 11:57:22-00000000000077186750 util-10216 WARNING `open' failed on file `\\.\pipe\gnunet-4342165503113552384' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:22-00000000000077186867 transport-3264 ERROR Session A797A8 to peer `KJI3' ended
­®п 21 11:57:24-00000000000077188150 util-9624 WARNING `open' failed on file `\\.\pipe\gnunet-10680049495600570368' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:24-00000000000077188276 transport-9944 ERROR Session 6995D0 to peer `9P6V' ended
­®п 21 11:57:25-00000000000077189277 transport-9944 ERROR Session 69D0D0 to peer `2GDS' ended
­®п 21 11:57:25-00000000000077189279 transport-9944 ERROR Session 699760 to peer `OH4T' ended
­®п 21 11:57:25-00000000000077189279 transport-9944 ERROR Session 69C8C0 to peer `4Q99' ended
­®п 21 11:57:25-00000000000077189279 transport-9944 ERROR Session 69D640 to peer `GHT1' ended
­®п 21 11:57:25-00000000000077189287 transport-9944 ERROR Session 69ED30 to peer `2TTQ' ended
­®п 21 11:57:25-00000000000077189290 transport-9944 ERROR Session 69E7C0 to peer `2UVH' ended
­®п 21 11:57:25-00000000000077189554 util-8056 WARNING `open' failed on file `\\.\pipe\gnunet-9598589631542339584' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:25-00000000000077189664 transport-9352 ERROR Session 59CBA8 to peer `4Q99' ended
­®п 21 11:57:26-00000000000077190667 transport-9352 ERROR Session 59CD38 to peer `GHT1' ended
­®п 21 11:57:26-00000000000077190667 transport-9352 ERROR Session 59EE20 to peer `2UVH' ended
­®п 21 11:57:26-00000000000077190668 transport-9352 ERROR Session 59E950 to peer `2GDS' ended
­®п 21 11:57:26-00000000000077190668 transport-9352 ERROR Session 59F470 to peer `2TTQ' ended
­®п 21 11:57:26-00000000000077190671 transport-9352 ERROR Session 59C180 to peer `OH4T' ended
­®п 21 11:57:27-00000000000077190952 util-7608 WARNING `open' failed on file `\\.\pipe\gnunet-10685679166938718208' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:27-00000000000077191070 transport-6096 ERROR Session 3AD698 to peer `2UVH' ended
­®п 21 11:57:28-00000000000077192055 transport-6096 ERROR Session 3A9920 to peer `OH4T' ended
­®п 21 11:57:28-00000000000077192068 transport-6096 ERROR Session 3AC698 to peer `GHT1' ended
­®п 21 11:57:28-00000000000077192068 transport-6096 ERROR Session 3AAAC8 to peer `2GDS' ended
­®п 21 11:57:28-00000000000077192068 transport-6096 ERROR Session 3ADA48 to peer `2TTQ' ended
­®п 21 11:57:28-00000000000077192355 util-11052 WARNING `open' failed on file `\\.\pipe\gnunet-14855013759971127296' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:28-00000000000077192476 transport-8232 ERROR Session 78DD00 to peer `2GDS' ended
­®п 21 11:57:28-00000000000077192605 test-dht-multipeer-6452 WARNING Failing peer group startup with error: `from continue startup (timeout)'!
­®п 21 11:57:28-00000000000077192666 transport-9944 ERROR Session 69E380 to peer `FC74' ended
­®п 21 11:57:28-00000000000077192666 transport-7040 ERROR Session 79FB90 to peer `FC74' ended
­®п 21 11:57:28-00000000000077192666 transport-9944 ERROR Session 69CF40 to peer `FC74' ended
­®п 21 11:57:28-00000000000077192666 transport-7040 ERROR Session 79E950 to peer `FC74' ended
­®п 21 11:57:28-00000000000077192765 transport-8232 ERROR Session 1D69290 to peer `B3CP' ended
­®п 21 11:57:28-00000000000077192765 transport-9352 ERROR Session 499BA0 to peer `B3CP' ended
­®п 21 11:57:29-00000000000077192930 test-dht-multipeer-6452 ERROR Assertion failed at testing_group.c:5443.
­®п 21 11:57:29-00000000000077193472 transport-8232 ERROR Session 78C3C8 to peer `OH4T' ended
­®п 21 11:57:29-00000000000077193483 transport-8232 ERROR Session 78D338 to peer `GHT1' ended
­®п 21 11:57:29-00000000000077193483 transport-8232 ERROR Session 78DD00 to peer `2TTQ' ended
­®п 21 11:57:29-00000000000077193756 util-6332 WARNING `open' failed on file `\\.\pipe\gnunet-16607530447536599040' at os_priority.c:124 with error: No such file or directory
­®п 21 11:57:29-00000000000077193868 transport-5452 ERROR Session 72DB98 to peer `GHT1' ended
­®п 21 11:57:30-00000000000077194864 transport-5452 ERROR Session 1D9A178 to peer `2TTQ' ended
­®п 21 11:57:30-00000000000077194866 transport-5452 ERROR Session 72E1D8 to peer `FC74' ended
­®п 21 11:57:30-00000000000077194869 transport-5452 ERROR Session 72B808 to peer `OH4T' ended

Program received signal SIGTRAP, Trace/breakpoint trap.
0x7522280d in KERNELBASE!DeleteAce () from E:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0 0x7522280d in KERNELBASE!DeleteAce () from E:\Windows\syswow64\KernelBase.dll
#1 0x62486564 in GNUNET_abort () at common_logging.c:271
#2 0x6ec12efd in _fu671__skip_log () at testing_group.c:5443
#3 0x6ec17a83 in _fu815__skip_log () at testing_group.c:6978
#4 0x624b3bab in run_ready (rs=0x20e4b58, ws=0x20e4c80) at scheduler.c:684
#5 0x624b42f3 in GNUNET_SCHEDULER_run (task=0x624ada68 <program_main>, task_cls=0x28fdec) at scheduler.c:864
#6 0x624ae27d in GNUNET_PROGRAM_run (argc=5, argv=0x28feb0, binaryName=0x406761 "test-dht-multipeer", binaryHelp=0x40675a "nohelp", options=0x28fe94, task=0x4037bd <run>, task_cls=0x408078) at program.c:250
#7 0x00403a6c in check () at test_dht_multipeer.c:803
#8 0x00403b2c in main (argc=1, argv=0x20e32b8) at test_dht_multipeer.c:828
(gdb) up 2
#2 0x6ec12efd in _fu671__skip_log () at testing_group.c:5443
5443 GNUNET_assert (pos != NULL);
(gdb) l
5438 struct OutstandingSSH *pos;
5439
5440 pos = pg->ssh_head;
5441 while ((pos != NULL) && (strcmp (pos->hostname, hostname) != 0))
5442 pos = pos->next;
5443 GNUNET_assert (pos != NULL);
5444 return pos->outstanding;
5445 }
5446
5447 /**
(gdb) p *pg
$2 = {cfg = 0x20e4590, cc_head = 0x0, cc_tail = 0x0, notify_connection = 0x6ec18aaf <internal_topology_callback>, notify_connection_cls = 0x20e4ec0, hosts = 0x0, num_hosts = 0, peers = 0x20e5188, total = 10, max_timeout = {
    abs_value = 1321862248726}, starting = 4294967294, started = 10, max_outstanding_connections = 50, max_concurrent_ssh = 1, outstanding_connects = 0, remaining_hellos = 0, total_connects_scheduled = 0,
  hostkey_data = 0x2680020 "\003’\001", ssh_head = 0x0, ssh_tail = 0x0, stop_connects = 0, ct_ctx = {remaining_connections = 0, pg = 0x0, connect_timeout = {rel_value = 0}, connect_attempts = 0, notify_connections_done = 0,
    notify_cls = 0x0}}
TagsNo tags attached.
Attached Files
crashinfo11.txt (7,458 bytes)   
��� 21 11:57:20-00000000000077183955 util-7344 WARNING `open' failed on file `\\.\pipe\gnunet-10672730922860978176' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:20-00000000000077184059 transport-7784 ERROR Session AA9990 to peer `FC74' ended 
��� 21 11:57:21-00000000000077185348 util-6016 WARNING `open' failed on file `\\.\pipe\gnunet-2589648815548080128' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:21-00000000000077185466 transport-7040 ERROR Session 1E39C88 to peer `B3CP' ended 
��� 21 11:57:22-00000000000077186463 transport-7040 ERROR Session 79C698 to peer `OH4T' ended 
��� 21 11:57:22-00000000000077186463 transport-7040 ERROR Session 79F6D8 to peer `2TTQ' ended 
��� 21 11:57:22-00000000000077186466 transport-7040 ERROR Session 79EF38 to peer `2GDS' ended 
��� 21 11:57:22-00000000000077186466 transport-7040 ERROR Session 1E39C88 to peer `4Q99' ended 
��� 21 11:57:22-00000000000077186750 util-10216 WARNING `open' failed on file `\\.\pipe\gnunet-4342165503113552384' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:22-00000000000077186867 transport-3264 ERROR Session A797A8 to peer `KJI3' ended 
��� 21 11:57:24-00000000000077188150 util-9624 WARNING `open' failed on file `\\.\pipe\gnunet-10680049495600570368' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:24-00000000000077188276 transport-9944 ERROR Session 6995D0 to peer `9P6V' ended 
��� 21 11:57:25-00000000000077189277 transport-9944 ERROR Session 69D0D0 to peer `2GDS' ended 
��� 21 11:57:25-00000000000077189279 transport-9944 ERROR Session 699760 to peer `OH4T' ended 
��� 21 11:57:25-00000000000077189279 transport-9944 ERROR Session 69C8C0 to peer `4Q99' ended 
��� 21 11:57:25-00000000000077189279 transport-9944 ERROR Session 69D640 to peer `GHT1' ended 
��� 21 11:57:25-00000000000077189287 transport-9944 ERROR Session 69ED30 to peer `2TTQ' ended 
��� 21 11:57:25-00000000000077189290 transport-9944 ERROR Session 69E7C0 to peer `2UVH' ended 
��� 21 11:57:25-00000000000077189554 util-8056 WARNING `open' failed on file `\\.\pipe\gnunet-9598589631542339584' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:25-00000000000077189664 transport-9352 ERROR Session 59CBA8 to peer `4Q99' ended 
��� 21 11:57:26-00000000000077190667 transport-9352 ERROR Session 59CD38 to peer `GHT1' ended 
��� 21 11:57:26-00000000000077190667 transport-9352 ERROR Session 59EE20 to peer `2UVH' ended 
��� 21 11:57:26-00000000000077190668 transport-9352 ERROR Session 59E950 to peer `2GDS' ended 
��� 21 11:57:26-00000000000077190668 transport-9352 ERROR Session 59F470 to peer `2TTQ' ended 
��� 21 11:57:26-00000000000077190671 transport-9352 ERROR Session 59C180 to peer `OH4T' ended 
��� 21 11:57:27-00000000000077190952 util-7608 WARNING `open' failed on file `\\.\pipe\gnunet-10685679166938718208' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:27-00000000000077191070 transport-6096 ERROR Session 3AD698 to peer `2UVH' ended 
��� 21 11:57:28-00000000000077192055 transport-6096 ERROR Session 3A9920 to peer `OH4T' ended 
��� 21 11:57:28-00000000000077192068 transport-6096 ERROR Session 3AC698 to peer `GHT1' ended 
��� 21 11:57:28-00000000000077192068 transport-6096 ERROR Session 3AAAC8 to peer `2GDS' ended 
��� 21 11:57:28-00000000000077192068 transport-6096 ERROR Session 3ADA48 to peer `2TTQ' ended 
��� 21 11:57:28-00000000000077192355 util-11052 WARNING `open' failed on file `\\.\pipe\gnunet-14855013759971127296' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:28-00000000000077192476 transport-8232 ERROR Session 78DD00 to peer `2GDS' ended 
��� 21 11:57:28-00000000000077192605 test-dht-multipeer-6452 WARNING Failing peer group startup with error: `from continue startup (timeout)'!
��� 21 11:57:28-00000000000077192666 transport-9944 ERROR Session 69E380 to peer `FC74' ended 
��� 21 11:57:28-00000000000077192666 transport-7040 ERROR Session 79FB90 to peer `FC74' ended 
��� 21 11:57:28-00000000000077192666 transport-9944 ERROR Session 69CF40 to peer `FC74' ended 
��� 21 11:57:28-00000000000077192666 transport-7040 ERROR Session 79E950 to peer `FC74' ended 
��� 21 11:57:28-00000000000077192765 transport-8232 ERROR Session 1D69290 to peer `B3CP' ended 
��� 21 11:57:28-00000000000077192765 transport-9352 ERROR Session 499BA0 to peer `B3CP' ended 
��� 21 11:57:29-00000000000077192930 test-dht-multipeer-6452 ERROR Assertion failed at testing_group.c:5443.
��� 21 11:57:29-00000000000077193472 transport-8232 ERROR Session 78C3C8 to peer `OH4T' ended 
��� 21 11:57:29-00000000000077193483 transport-8232 ERROR Session 78D338 to peer `GHT1' ended 
��� 21 11:57:29-00000000000077193483 transport-8232 ERROR Session 78DD00 to peer `2TTQ' ended 
��� 21 11:57:29-00000000000077193756 util-6332 WARNING `open' failed on file `\\.\pipe\gnunet-16607530447536599040' at os_priority.c:124 with error: No such file or directory
��� 21 11:57:29-00000000000077193868 transport-5452 ERROR Session 72DB98 to peer `GHT1' ended 
��� 21 11:57:30-00000000000077194864 transport-5452 ERROR Session 1D9A178 to peer `2TTQ' ended 
��� 21 11:57:30-00000000000077194866 transport-5452 ERROR Session 72E1D8 to peer `FC74' ended 
��� 21 11:57:30-00000000000077194869 transport-5452 ERROR Session 72B808 to peer `OH4T' ended 

Program received signal SIGTRAP, Trace/breakpoint trap.
0x7522280d in KERNELBASE!DeleteAce () from E:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0  0x7522280d in KERNELBASE!DeleteAce () from E:\Windows\syswow64\KernelBase.dll
#1  0x62486564 in GNUNET_abort () at common_logging.c:271
#2  0x6ec12efd in _fu671__skip_log () at testing_group.c:5443
#3  0x6ec17a83 in _fu815__skip_log () at testing_group.c:6978
#4  0x624b3bab in run_ready (rs=0x20e4b58, ws=0x20e4c80) at scheduler.c:684
#5  0x624b42f3 in GNUNET_SCHEDULER_run (task=0x624ada68 <program_main>, task_cls=0x28fdec) at scheduler.c:864
#6  0x624ae27d in GNUNET_PROGRAM_run (argc=5, argv=0x28feb0, binaryName=0x406761 "test-dht-multipeer", binaryHelp=0x40675a "nohelp", options=0x28fe94, task=0x4037bd <run>, task_cls=0x408078) at program.c:250
#7  0x00403a6c in check () at test_dht_multipeer.c:803
#8  0x00403b2c in main (argc=1, argv=0x20e32b8) at test_dht_multipeer.c:828
(gdb) up 2
#2  0x6ec12efd in _fu671__skip_log () at testing_group.c:5443
5443      GNUNET_assert (pos != NULL);
(gdb) l
5438      struct OutstandingSSH *pos;
5439
5440      pos = pg->ssh_head;
5441      while ((pos != NULL) && (strcmp (pos->hostname, hostname) != 0))
5442        pos = pos->next;
5443      GNUNET_assert (pos != NULL);
5444      return pos->outstanding;
5445    }
5446
5447    /**
(gdb) p *pg
$2 = {cfg = 0x20e4590, cc_head = 0x0, cc_tail = 0x0, notify_connection = 0x6ec18aaf <internal_topology_callback>, notify_connection_cls = 0x20e4ec0, hosts = 0x0, num_hosts = 0, peers = 0x20e5188, total = 10, max_timeout = {
    abs_value = 1321862248726}, starting = 4294967294, started = 10, max_outstanding_connections = 50, max_concurrent_ssh = 1, outstanding_connects = 0, remaining_hellos = 0, total_connects_scheduled = 0,
  hostkey_data = 0x2680020 "\003�\001", ssh_head = 0x0, ssh_tail = 0x0, stop_connects = 0, ct_ctx = {remaining_connections = 0, pg = 0x0, connect_timeout = {rel_value = 0}, connect_attempts = 0, notify_connections_done = 0,
    notify_cls = 0x0}}
crashinfo11.txt (7,458 bytes)   
free001.log (1,745 bytes)   
Breakpoint 19, _fu62__skip_log () at testing.c:543
543             GNUNET_free (d);
(gdb) p *d
$44 = {cfg = 0x1fdc398, max_timeout = {abs_value = 1321864807632}, hostname = 0x0, ssh_port_str = 0x0, shortname = 0x1fe6be8 "4Q99", username = 0x0,
  cfgfile = 0x1fdd810 "����������������������������������������������������������������������������������������������������"..., h
ostkey_callback = 0, hostkey_cls = 0x1f660c8, cb = 0, cb_cls = 0x1f660c8, dead_cb = 0, dead_cb_cls = 0x0, update_cb = 0, update_cb_cls = 0x0, proc = 0x2020f10, server = 0x0, th = 0x0, ghh = 0x0, hello = 0x0, pipe_stdout = 0x0,
  churned_services = 0x0, task = 0, id = {hashPubKey = {bits = {613847590, 2744383698, 848979286, 2606256145, 3631842334, 2226204156, 2441098525, 2527043775, 2735421343, 3566635518, 3302156759, 3438031851, 1193159070,
        3844897401, 3634466169, 2993541844}}}, dead = 0, have_hostkey = 1, phase = SP_START_ARMING, hostkeybufpos = 0, running = 0, churn = 0, hostkeybuf = '\000' <repeats 104 times>}
(gdb) p d
$45 = (struct GNUNET_TESTING_Daemon *) 0x1fdd628
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x7522280d in KERNELBASE!DeleteAce () from E:\Windows\syswow64\KernelBase.dll
(gdb) up
#1  0x62486564 in GNUNET_abort () at common_logging.c:271
271       DebugBreak();
(gdb)
#2  0x6ec12d91 in _fu665__skip_log () at testing_group.c:5443
5443      GNUNET_assert (pos != NULL);
(gdb)
#3  0x6ec17917 in _fu809__skip_log () at testing_group.c:6978
6978            (peer_shutdown_ctx->daemon->hostname,
(gdb) p peer_shutdown_ctx->daemon
$46 = (struct GNUNET_TESTING_Daemon *) 0x1fdd628
free001.log (1,745 bytes)   
0001-Don-t-stop-daemons-twice.patch (954 bytes)   
From a08685e6acdc359b8caae98c420bff34a21490ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Sat, 26 Nov 2011 05:07:45 +0400
Subject: [PATCH 1/3] Don't stop daemons twice

---
 src/dht/test_dht_multipeer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index f651923..8de16b3 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -462,7 +462,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_free (test_get);
   }
   ok = 1;
-  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
+  /* testing_peergroup will do that in its own end_badly() handler */
+  /*GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);*/
   pg = NULL;
 }
 
-- 
1.7.4

0002-Fix-dht-multipeer-testing-crash.patch (3,241 bytes)   
From a650784d047ee1e4bed32946d90e239bd50a55aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Sat, 26 Nov 2011 15:53:07 +0400
Subject: [PATCH 2/3] Fix dht multipeer testing crash

---
 src/testing/testing_group.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index db763d2..f22bb2b 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -550,6 +550,12 @@ struct PeerData
    * stagger hostkey generation and peer startup.
    */
   struct InternalStartContext internal_context;
+
+  /**
+   * Task ID for the queued internal_continue_startup task
+   */
+  GNUNET_SCHEDULER_TaskIdentifier startup_task;
+
 };
 
 /**
@@ -5557,6 +5563,7 @@ internal_continue_startup (void *cls,
                            const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct InternalStartContext *internal_context = cls;
+  internal_context->peer->startup_task = GNUNET_SCHEDULER_NO_TASK;
 
   if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
   {
@@ -5579,7 +5586,7 @@ internal_continue_startup (void *cls,
   }
   else
   {
-    GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
+    internal_context->peer->startup_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
                                   (GNUNET_TIME_UNIT_MILLISECONDS, 100),
                                   &internal_continue_startup, internal_context);
   }
@@ -5887,7 +5894,7 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg)
     pg->starting = 0;
     for (i = 0; i < pg->total; i++)
     {
-      GNUNET_SCHEDULER_add_now (&internal_continue_startup,
+      pg->peers[i].startup_task = GNUNET_SCHEDULER_add_now (&internal_continue_startup,
                                 &pg->peers[i].internal_context);
     }
   }
@@ -5895,7 +5902,7 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg)
   pg->starting = 0;
   for (i = 0; i < pg->total; i++)
   {
-    GNUNET_SCHEDULER_add_now (&internal_continue_startup,
+    pg->peers[i].startup_task = GNUNET_SCHEDULER_add_now (&internal_continue_startup,
                               &pg->peers[i].internal_context);
   }
 #endif
@@ -6903,6 +6910,7 @@ internal_shutdown_callback (void *cls, const char *emsg)
   struct PeerShutdownContext *peer_shutdown_ctx = cls;
   struct ShutdownContext *shutdown_ctx = peer_shutdown_ctx->shutdown_ctx;
   unsigned int off;
+  int i;
   struct OutstandingSSH *ssh_pos;
 
   shutdown_ctx->outstanding--;
@@ -6933,6 +6941,11 @@ internal_shutdown_callback (void *cls, const char *emsg)
     else
       shutdown_ctx->cb (shutdown_ctx->cb_cls, NULL);
 
+    for (i = 0; i < shutdown_ctx->pg->total; i++)
+    {
+      if (shutdown_ctx->pg->peers[i].startup_task != GNUNET_SCHEDULER_NO_TASK)
+        GNUNET_SCHEDULER_cancel (shutdown_ctx->pg->peers[i].startup_task);
+    }
     GNUNET_free (shutdown_ctx->pg->peers);
     GNUNET_free_non_null (shutdown_ctx->pg->hostkey_data);
     for (off = 0; off < shutdown_ctx->pg->num_hosts; off++)
-- 
1.7.4

0003-Fix-dht-multipeer-testing-crash-2.patch (1,924 bytes)   
From 36f1683c74b94e70e53471f7f08f6c16e042f562 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Sat, 26 Nov 2011 15:58:11 +0400
Subject: [PATCH 3/3] Fix dht multipeer testing crash #2

---
 src/testing/testing.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/testing/testing.c b/src/testing/testing.c
index 091daf1..f53f14b 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -545,8 +545,16 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
               (NULL ==
                d->hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
               _("`ssh' does not seem to terminate.\n"));
-        GNUNET_CONFIGURATION_destroy (d->cfg);
-        GNUNET_free (d->cfgfile);
+        if (d->cfg != NULL)
+        {
+          GNUNET_CONFIGURATION_destroy (d->cfg);
+          d->cfg = NULL;
+        }
+        if (d->cfgfile != NULL)
+        {
+          GNUNET_free (d->cfgfile);
+          d->cfgfile = NULL;
+        }
         GNUNET_free_non_null (d->hostname);
         GNUNET_free_non_null (d->username);
         GNUNET_free (d->proc);
@@ -730,8 +738,16 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
           GNUNET_TRANSPORT_disconnect (d->th);
           d->th = NULL;
         }
-        GNUNET_CONFIGURATION_destroy (d->cfg);
-        GNUNET_free (d->cfgfile);
+        if (d->cfg != NULL)
+        {
+          GNUNET_CONFIGURATION_destroy (d->cfg);
+          d->cfg = NULL;
+        }
+        if (d->cfgfile != NULL)
+        {
+          GNUNET_free (d->cfgfile);
+          d->cfgfile = NULL;
+        }
         GNUNET_free_non_null (d->hello);
         GNUNET_free_non_null (d->hostname);
         GNUNET_free_non_null (d->username);
-- 
1.7.4

0001-Increase-dht-multipeer-peergroup-timeout.patch (904 bytes)   
From 92643e72c8bf8b08bbadad3481b0f21c8940d0e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Sat, 26 Nov 2011 17:39:53 +0400
Subject: [PATCH] Increase dht multipeer peergroup timeout

---
 src/dht/test_dht_multipeer_data.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/dht/test_dht_multipeer_data.conf b/src/dht/test_dht_multipeer_data.conf
index 941d5bf..bf82678 100644
--- a/src/dht/test_dht_multipeer_data.conf
+++ b/src/dht/test_dht_multipeer_data.conf
@@ -89,7 +89,7 @@ CONNECT_TOPOLOGY = NONE
 
 TOPOLOGY_FILE = multipeer_topo.dat
 MAX_CONCURRENT_SSH = 1
-PEERGROUP_TIMEOUT = 10 s
+PEERGROUP_TIMEOUT = 2400 s
 USE_PROGRESSBARS = YES
 #CONNECT_TOPOLOGY_OPTION = CONNECT_RANDOM_SUBSET
 #CONNECT_TOPOLOGY_OPTION_MODIFIER = 2
-- 
1.7.4

Activities

LRN

2011-11-21 09:15

developer   ~0004950

(gdb) up
#3 0x6ec17917 in _fu809__skip_log () at testing_group.c:6978
6978 (peer_shutdown_ctx->daemon->hostname,
(gdb) l
6973 GNUNET_assert (shutdown_ctx != NULL);
6974
6975 if ((shutdown_ctx->outstanding < shutdown_ctx->pg->max_concurrent_ssh) ||
6976 ((peer_shutdown_ctx->daemon->hostname != NULL) &&
6977 (count_outstanding_at_host
6978 (peer_shutdown_ctx->daemon->hostname,
6979 shutdown_ctx->pg) < shutdown_ctx->pg->max_concurrent_ssh)))
6980 {
6981 if (peer_shutdown_ctx->daemon->hostname != NULL)
6982 increment_outstanding_at_host (peer_shutdown_ctx->daemon->hostname,
(gdb) p peer_shutdown_ctx->daemon->hostname
$1 = 0xfeeefeee <Address 0xfeeefeee out of bounds>
(gdb)

LRN

2011-11-21 09:19

developer   ~0004951

If 0001912 is caused by memory corruption, then this might be the same bug, just manifesting itself differently.

LRN

2011-11-21 09:42

developer   ~0004952

added free001.log, which shows the call that frees the daemon

LRN

2011-11-21 13:37

developer   ~0004953

I've added some debug statements to testing.c, and here's what i've got:

­®п 21 16:27:24-00000000000093392078 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:24-00000000000093392278 test-dht-multipeer-6084 DEBUG start arming 0x736600, 9521 ms left. Process status is 0 1 0
­®п 21 16:27:24-00000000000093392479 test-dht-multipeer-6084 DEBUG start arming 0x736600, 9321 ms left. Process status is 0 1 0
­®п 21 16:27:24-00000000000093392679 test-dht-multipeer-6084 DEBUG start arming 0x736600, 9121 ms left. Process status is 0 1 0
­®п 21 16:27:25-00000000000093392879 test-dht-multipeer-6084 DEBUG start arming 0x736600, 8921 ms left. Process status is 0 1 0
­®п 21 16:27:25-00000000000093393079 test-dht-multipeer-6084 DEBUG start arming 0x736600, 8721 ms left. Process status is 0 1 0
­®п 21 16:27:25-00000000000093393140 util-7540 WARNING `open' failed on file `\\.\pipe\gnunet-3569774595519646720' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:25-00000000000093393279 test-dht-multipeer-6084 DEBUG start arming 0x736600, 8521 ms left. Process status is 1 3 0
­®п 21 16:27:25-00000000000093393279 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:25-00000000000093393279 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:25-00000000000093393279 test-dht-multipeer-6084 DEBUG Connected to transport service `FC74', getting HELLO
­®п 21 16:27:25-00000000000093393279 transport-10720 ERROR Session 56CF40 to peer `FC74' ended
­®п 21 16:27:25-00000000000093393458 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:25-00000000000093393658 test-dht-multipeer-6084 DEBUG start arming 0x736528, 8191 ms left. Process status is 0 1 0
­®п 21 16:27:26-00000000000093393858 test-dht-multipeer-6084 DEBUG start arming 0x736528, 7991 ms left. Process status is 0 1 0
­®п 21 16:27:26-00000000000093394058 test-dht-multipeer-6084 DEBUG start arming 0x736528, 7791 ms left. Process status is 0 1 0
­®п 21 16:27:26-00000000000093394258 test-dht-multipeer-6084 DEBUG start arming 0x736528, 7591 ms left. Process status is 0 1 0
­®п 21 16:27:26-00000000000093394458 test-dht-multipeer-6084 DEBUG start arming 0x736528, 7391 ms left. Process status is 0 1 0
­®п 21 16:27:26-00000000000093394516 util-9364 WARNING `open' failed on file `\\.\pipe\gnunet-6708879333670971392' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:26-00000000000093394621 transport-7332 ERROR Session 399AD0 to peer `B3CP' ended
­®п 21 16:27:26-00000000000093394658 test-dht-multipeer-6084 DEBUG start arming 0x736528, 7191 ms left. Process status is 1 3 0
­®п 21 16:27:26-00000000000093394658 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:26-00000000000093394658 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:26-00000000000093394658 test-dht-multipeer-6084 DEBUG Connected to transport service `B3CP', getting HELLO
­®п 21 16:27:27-00000000000093394858 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:27-00000000000093395058 test-dht-multipeer-6084 DEBUG start arming 0x6777a0, 6785 ms left. Process status is 0 1 0
­®п 21 16:27:27-00000000000093395258 test-dht-multipeer-6084 DEBUG start arming 0x6777a0, 6585 ms left. Process status is 0 1 0
­®п 21 16:27:27-00000000000093395458 test-dht-multipeer-6084 DEBUG start arming 0x6777a0, 6385 ms left. Process status is 0 1 0
­®п 21 16:27:27-00000000000093395658 test-dht-multipeer-6084 DEBUG start arming 0x6777a0, 6185 ms left. Process status is 0 1 0
­®п 21 16:27:28-00000000000093395858 test-dht-multipeer-6084 DEBUG start arming 0x6777a0, 5985 ms left. Process status is 0 1 0
­®п 21 16:27:28-00000000000093395915 util-8664 WARNING `open' failed on file `\\.\pipe\gnunet-3575404266857794560' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:28-00000000000093396024 transport-8184 ERROR Session 2F860 to peer `2TTQ' ended
­®п 21 16:27:28-00000000000093396058 test-dht-multipeer-6084 DEBUG start arming 0x6777a0, 5785 ms left. Process status is 1 3 0
­®п 21 16:27:28-00000000000093396058 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:28-00000000000093396058 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:28-00000000000093396058 test-dht-multipeer-6084 DEBUG Connected to transport service `2TTQ', getting HELLO
­®п 21 16:27:28-00000000000093396261 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:28-00000000000093396461 test-dht-multipeer-6084 DEBUG start arming 0x731f20, 5345 ms left. Process status is 0 1 0
­®п 21 16:27:28-00000000000093396662 test-dht-multipeer-6084 DEBUG start arming 0x731f20, 5145 ms left. Process status is 0 1 0
­®п 21 16:27:29-00000000000093396862 test-dht-multipeer-6084 DEBUG start arming 0x731f20, 4945 ms left. Process status is 0 1 0
­®п 21 16:27:29-00000000000093397062 test-dht-multipeer-6084 DEBUG start arming 0x731f20, 4745 ms left. Process status is 0 1 0
­®п 21 16:27:29-00000000000093397262 test-dht-multipeer-6084 DEBUG start arming 0x731f20, 4545 ms left. Process status is 0 1 0
­®п 21 16:27:29-00000000000093397319 util-388 WARNING `open' failed on file `\\.\pipe\gnunet-11965303462099759104' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:29-00000000000093397427 transport-11108 ERROR Session 6FC4A0 to peer `KJI3' ended
­®п 21 16:27:29-00000000000093397462 test-dht-multipeer-6084 DEBUG start arming 0x731f20, 4345 ms left. Process status is 1 3 0
­®п 21 16:27:29-00000000000093397462 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:29-00000000000093397462 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:29-00000000000093397462 test-dht-multipeer-6084 DEBUG Connected to transport service `KJI3', getting HELLO
­®п 21 16:27:29-00000000000093397664 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:30-00000000000093397864 test-dht-multipeer-6084 DEBUG start arming 0x731f50, 3949 ms left. Process status is 0 1 0
­®п 21 16:27:30-00000000000093398064 test-dht-multipeer-6084 DEBUG start arming 0x731f50, 3749 ms left. Process status is 0 1 0
­®п 21 16:27:30-00000000000093398264 test-dht-multipeer-6084 DEBUG start arming 0x731f50, 3549 ms left. Process status is 0 1 0
­®п 21 16:27:30-00000000000093398464 test-dht-multipeer-6084 DEBUG start arming 0x731f50, 3349 ms left. Process status is 0 1 0
­®п 21 16:27:30-00000000000093398664 test-dht-multipeer-6084 DEBUG start arming 0x731f50, 3149 ms left. Process status is 0 1 0
­®п 21 16:27:30-00000000000093398722 util-3112 WARNING `open' failed on file `\\.\pipe\gnunet-13717820149665230848' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:31-00000000000093398844 transport-10668 ERROR Session 7AACE0 to peer `9P6V' ended
­®п 21 16:27:31-00000000000093398864 test-dht-multipeer-6084 DEBUG start arming 0x731f50, 2949 ms left. Process status is 1 3 0
­®п 21 16:27:31-00000000000093398864 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:31-00000000000093398864 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:31-00000000000093398864 test-dht-multipeer-6084 DEBUG Connected to transport service `9P6V', getting HELLO
­®п 21 16:27:31-00000000000093399064 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:31-00000000000093399265 test-dht-multipeer-6084 DEBUG start arming 0x6b6ab0, 2575 ms left. Process status is 0 1 0
­®п 21 16:27:31-00000000000093399465 test-dht-multipeer-6084 DEBUG start arming 0x6b6ab0, 2375 ms left. Process status is 0 1 0
­®п 21 16:27:31-00000000000093399665 test-dht-multipeer-6084 DEBUG start arming 0x6b6ab0, 2175 ms left. Process status is 0 1 0
­®п 21 16:27:32-00000000000093399865 test-dht-multipeer-6084 DEBUG start arming 0x6b6ab0, 1975 ms left. Process status is 0 1 0
­®п 21 16:27:32-00000000000093400065 test-dht-multipeer-6084 DEBUG start arming 0x6b6ab0, 1775 ms left. Process status is 0 1 0
­®п 21 16:27:32-00000000000093400123 util-9248 WARNING `open' failed on file `\\.\pipe\gnunet-3582722839597387264' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:32-00000000000093400237 transport-3820 ERROR Session 5EF860 to peer `OH4T' ended
­®п 21 16:27:32-00000000000093400265 test-dht-multipeer-6084 DEBUG start arming 0x6b6ab0, 1575 ms left. Process status is 1 3 0
­®п 21 16:27:32-00000000000093400265 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:32-00000000000093400265 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:32-00000000000093400265 test-dht-multipeer-6084 DEBUG Connected to transport service `OH4T', getting HELLO
­®п 21 16:27:32-00000000000093400466 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:32-00000000000093400665 test-dht-multipeer-6084 DEBUG start arming 0x7322e0, 1153 ms left. Process status is 0 1 0
­®п 21 16:27:33-00000000000093400866 test-dht-multipeer-6084 DEBUG start arming 0x7322e0, 953 ms left. Process status is 0 1 0
­®п 21 16:27:33-00000000000093401066 test-dht-multipeer-6084 DEBUG start arming 0x7322e0, 753 ms left. Process status is 0 1 0
­®п 21 16:27:33-00000000000093401266 test-dht-multipeer-6084 DEBUG start arming 0x7322e0, 553 ms left. Process status is 0 1 0
­®п 21 16:27:33-00000000000093401466 test-dht-multipeer-6084 DEBUG start arming 0x7322e0, 353 ms left. Process status is 0 1 0
­®п 21 16:27:33-00000000000093401524 util-10896 WARNING `open' failed on file `\\.\pipe\gnunet-526937237250652800' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:33-00000000000093401624 transport-2068 ERROR Session 53D6E0 to peer `4Q99' ended
­®п 21 16:27:33-00000000000093401666 test-dht-multipeer-6084 DEBUG start arming 0x7322e0, 153 ms left. Process status is 1 3 0
­®п 21 16:27:33-00000000000093401666 test-dht-multipeer-6084 DEBUG Successfully started `gnunet-arm'.
­®п 21 16:27:33-00000000000093401666 test-dht-multipeer-6084 DEBUG Calling CORE_connect
­®п 21 16:27:33-00000000000093401666 test-dht-multipeer-6084 DEBUG Connected to transport service `4Q99', getting HELLO
­®п 21 16:27:34-00000000000093401783 test-dht-multipeer-6084 WARNING Failing peer group startup with error: `from continue startup (timeout)'!
­®п 21 16:27:34-00000000000093401865 test-dht-multipeer-6084 DEBUG Started `gnunet-arm', waiting for `gnunet-service-core' to be up.
­®п 21 16:27:34-00000000000093402065 test-dht-multipeer-6084 DEBUG start arming 0x732310, 0 ms left. Process status is 0 1 0
­®п 21 16:27:34-00000000000093402114 test-dht-multipeer-6084 ERROR Assertion failed at testing_group.c:5443.
­®п 21 16:27:35-00000000000093402924 util-10356 WARNING `open' failed on file `\\.\pipe\gnunet-3588352510935535104' at os_priority.c:124 with error: No such file or directory
­®п 21 16:27:35-00000000000093403047 transport-6896 ERROR Session 66C370 to peer `2UVH' ended

Note how the timeout gradually runs out. That is, the timeout is about 10 seconds to start ALL nodes, and starting each node takes roughly 1.5 seconds, which means that by the time it gets around starting 8th node, it times out.
That prompts immediate daemon termination, which happens BEFORE peergroup shutdown is performed.

Suggestion: set timeout to ridiculously small value (2, or maybe 1 seconds, depends on your OS and machine) to reproduce this condition, and fix the shutdown sequence to make sure that daemon doesn't get freed until all shutdown procedures that involve it are finished. I'd use reference counting, but it's kinda freaky to use reference counting with just one thread. IMHO, it would be best to make sure that independent pieces don't share the data.

After that, increase the timeout to 20-30 seconds, i think (depends on the number of nodes; would be better to use N*5 seconds, where N is the number of nodes).

LRN

2011-11-26 13:03

developer   ~0004984

Uploaded:
0001-Don-t-stop-daemons-twice.patch
0002-Fix-dht-multipeer-testing-crash.patch
0003-Fix-dht-multipeer-testing-crash-2.patch

These fix dht multipeer test crash for me (the test itself still fails, because it doesn't have enough time to start all the peers)

LRN

2011-11-26 14:41

developer   ~0004985

0001-Increase-dht-multipeer-peergroup-timeout.patch increases the timeout for the whole (10 peers) group start from 10 seconds to 2400 seconds (the value 2400 is taken from dht 2dtorus test).

Christian Grothoff

2011-11-26 14:57

manager   ~0004986

All patches applied, waiting for buildbots to confirm that the bugs are gone before closing (SVN 18334--18337).

Issue History

Date Modified Username Field Change
2011-11-21 09:04 LRN New Issue
2011-11-21 09:04 LRN Status new => assigned
2011-11-21 09:04 LRN Assigned To => mrwiggles
2011-11-21 09:04 LRN File Added: crashinfo11.txt
2011-11-21 09:15 LRN Note Added: 0004950
2011-11-21 09:19 LRN Note Added: 0004951
2011-11-21 09:41 LRN File Added: free001.log
2011-11-21 09:42 LRN Note Added: 0004952
2011-11-21 13:37 LRN Note Added: 0004953
2011-11-21 16:16 Christian Grothoff Target Version => 0.9.0
2011-11-24 17:14 Christian Grothoff Target Version 0.9.0 =>
2011-11-26 13:01 LRN File Added: 0001-Don-t-stop-daemons-twice.patch
2011-11-26 13:01 LRN File Added: 0002-Fix-dht-multipeer-testing-crash.patch
2011-11-26 13:01 LRN File Added: 0003-Fix-dht-multipeer-testing-crash-2.patch
2011-11-26 13:03 LRN Note Added: 0004984
2011-11-26 14:41 LRN File Added: 0001-Increase-dht-multipeer-peergroup-timeout.patch
2011-11-26 14:41 LRN Note Added: 0004985
2011-11-26 14:57 Christian Grothoff Note Added: 0004986
2011-11-26 18:33 Christian Grothoff Status assigned => resolved
2011-11-26 18:33 Christian Grothoff Fixed in Version => 0.9.0
2011-11-26 18:33 Christian Grothoff Resolution open => fixed
2011-11-26 18:33 Christian Grothoff Assigned To mrwiggles => LRN
2011-11-29 14:45 Christian Grothoff Target Version => 0.9.0
2011-11-30 18:38 Christian Grothoff Status resolved => closed