View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008815 | GNUnet | transport service | public | 2024-05-07 06:03 | 2024-06-08 12:03 |
Reporter | ulfvonbelow | Assigned To | schanzen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86-64 | OS | Guix System | OS Version | a1d711c92e |
Product Version | Git master | ||||
Fixed in Version | 0.21.2 | ||||
Summary | 0008815: ReceiverAddress.d_mq isn't destroyed if it hasn't yet been registered in udp communicator | ||||
Description | Both d_mq and kx_mq are created when the ReceiverAddress is, and kx_mq is immediately registered with the transport api, while d_mq is only registered after the key exchange has completed. Once registered, the transport api takes over the lifetime of the mq, and it is indirectly destroyed via GNUNET_TRANSPORT_communicator_mq_del. If receiver_destroy is called before then, though, d_mq is leaked. | ||||
Steps To Reproduce | 1. Build gnunet with --enable-sanitizer 2. Start the node with gnunet-arm -s 3. Stop the node after a bit with gnunet-arm -e 4. Observe reported memory leak wherever you've configured communicator-udp to log to | ||||
Additional Information | Patch attached. | ||||
Tags | No tags attached. | ||||
Attached Files | 0001-transport-manually-destroy-d_mq-if-not-yet-registere.patch (1,036 bytes)
From bcf3dadf62d3abbfa6a1febf7f65461b452fd336 Mon Sep 17 00:00:00 2001 From: ulfvonbelow <striness@tilde.club> Date: Sun, 5 May 2024 12:03:28 -0500 Subject: [PATCH] transport: manually destroy d_mq if not yet registered. --- src/service/transport/gnunet-communicator-udp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/service/transport/gnunet-communicator-udp.c b/src/service/transport/gnunet-communicator-udp.c index 938e53670..fa5294218 100644 --- a/src/service/transport/gnunet-communicator-udp.c +++ b/src/service/transport/gnunet-communicator-udp.c @@ -911,6 +911,11 @@ receiver_destroy (struct ReceiverAddress *receiver) GNUNET_TRANSPORT_communicator_mq_del (receiver->d_qh); receiver->d_qh = NULL; } + else if (NULL != receiver->d_mq) + { + GNUNET_MQ_destroy (receiver->d_mq); + receiver->d_mq = NULL; + } GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_multihashmap_remove (receivers, &receiver->key, -- 2.41.0 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2024-05-07 06:03 | ulfvonbelow | New Issue | |
2024-05-07 06:03 | ulfvonbelow | File Added: 0001-transport-manually-destroy-d_mq-if-not-yet-registere.patch | |
2024-05-13 10:40 | schanzen | Assigned To | => schanzen |
2024-05-13 10:40 | schanzen | Status | new => resolved |
2024-05-13 10:40 | schanzen | Resolution | open => fixed |
2024-05-13 10:40 | schanzen | Fixed in Version | => 0.21.2 |
2024-05-13 10:40 | schanzen | Note Added: 0022386 | |
2024-06-08 12:03 | schanzen | Note Added: 0022541 | |
2024-06-08 12:03 | schanzen | Status | resolved => closed |