diff options
author | Dimitri Staessens <[email protected]> | 2018-05-03 10:59:34 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2018-05-03 11:00:58 +0200 |
commit | 711777a4c7665db2d7ec8d05105eee29054c8562 (patch) | |
tree | 170e0cacc7320aa3c93ade01e7b45b36e2fb9e82 /src/ipcpd/normal | |
parent | 5485c380201897792a8e3f49f9b82ff0e99a5369 (diff) | |
download | ouroboros-711777a4c7665db2d7ec8d05105eee29054c8562.tar.gz ouroboros-711777a4c7665db2d7ec8d05105eee29054c8562.zip |
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 <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r-- | src/ipcpd/normal/dht.c | 12 |
1 files 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; |