From 711777a4c7665db2d7ec8d05105eee29054c8562 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 3 May 2018 10:59:34 +0200 Subject: ipcpd: Don't do lookup with new DT when running The DHT performed a lookup upon a new DT connection when it was running for efficiency reasons. This lookup somehow cause SEGV under stress (rapid bootstrapping of networks). This will be solved with a full revision of the DHT implementation. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/normal/dht.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c index affec434..1e96c94a 100644 --- a/src/ipcpd/normal/dht.c +++ b/src/ipcpd/normal/dht.c @@ -2714,7 +2714,6 @@ static void handle_event(void * self, struct dht * dht = (struct dht *) self; if (event == NOTIFY_DT_CONN_ADD) { - struct lookup * lu; pthread_t thr; struct join_info * info; struct conn * c = (struct conn *) o; @@ -2739,9 +2738,14 @@ static void handle_event(void * self, pthread_detach(thr); break; case DHT_RUNNING: - lu = kad_lookup(dht, dht->id, KAD_FIND_NODE); - if (lu != NULL) - lookup_destroy(lu); + /* + * FIXME: this lookup for effiency reasons + * causes a SEGV when stressed with rapid + * enrollments. + * lu = kad_lookup(dht, dht->id, KAD_FIND_NODE); + * if (lu != NULL) + * lookup_destroy(lu); + */ break; default: break; -- cgit v1.2.3