View Issue Details

IDProjectCategoryView StatusLast Update
0001972GNUnettransport servicepublic2012-02-28 11:05
ReporterChristian Grothoff Assigned ToChristian Grothoff  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version0.9.0 
Target Version0.9.2Fixed in Version0.9.2 
Summary0001972: GNUNET_TRANSPORT_peer- _get_active_addresses does not implement monitor mode (one_shot = NO)
DescriptionThis option is currently not supported (neither by the API nor the service). It is needed for gnunet-peerinfo-gtk.
Additional InformationMonitor mode is supposed to continuously update the client about changes to the set of active addresses. For this to be implemented, the client library needs to be changed to continuously read messages from the service, and the service needs to track clients in monitor mode (in some DLL), send them a message on changes to the active address set (using server_nc's helper functions).
TagsNo tags attached.
Attached Files
gnunet-bug1972-fix.patch (20,262 bytes)   
Index: src/transport/gnunet-service-transport_clients.c
===================================================================
--- src/transport/gnunet-service-transport_clients.c	(revision 19705)
+++ src/transport/gnunet-service-transport_clients.c	(working copy)
@@ -117,6 +117,35 @@
 
 
 /**
+ * Client monitoring changes of active addresses of our neighbours.
+ */
+struct MonitoringClient
+{
+  /**
+   * This is a doubly-linked list.
+   */
+  struct MonitoringClient *next;
+
+  /**
+   * This is a doubly-linked list.
+   */
+  struct MonitoringClient *prev;
+
+  /**
+   * Handle to the client.
+   */
+  struct GNUNET_SERVER_Client *client;
+
+  /**
+   * Peer identity to monitor the addresses of.
+   * Zero to monitor all neighrours.
+   */
+  struct GNUNET_PeerIdentity peer;
+
+};
+
+
+/**
  * Head of linked list of all clients to this service.
  */
 static struct TransportClient *clients_head;
@@ -127,6 +156,23 @@
 static struct TransportClient *clients_tail;
 
 /**
+ * Head of linked list of monitoring clients.
+ */
+static struct MonitoringClient *monitoring_clients_head;
+
+/**
+ * Tail of linked list of monitoring clients.
+ */
+static struct MonitoringClient *monitoring_clients_tail;
+
+/**
+ * Notification context, to send updates on changes to active addresses
+ * of our neighbours.
+ */
+struct GNUNET_SERVER_NotificationContext *nc = NULL;
+
+
+/**
  * Find the internal handle associated with the given client handle
  *
  * @param client server's client handle to look up
@@ -171,6 +217,60 @@
 
 
 /**
+ * Find the handle to the monitoring client associated with the given
+ * client handle
+ *
+ * @param client server's client handle to look up
+ * @return handle to the monitoring client
+ */
+static struct MonitoringClient *
+lookup_monitoring_client (struct GNUNET_SERVER_Client *client)
+{
+  struct MonitoringClient *mc;
+
+  mc = monitoring_clients_head;
+  while (mc != NULL)
+  {
+    if (mc->client == client)
+      return mc;
+    mc = mc->next;
+  }
+  return NULL;
+}
+
+
+/**
+ * Setup a new monitoring client using the given server client handle and
+ * the peer identity.
+ *
+ * @param client server's client handle to create our internal handle for
+ * @param peer identity of the peer to monitor the addresses of,
+ *             zero to monitor all neighrours.
+ * @return handle to the new monitoring client
+ */
+static struct MonitoringClient *
+setup_monitoring_client (struct GNUNET_SERVER_Client *client,
+                         struct GNUNET_PeerIdentity *peer)
+{
+  struct MonitoringClient *mc;
+
+  GNUNET_assert (lookup_monitoring_client (client) == NULL);
+  mc = GNUNET_malloc (sizeof (struct MonitoringClient));
+  mc->client = client;
+  mc->peer = *peer;
+  GNUNET_CONTAINER_DLL_insert (monitoring_clients_head,
+                               monitoring_clients_tail,
+                               mc);
+  GNUNET_SERVER_notification_context_add (nc, client);
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Client %X started monitoring of the peer `%s'\n",
+              mc, GNUNET_i2s (peer));
+  return mc;
+}
+
+
+/**
  * Function called to notify a client about the socket being ready to
  * queue more data.  "buf" will be NULL and "size" zero if the socket
  * was closed for writing in the meantime.
@@ -287,10 +387,19 @@
 client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client)
 {
   struct TransportClient *tc;
+  struct MonitoringClient *mc;
   struct ClientMessageQueueEntry *mqe;
 
   if (client == NULL)
     return;
+  mc = lookup_monitoring_client (client);
+  if (mc != NULL)
+  {
+    GNUNET_CONTAINER_DLL_remove (monitoring_clients_head,
+                                 monitoring_clients_tail,
+                                 mc);
+    GNUNET_free (mc);
+  }
   tc = lookup_client (client);
   if (tc == NULL)
     return;
@@ -690,6 +799,52 @@
 
 
 /**
+ * Compose AddressIterateResponseMessage using the given peer and address.
+ *
+ * @param peer identity of the peer
+ * @param address the address, NULL on disconnect
+ * @return composed message
+ */
+static struct AddressIterateResponseMessage *
+compose_address_iterate_response_message (const struct GNUNET_PeerIdentity
+                                          *peer,
+                                          const struct GNUNET_HELLO_Address
+                                          *address)
+{
+  struct AddressIterateResponseMessage *msg;
+  size_t size;
+  size_t tlen;
+  size_t alen;
+  char *addr;
+
+  GNUNET_assert (NULL != peer);
+  if (NULL != address)
+  {
+    tlen = strlen (address->transport_name) + 1;
+    alen = address->address_length;
+  }
+  else
+    tlen = alen = 0;
+  size = (sizeof (struct AddressIterateResponseMessage) + alen + tlen);
+  msg = GNUNET_malloc (size);
+  msg->header.size = htons (size);
+  msg->header.type =
+      htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
+  msg->reserved = htonl (0);
+  msg->peer = *peer;
+  msg->addrlen = htonl (alen);
+  msg->pluginlen = htonl (tlen);
+  if (NULL != address)
+  {
+    addr = (char *) &msg[1];
+    memcpy (addr, address->address, alen);
+    memcpy (&addr[alen], address->transport_name, tlen);
+  }
+  return msg;
+}
+
+
+/**
  * Output the active address of connected neighbours to the given client.
  *
  * @param cls the 'struct GNUNET_SERVER_TransmitContext' for transmission to the client
@@ -705,34 +860,10 @@
 {
   struct GNUNET_SERVER_TransmitContext *tc = cls;
   struct AddressIterateResponseMessage *msg;
-  size_t size;
-  size_t tlen;
-  size_t alen;
-  char *addr;
 
-  tlen = strlen (address->transport_name) + 1;
-  alen = address->address_length;
-  size = (sizeof (struct AddressIterateResponseMessage) + alen + tlen);
-  {
-    char buf[size];
-
-    msg = (struct AddressIterateResponseMessage *) buf;
-    msg->reserved = htonl (0);
-    msg->peer = *peer;
-    msg->addrlen = htonl (alen);
-    msg->pluginlen = htonl (tlen);
-    addr = (char *) &msg[1];
-    memcpy (addr, address->address, alen);
-    memcpy (&addr[alen], address->transport_name, tlen);
-    GNUNET_SERVER_transmit_context_append_data (tc,
-                                                &buf[sizeof
-                                                     (struct
-                                                      GNUNET_MessageHeader)],
-                                                size -
-                                                sizeof (struct
-                                                        GNUNET_MessageHeader),
-                                                GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
-  }
+  msg = compose_address_iterate_response_message (peer, address);
+  GNUNET_SERVER_transmit_context_append_message (tc, &msg->header);
+  GNUNET_free (msg);
 }
 
 
@@ -753,6 +884,7 @@
   struct GNUNET_SERVER_TransmitContext *tc;
   struct AddressIterateMessage *msg;
   struct GNUNET_HELLO_Address *address;
+  struct MonitoringClient *mc;
 
   if (ntohs (message->type) != GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE)
   {
@@ -767,13 +899,6 @@
     return;
   }
   msg = (struct AddressIterateMessage *) message;
-  if (GNUNET_YES != ntohl (msg->one_shot))
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Address monitoring not implemented\n");
-    GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-    return;
-  }
   GNUNET_SERVER_disable_receive_done_warning (client);
   tc = GNUNET_SERVER_transmit_context_create (client);
   if (0 == memcmp (&msg->peer, &all_zeros, sizeof (struct GNUNET_PeerIdentity)))
@@ -788,8 +913,25 @@
     if (address != NULL)
       output_address (tc, &msg->peer, NULL, 0, address);
   }
-  GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0,
-                                              GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
+  if (GNUNET_YES != ntohl (msg->one_shot))
+  {
+    mc = lookup_monitoring_client (client);
+    if (mc != NULL)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
+                  "ServerClient %X tried to start monitoring twice (MonitoringClient %X)\n",
+                  client, mc);
+      GNUNET_break (0);
+      GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+      return;
+    }
+    setup_monitoring_client (client, &msg->peer);
+  }
+  else
+  {
+    GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0,
+                                                GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE);
+  }
   GNUNET_SERVER_transmit_context_run (tc, GNUNET_TIME_UNIT_FOREVER_REL);
 }
 
@@ -825,6 +967,7 @@
      sizeof (struct BlacklistMessage)},
     {NULL, NULL, 0, 0}
   };
+  nc = GNUNET_SERVER_notification_context_create (server, 0);
   GNUNET_SERVER_add_handlers (server, handlers);
   GNUNET_SERVER_disconnect_notify (server, &client_disconnect_notification,
                                    NULL);
@@ -837,7 +980,11 @@
 void
 GST_clients_stop ()
 {
-  /* nothing to do */
+  if (NULL != nc)
+  {
+    GNUNET_SERVER_notification_context_destroy (nc);
+    nc = NULL;
+  }
 }
 
 
@@ -881,4 +1028,39 @@
 }
 
 
+/**
+ * Broadcast the new active address to all clients monitoring the peer.
+ *
+ * @param peer peer this update is about (never NULL)
+ * @param address address, NULL on disconnect
+ */
+void
+GST_clients_broadcast_address_notification (const struct GNUNET_PeerIdentity
+                                            *peer,
+                                            const struct GNUNET_HELLO_Address
+                                            *address)
+{
+  struct AddressIterateResponseMessage *msg;
+  struct MonitoringClient *mc;
+  static struct GNUNET_PeerIdentity all_zeros;
+
+  msg = compose_address_iterate_response_message (peer, address);
+  mc = monitoring_clients_head;
+  while (mc != NULL)
+  {
+    if ((0 == memcmp (&mc->peer, &all_zeros,
+                      sizeof (struct GNUNET_PeerIdentity))) ||
+        (0 == memcmp (&mc->peer, peer,
+                      sizeof (struct GNUNET_PeerIdentity))))
+    {
+      GNUNET_SERVER_notification_context_unicast (nc, mc->client,
+                                                  &msg->header, GNUNET_NO);
+    }
+
+    mc = mc->next;
+  }
+  GNUNET_free (msg);
+}
+
+
 /* end of file gnunet-service-transport_clients.c */
Index: src/transport/gnunet-service-transport_clients.h
===================================================================
--- src/transport/gnunet-service-transport_clients.h	(revision 19705)
+++ src/transport/gnunet-service-transport_clients.h	(working copy)
@@ -28,6 +28,7 @@
 
 #include "gnunet_statistics_service.h"
 #include "gnunet_util_lib.h"
+#include "gnunet_hello_lib.h"
 
 
 /**
@@ -68,6 +69,18 @@
                      const struct GNUNET_MessageHeader *msg, int may_drop);
 
 
+/**
+ * Broadcast the new active address to all clients monitoring the peer.
+ *
+ * @param peer peer this update is about (never NULL)
+ * @param address address, NULL on disconnect
+ */
+void
+GST_clients_broadcast_address_notification (const struct GNUNET_PeerIdentity
+                                            *peer,
+                                            const struct GNUNET_HELLO_Address
+                                            *address);
 
+
 #endif
 /* end of file gnunet-service-transport_clients.h */
Index: src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- src/transport/gnunet-service-transport_neighbours.c	(revision 19705)
+++ src/transport/gnunet-service-transport_neighbours.c	(working copy)
@@ -357,7 +357,7 @@
 static struct GNUNET_CONTAINER_MultiHashMap *neighbours;
 
 /**
- * Closure for connect_notify_cb and disconnect_notify_cb
+ * Closure for connect_notify_cb, disconnect_notify_cb and address_change_cb
  */
 static void *callback_cls;
 
@@ -372,6 +372,11 @@
 static GNUNET_TRANSPORT_NotifyDisconnect disconnect_notify_cb;
 
 /**
+ * Function to call when we changed an active address of a neighbour.
+ */
+static GNUNET_TRANSPORT_PeerIterateCallback address_change_cb;
+
+/**
  * counter for connected neighbours
  */
 static int neighbours_connected;
@@ -492,9 +497,12 @@
 static int
 change (struct NeighbourMapEntry *n, int state, int line)
 {
+  int previous_state;
   /* allowed transitions */
   int allowed = GNUNET_NO;
 
+  previous_state = n->state;
+
   switch (n->state)
   {
   case S_NOT_CONNECTED:
@@ -584,8 +592,14 @@
     GNUNET_assert (0);
   }
 
+  if (NULL != address_change_cb)
+  {
+    if (n->state == S_CONNECTED)
+      address_change_cb (callback_cls, &n->id, n->address);
+    else if (previous_state == S_CONNECTED)
+      address_change_cb (callback_cls, &n->id, NULL);
+  }
 
-
   return GNUNET_OK;
 }
 
@@ -839,14 +853,19 @@
  * @param cls closure for callbacks
  * @param connect_cb function to call if we connect to a peer
  * @param disconnect_cb function to call if we disconnect from a peer
+ * @param address_cb function to call if we change an active address
+ *                   of a neighbour
  */
 void
-GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb,
-                      GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb)
+GST_neighbours_start (void *cls,
+                      GNUNET_TRANSPORT_NotifyConnect connect_cb,
+                      GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb,
+                      GNUNET_TRANSPORT_PeerIterateCallback address_cb)
 {
   callback_cls = cls;
   connect_notify_cb = connect_cb;
   disconnect_notify_cb = disconnect_cb;
+  address_change_cb = address_cb;
   neighbours = GNUNET_CONTAINER_multihashmap_create (NEIGHBOUR_TABLE_SIZE);
 }
 
@@ -1164,6 +1183,7 @@
   callback_cls = NULL;
   connect_notify_cb = NULL;
   disconnect_notify_cb = NULL;
+  address_change_cb = NULL;
 }
 
 struct ContinutionContext
@@ -1496,7 +1516,6 @@
       GNUNET_ATS_address_in_use (GST_ats, n->address, n->session, GNUNET_NO);
       n->address_state = UNUSED;
     }
-
   }
 
   /* set new address */
@@ -1511,6 +1530,9 @@
       GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
                                     &neighbour_timeout_task, n);
 
+  if (NULL != address_change_cb && n->state == S_CONNECTED)
+    address_change_cb (callback_cls, &n->id, n->address); 
+
 #if TEST_NEW_CODE
   /* Obtain an session for this address from plugin */
   struct GNUNET_TRANSPORT_PluginFunctions *papi;
Index: src/transport/gnunet-service-transport_neighbours.h
===================================================================
--- src/transport/gnunet-service-transport_neighbours.h	(revision 19705)
+++ src/transport/gnunet-service-transport_neighbours.h	(working copy)
@@ -42,10 +42,13 @@
  * @param cls closure for callbacks
  * @param connect_cb function to call if we connect to a peer
  * @param disconnect_cb function to call if we disconnect from a peer
+ * @param peer_address_cb function to call if a neighbour's active address changes
  */
 void
-GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb,
-                      GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
+GST_neighbours_start (void *cls,
+                      GNUNET_TRANSPORT_NotifyConnect connect_cb,
+                      GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb,
+                      GNUNET_TRANSPORT_PeerIterateCallback peer_address_cb);
 
 
 /**
Index: src/transport/gnunet-service-transport.c
===================================================================
--- src/transport/gnunet-service-transport.c	(revision 19705)
+++ src/transport/gnunet-service-transport.c	(working copy)
@@ -494,6 +494,23 @@
 
 
 /**
+ * Function called to notify transport users that a neighbour peer changed its
+ * active address.
+ *
+ * @param cls closure
+ * @param peer peer this update is about (never NULL)
+ * @param address address, NULL on disconnect
+ */
+static void
+neighbours_address_notification (void *cls,
+                                 const struct GNUNET_PeerIdentity *peer,
+                                 const struct GNUNET_HELLO_Address *address)
+{
+  GST_clients_broadcast_address_notification (peer, address);
+}
+
+
+/**
  * Function called when the service shuts down.  Unloads our plugins
  * and cancels pending validations.
  *
@@ -589,8 +606,10 @@
                     &plugin_env_address_change_notification,
                     &plugin_env_session_end,
                     &plugin_env_address_to_type);
-  GST_neighbours_start (NULL, &neighbours_connect_notification,
-                        &neighbours_disconnect_notification);
+  GST_neighbours_start (NULL,
+                        &neighbours_connect_notification,
+                        &neighbours_disconnect_notification,
+                        &neighbours_address_notification);
   GST_clients_start (server);
   GST_validation_start ();
 }
Index: src/transport/transport_api_address_lookup.c
===================================================================
--- src/transport/transport_api_address_lookup.c	(revision 19705)
+++ src/transport/transport_api_address_lookup.c	(working copy)
@@ -103,9 +103,7 @@
     return;
   }
 
-  if ((size <
-       sizeof (struct GNUNET_MessageHeader) +
-       sizeof (struct AddressIterateResponseMessage)) ||
+  if ((size < sizeof (struct AddressIterateResponseMessage)) ||
       (ntohs (msg->type) !=
        GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE))
   {
@@ -127,28 +125,35 @@
     return;
   }
 
-  addr = (const char *) &air_msg[1];
-  transport_name = &addr[alen];
-
-  if (transport_name[tlen - 1] != '\0')
+  if (alen == 0 && tlen == 0)
   {
-    GNUNET_break_op (0);
-    pal_ctx->cb (pal_ctx->cb_cls, NULL, NULL);
-    GNUNET_TRANSPORT_peer_get_active_addresses_cancel (pal_ctx);
-    return;
+    pal_ctx->cb (pal_ctx->cb_cls, &air_msg->peer, NULL);
   }
+  else
+  {
+    addr = (const char *) &air_msg[1];
+    transport_name = &addr[alen];
 
+    if (transport_name[tlen - 1] != '\0')
+    {
+      GNUNET_break_op (0);
+      pal_ctx->cb (pal_ctx->cb_cls, NULL, NULL);
+      GNUNET_TRANSPORT_peer_get_active_addresses_cancel (pal_ctx);
+      return;
+    }
+
+    /* notify client */
+    address =
+        GNUNET_HELLO_address_allocate (&air_msg->peer, transport_name, addr,
+                                       alen);
+    pal_ctx->cb (pal_ctx->cb_cls, &air_msg->peer, address);
+    GNUNET_HELLO_address_free (address);
+  }
+
   /* expect more replies */
   GNUNET_CLIENT_receive (pal_ctx->client, &peer_address_response_processor,
                          pal_ctx,
                          GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout));
-
-  /* notify client */
-  address =
-      GNUNET_HELLO_address_allocate (&air_msg->peer, transport_name, addr,
-                                     alen);
-  pal_ctx->cb (pal_ctx->cb_cls, &air_msg->peer, address);
-  GNUNET_HELLO_address_free (address);
 }
 
 
@@ -165,7 +170,7 @@
  * @param peer peer identity to look up the addresses of, CHANGE: allow NULL for all (connected) peers
  * @param one_shot GNUNET_YES to return the current state and then end (with NULL+NULL),
  *                 GNUNET_NO to monitor the set of addresses used (continuously, must be explicitly cancelled)
- * @param timeout how long is the lookup allowed to take at most
+ * @param timeout how long is the lookup allowed to take at most (irrelevant if one_shot is set to GNUNET_NO)
  * @param peer_address_callback function to call with the results
  * @param peer_address_callback_cls closure for peer_address_callback
  */
@@ -184,15 +189,11 @@
   struct GNUNET_CLIENT_Connection *client;
   struct GNUNET_TIME_Absolute abs_timeout;
 
-  if (GNUNET_YES != one_shot)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Address monitoring not implemented\n");
-    return NULL;
-  }
   client = GNUNET_CLIENT_connect ("transport", cfg);
   if (client == NULL)
     return NULL;
+  if (GNUNET_YES != one_shot)
+    timeout = GNUNET_TIME_UNIT_FOREVER_REL;
   abs_timeout = GNUNET_TIME_relative_to_absolute (timeout);
   msg.header.size = htons (sizeof (struct AddressIterateMessage));
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE);
gnunet-bug1972-fix.patch (20,262 bytes)   
gnunet-bug1972-gnunet-transport.patch (1,163 bytes)   
Index: src/transport/gnunet-transport.c
===================================================================
--- src/transport/gnunet-transport.c	(revision 19716)
+++ src/transport/gnunet-transport.c	(working copy)
@@ -460,13 +460,11 @@
 }
 
 /**
- * Function to call with a human-readable format of an address
+ * Function to call with a binary address
  *
  * @param cls closure
  * @param peer identity of the peer
- * @param transport name of the plugin
- * @param addr binary address
- * @param addrlen number of bytes in addr
+ * @param address binary address (NULL on disconnect)
  */
 static void
 process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
@@ -474,12 +472,18 @@
 {
   const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
 
-  if ((address == NULL) || (peer == NULL))
+  if (peer == NULL)
   {
     /* done */
     return;
   }
 
+  if (address == NULL)
+  {
+    FPRINTF (stdout, _("Peer `%s' disconnected\n"), GNUNET_i2s (peer));
+    return;
+  }
+
   /* Resolve address to string */
   GNUNET_TRANSPORT_address_to_string (cfg, address, numeric,
                                       GNUNET_TIME_UNIT_MINUTES, &process_string,

Relationships

child of 0001943 closedChristian Grothoff gnunet-gtk gnunet-peerinfo-gtk needs to be fully implemented 

Activities

vminko

2012-02-05 23:36

reporter   ~0005442

The proposed fix is attached.

Christian Grothoff

2012-02-06 14:38

manager   ~0005448

Applied, extended gnunet-transport, now getting this:

==29097== Invalid read of size 8
==29097== at 0x4E34CA5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4024AC: shutdown_task (gnunet-transport.c:503)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097== Address 0x6778b80 is 16 bytes inside a block of size 32 free'd
==29097== at 0x4C268FE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29097== by 0x545503A: GNUNET_xfree_ (common_allocation.c:201)
==29097== by 0x4E34CCD: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:231)
==29097== by 0x4E3457C: peer_address_response_processor (transport_api_address_lookup.c:92)
==29097== by 0x5452B46: receive_helper (client.c:487)
==29097== by 0x545D071: signal_timeout (connection.c:1101)
==29097== by 0x545D29B: receive_ready (connection.c:1160)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097==
==29097== Invalid read of size 4
==29097== at 0x545286C: GNUNET_CLIENT_disconnect (client.c:405)
==29097== by 0x4E34CB5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4024AC: shutdown_task (gnunet-transport.c:503)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097== Address 0x6778ad0 is 128 bytes inside a block of size 136 free'd
==29097== at 0x4C268FE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29097== by 0x545503A: GNUNET_xfree_ (common_allocation.c:201)
==29097== by 0x54529B4: GNUNET_CLIENT_disconnect (client.c:433)
==29097== by 0x4E34CB5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4E3457C: peer_address_response_processor (transport_api_address_lookup.c:92)
==29097== by 0x5452B46: receive_helper (client.c:487)
==29097== by 0x545D071: signal_timeout (connection.c:1101)
==29097== by 0x545D29B: receive_ready (connection.c:1160)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097==
==29097== Invalid read of size 8
==29097== at 0x5452898: GNUNET_CLIENT_disconnect (client.c:410)
==29097== by 0x4E34CB5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4024AC: shutdown_task (gnunet-transport.c:503)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097== Address 0x6778a80 is 48 bytes inside a block of size 136 free'd
==29097== at 0x4C268FE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29097== by 0x545503A: GNUNET_xfree_ (common_allocation.c:201)
==29097== by 0x54529B4: GNUNET_CLIENT_disconnect (client.c:433)
==29097== by 0x4E34CB5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4E3457C: peer_address_response_processor (transport_api_address_lookup.c:92)
==29097== by 0x5452B46: receive_helper (client.c:487)
==29097== by 0x545D071: signal_timeout (connection.c:1101)
==29097== by 0x545D29B: receive_ready (connection.c:1160)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097==
==29097== Invalid read of size 8
==29097== at 0x54528C1: GNUNET_CLIENT_disconnect (client.c:415)
==29097== by 0x4E34CB5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4024AC: shutdown_task (gnunet-transport.c:503)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097== Address 0x6778a50 is 0 bytes inside a block of size 136 free'd
==29097== at 0x4C268FE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29097== by 0x545503A: GNUNET_xfree_ (common_allocation.c:201)
==29097== by 0x54529B4: GNUNET_CLIENT_disconnect (client.c:433)
==29097== by 0x4E34CB5: GNUNET_TRANSPORT_peer_get_active_addresses_cancel (transport_api_address_lookup.c:230)
==29097== by 0x4E3457C: peer_address_response_processor (transport_api_address_lookup.c:92)
==29097== by 0x5452B46: receive_helper (client.c:487)
==29097== by 0x545D071: signal_timeout (connection.c:1101)
==29097== by 0x545D29B: receive_ready (connection.c:1160)
==29097== by 0x54837F5: run_ready (scheduler.c:684)
==29097== by 0x5483FCF: GNUNET_SCHEDULER_run (scheduler.c:874)
==29097== by 0x547DF54: GNUNET_PROGRAM_run (program.c:250)
==29097== by 0x402763: main (gnunet-transport.c:608)
==29097==

Christian Grothoff

2012-02-06 22:33

manager   ~0005451

Possible fix in SVN 19714.

Christian Grothoff

2012-02-06 22:38

manager   ~0005452

Fixed a regression against the original patch that I had introduced in SVN 19715. Now it seems to work nicely.

vminko

2012-02-07 03:35

reporter   ~0005454

Small fix for gnunet-transport (regarding SVN 19707).

Christian Grothoff

2012-02-07 11:24

manager   ~0005455

Patch applied in SVN 19717.

Issue History

Date Modified Username Field Change
2011-12-01 10:11 Christian Grothoff New Issue
2011-12-01 10:11 Christian Grothoff Status new => assigned
2011-12-01 10:11 Christian Grothoff Assigned To => Matthias Wachs
2011-12-08 16:51 Christian Grothoff Relationship added child of 0001943
2011-12-10 18:45 Christian Grothoff Assigned To Matthias Wachs =>
2011-12-10 18:45 Christian Grothoff Priority urgent => normal
2011-12-10 18:45 Christian Grothoff Status assigned => confirmed
2011-12-10 18:45 Christian Grothoff Additional Information Updated
2011-12-10 19:24 Christian Grothoff Summary GNUNET_TRANSPORT_peer_get_active_addresses does not implement monitor mode (one_shot = NO) => GNUNET_TRANSPORT_peer- _get_active_addresses does not implement monitor mode (one_shot = NO)
2011-12-23 11:01 Christian Grothoff Target Version 0.9.1 => 0.9.2
2012-01-15 21:49 Christian Grothoff Target Version 0.9.2 => 0.9.3
2012-02-05 23:36 vminko File Added: gnunet-bug1972-fix.patch
2012-02-05 23:36 vminko Note Added: 0005442
2012-02-06 14:38 Christian Grothoff Note Added: 0005448
2012-02-06 22:33 Christian Grothoff Note Added: 0005451
2012-02-06 22:38 Christian Grothoff Note Added: 0005452
2012-02-06 22:38 Christian Grothoff Status confirmed => resolved
2012-02-06 22:38 Christian Grothoff Fixed in Version => 0.9.2
2012-02-06 22:38 Christian Grothoff Resolution open => fixed
2012-02-06 22:38 Christian Grothoff Assigned To => Christian Grothoff
2012-02-06 23:13 Christian Grothoff Target Version 0.9.3 => 0.9.2
2012-02-07 03:35 vminko Note Added: 0005454
2012-02-07 03:35 vminko Status resolved => feedback
2012-02-07 03:35 vminko Resolution fixed => reopened
2012-02-07 03:36 vminko File Added: gnunet-bug1972-gnunet-transport.patch
2012-02-07 11:24 Christian Grothoff Note Added: 0005455
2012-02-07 11:24 Christian Grothoff Status feedback => assigned
2012-02-07 11:24 Christian Grothoff Status assigned => resolved
2012-02-07 11:24 Christian Grothoff Resolution reopened => fixed
2012-02-28 11:05 Christian Grothoff Status resolved => closed