aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO69
-rw-r--r--src/core/core.h4
-rw-r--r--src/core/core_api.c3
-rw-r--r--src/core/gnunet-service-core.c8
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_peer1.conf8
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_peer2.conf8
-rw-r--r--src/include/gnunet_protocols.h5
-rw-r--r--src/topology/gnunet-daemon-topology.c18
8 files changed, 108 insertions, 15 deletions
diff --git a/TODO b/TODO
index a8cfb3766..c9ad21fba 100644
--- a/TODO
+++ b/TODO
@@ -12,15 +12,76 @@ away), in order in which they will likely be done:
12* UPNP [Milan] 12* UPNP [Milan]
13 13
14Urgent items (before announcing ng.gnunet.org): 14Urgent items (before announcing ng.gnunet.org):
15* TEST: 15* topology
16 - topology 16 - needs testing
17 - hostlist 17* hostlist
18 * test fails (peers don't connect quickly, could be topology issue) 18 - test fails (peers don't connect quickly, could be topology issue)
19 - crashes:
20(gdb) print pos
21$1 = (struct GNUNET_TRANSPORT_TransmitHandle *) 0x21
22(gdb) print h
23$2 = (struct GNUNET_TRANSPORT_Handle *) 0x21775d0
24(gdb) print *h
25$3 = {cls = 0x454d414e54534f48, rec = 0x7f66983d7e00 <_IO_stdfile_0_lock>, nc_cb = 0x4010d8 <notify_connect+128>, nd_cb = 0x21, my_hello = 0x736f686c61636f6c, client = 0x7f66983d0074, network_handle = 0x0, connect_wait_head = 0x21, connect_ready_head = 0x21775b0,
26 hwl_head = 0x2177630, sched = 0x2177650, cfg = 0x21, neighbours = 0x54524f5050545448, reconnect_task = 140078617558528, reconnect_delay = {value = 1000}, transmission_scheduled = 33}
27(gdb) ba
28#0 0x00007f6698a2143c in add_neighbour (h=0x21775d0, quota_out=1, latency=..., pid=0x7fff2d320bd0) at transport_api.c:1383
29#1 0x00007f6698a21d70 in demultiplexer (cls=0x21775d0, msg=0x7fff2d320bc0) at transport_api.c:1645
30#2 0x00007f66985ed452 in receive_task (cls=0x2177470, tc=0x7fff2d320ca0) at client.c:491
31#3 0x00007f6698609caa in run_ready (sched=0x7fff2d320d10) at scheduler.c:482
32#4 0x00007f669860a0ba in GNUNET_SCHEDULER_run (task=0x7f66986069a8 <program_main>, task_cls=0x7fff2d320f20) at scheduler.c:609
33#5 0x00007f6698606ffc in GNUNET_PROGRAM_run (argc=5, argv=0x7fff2d321000, binaryName=0x401b3f "st-gnunetd-hostlist-peer-2", binaryHelp=0x401b86 "", options=0x7fff2d320fc0, task=0x401638 <run+128>, task_cls=0x602360) at program.c:223
34
19* CORE: 35* CORE:
20 - soliciting traffic for clients that registered for it is not implemented 36 - soliciting traffic for clients that registered for it is not implemented
21 (in the service, client API supports GNUNET_MESSAGE_TYPE_CORE_SOLICIT_TRAFFIC 37 (in the service, client API supports GNUNET_MESSAGE_TYPE_CORE_SOLICIT_TRAFFIC
22 but never receives any such messages); how to avoid busy-waiting here 38 but never receives any such messages); how to avoid busy-waiting here
23 is a good question (solicit => nothing, when to solicit again???) 39 is a good question (solicit => nothing, when to solicit again???)
40 - crashes:
41#0 0x00007ffff7072f55 in *__GI_raise (sig=<value optimized out>)
42 at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
43#1 0x00007ffff7075d90 in *__GI_abort () at abort.c:88
44#2 0x00007ffff7bdfc68 in produce_configure_message (cls=0x61c480, size=65536,
45 buf=0x65a008) at core_api.c:932
46#3 0x00007ffff7bde53c in request_start (cls=0x6213c0, size=65536,
47 buf=0x65a008) at core_api.c:336
48#4 0x00007ffff75a6c90 in client_notify (cls=0x634110, size=65536,
49 buf=0x65a008) at client.c:822
50#5 0x00007ffff75ac3f8 in process_notify (sock=0x659f30) at connection.c:1218
51#6 0x00007ffff75ac7f3 in transmit_ready (cls=0x659f30, tc=0x7fffffffdbe0)
52 at connection.c:1358
53#7 0x00007ffff75c2caa in run_ready (sched=0x7fffffffdc50) at scheduler.c:482
54#8 0x00007ffff75c30ba in GNUNET_SCHEDULER_run (
55 task=0x7ffff75bf9a8 <program_main>, task_cls=0x7fffffffde60)
56 at scheduler.c:609
57#9 0x00007ffff75bfffc in GNUNET_PROGRAM_run (argc=5, argv=0x7fffffffe018,
58 binaryName=0x403fbb "topology",
59 binaryHelp=0x403f78 "GNUnet topology control (maintaining P2P mesh and F2F constraints)", options=0x6048c0, task=0x4031fd <run>, task_cls=0x0)
60 at program.c:223
61#10 0x000000000040353c in main (argc=5, argv=0x7fffffffe018)
62 at gnunet-daemon-topology.c:1303
63* TRANSPORT:
64 - crashes:
65(gdb) ba
66#0 0x00007ffff5d0d3d4 in disconnect_session (session=0x656700)
67 at plugin_transport_tcp.c:797
68#1 0x00007ffff5d0d74c in session_try_connect (cls=0x656700, peer=0x0,
69 hello=0x0, trust=0) at plugin_transport_tcp.c:990
70#2 0x00007ffff7bdf26e in info_handler (cls=0x6306e0, msg=0x7fffffffda60)
71 at peerinfo_api.c:180
72#3 0x00007ffff79b0452 in receive_task (cls=0x69ec40, tc=0x7fffffffdb00)
73 at client.c:491
74#4 0x00007ffff79cccaa in run_ready (sched=0x7fffffffdb70) at scheduler.c:482
75#5 0x00007ffff79cd0ba in GNUNET_SCHEDULER_run (
76 task=0x7ffff79d1898 <service_task>, task_cls=0x7fffffffde10)
77 at scheduler.c:609
78#6 0x00007ffff79d27e1 in GNUNET_SERVICE_run (argc=3, argv=0x7fffffffe028,
79 serviceName=0x405e6b "transport", opt=GNUNET_SERVICE_OPTION_NONE,
80 task=0x4055c9 <run>, task_cls=0x0) at service.c:1345
81#7 0x0000000000405870 in main (argc=3, argv=0x7fffffffe028)
82 at gnunet-service-transport.c:2784
83
84
24* FS (basic anonymous FS only) 85* FS (basic anonymous FS only)
25 - implement FS service (P2P operations) 86 - implement FS service (P2P operations)
26 + how to send queries (soliciting is not there in core; do we 87 + how to send queries (soliciting is not there in core; do we
diff --git a/src/core/core.h b/src/core/core.h
index 647d18698..19a090ea0 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -29,12 +29,12 @@
29/** 29/**
30 * General core debugging. 30 * General core debugging.
31 */ 31 */
32#define DEBUG_CORE GNUNET_NO 32#define DEBUG_CORE GNUNET_YES
33 33
34/** 34/**
35 * Debugging interaction core-clients. 35 * Debugging interaction core-clients.
36 */ 36 */
37#define DEBUG_CORE_CLIENT GNUNET_NO 37#define DEBUG_CORE_CLIENT GNUNET_YES
38 38
39/** 39/**
40 * Definition of bits in the InitMessage's options field that specify 40 * Definition of bits in the InitMessage's options field that specify
diff --git a/src/core/core_api.c b/src/core/core_api.c
index febdfaf4b..78c5c030a 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -1110,7 +1110,8 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle,
1110 th->priority = priority; 1110 th->priority = priority;
1111 th->msize = sizeof (struct SendMessage) + notify_size; 1111 th->msize = sizeof (struct SendMessage) + notify_size;
1112 /* was the request queue previously empty? */ 1112 /* was the request queue previously empty? */
1113 if (handle->pending_head == th) 1113 if ( (handle->pending_head == th) &&
1114 (handle->th == NULL) )
1114 trigger_next_request (handle); 1115 trigger_next_request (handle);
1115 return th; 1116 return th;
1116} 1117}
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 1ad5befba..e70afcd77 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -844,6 +844,7 @@ request_transmit (struct Client *client)
844 844
845/** 845/**
846 * Send a message to one of our clients. 846 * Send a message to one of our clients.
847 *
847 * @param client target for the message 848 * @param client target for the message
848 * @param msg message to transmit 849 * @param msg message to transmit
849 * @param can_drop could this message be dropped if the 850 * @param can_drop could this message be dropped if the
@@ -1938,7 +1939,12 @@ handle_client_send (void *cls,
1938 min_prio_prev->next = min_prio_entry->next; 1939 min_prio_prev->next = min_prio_entry->next;
1939 GNUNET_free (min_prio_entry); 1940 GNUNET_free (min_prio_entry);
1940 } 1941 }
1941 1942
1943#if DEBUG_CORE
1944 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1945 "Adding transmission request for `%4s' to queue\n",
1946 GNUNET_i2s (&sm->peer));
1947#endif
1942 e = GNUNET_malloc (sizeof (struct MessageEntry) + msize); 1948 e = GNUNET_malloc (sizeof (struct MessageEntry) + msize);
1943 e->deadline = GNUNET_TIME_absolute_ntoh (sm->deadline); 1949 e->deadline = GNUNET_TIME_absolute_ntoh (sm->deadline);
1944 e->priority = ntohl (sm->priority); 1950 e->priority = ntohl (sm->priority);
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf b/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
index e8db94bc9..25c31358b 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
+++ b/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
@@ -12,7 +12,8 @@ PLUGINS = tcp
12 12
13[arm] 13[arm]
14PORT = 12966 14PORT = 12966
15DEFAULTSERVICES = resolver transport core statistics 15DEFAULTSERVICES = resolver transport core statistics topology
16GLOBAL_PREFIX = xterm -e gdb -x cmd --args
16 17
17[statistics] 18[statistics]
18PORT = 12967 19PORT = 12967
@@ -25,6 +26,7 @@ PORT = 12969
25 26
26[core] 27[core]
27PORT = 12970 28PORT = 12970
29DEBUG = YES
28 30
29[testing] 31[testing]
30WEAKRANDOM = YES 32WEAKRANDOM = YES
@@ -33,3 +35,7 @@ WEAKRANDOM = YES
33HTTPPORT = 12980 35HTTPPORT = 12980
34SERVERS = http://localhost:12981/ 36SERVERS = http://localhost:12981/
35OPTIONS = -b -p 37OPTIONS = -b -p
38BINARY = /home/grothoff/bin/gnunet-daemon-hostlist
39
40[topology]
41DEBUG = YES
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf b/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf
index cb64137e8..8edaa7ca0 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf
+++ b/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf
@@ -12,7 +12,8 @@ PLUGINS = tcp
12 12
13[arm] 13[arm]
14PORT = 22966 14PORT = 22966
15DEFAULTSERVICES = resolver transport core statistics 15DEFAULTSERVICES = resolver transport core statistics topology
16GLOBAL_PREFIX = xterm -e gdb -x cmd --args
16 17
17[statistics] 18[statistics]
18PORT = 22967 19PORT = 22967
@@ -25,6 +26,7 @@ PORT = 22969
25 26
26[core] 27[core]
27PORT = 22970 28PORT = 22970
29DEBUG = YES
28 30
29[testing] 31[testing]
30WEAKRANDOM = YES 32WEAKRANDOM = YES
@@ -33,3 +35,7 @@ WEAKRANDOM = YES
33HTTPPORT = 12981 35HTTPPORT = 12981
34SERVERS = http://localhost:12980/ 36SERVERS = http://localhost:12980/
35OPTIONS = -b -p 37OPTIONS = -b -p
38BINARY = /home/grothoff/bin/gnunet-daemon-hostlist
39
40[topology]
41DEBUG = YES \ No newline at end of file
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index fc73a57c3..8f966c737 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -322,6 +322,10 @@ extern "C"
322 */ 322 */
323#define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84 323#define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
324 324
325/**
326 * Dummy message send by the topology service to create connections.
327 */
328#define GNUNET_MESSAGE_TYPE_TOPOLOGY_DUMMY 91
325 329
326/** 330/**
327 * Message sent by datastore client on join. 331 * Message sent by datastore client on join.
@@ -441,7 +445,6 @@ extern "C"
441 */ 445 */
442#define GNUNET_MESSAGE_TYPE_FS_GET 138 446#define GNUNET_MESSAGE_TYPE_FS_GET 138
443 447
444
445/** 448/**
446 * P2P response with content or active 449 * P2P response with content or active
447 * migration of content. 450 * migration of content.
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index f63cc0d85..ad306e03c 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -251,13 +251,23 @@ static size_t
251ready_callback (void *cls, 251ready_callback (void *cls,
252 size_t size, void *buf) 252 size_t size, void *buf)
253{ 253{
254 struct GNUNET_MessageHeader hdr;
255 if (buf == NULL)
256 {
257#if DEBUG_TOPOLOGY
258 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
259 "Core told us that our attempt to connect failed.\n");
260#endif
261 return 0;
262 }
254#if DEBUG_TOPOLOGY 263#if DEBUG_TOPOLOGY
255 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
256 (buf == NULL) 265 "Sending dummy message to establish connection.\n");
257 ? "Core told us that our attempt to connect failed.\n"
258 : "Core told us that our attempt to connect worked. Good!\n");
259#endif 266#endif
260 return 0; 267 hdr.size = htons (sizeof (struct GNUNET_MessageHeader));
268 hdr.type = htons (GNUNET_MESSAGE_TYPE_TOPOLOGY_DUMMY);
269 memcpy (buf, &hdr, sizeof (struct GNUNET_MessageHeader));
270 return sizeof (struct GNUNET_MessageHeader);
261} 271}
262 272
263 273