View Issue Details

IDProjectCategoryView StatusLast Update
0008979GNUnetutil librarypublic2024-07-09 19:05
Reporterthejackimonster Assigned To 
Status newResolutionopen 
Product VersionGit master 
Summary0008979: MQ: Send fails because envelope queue is not empty
DescriptionI was testing the messenger-gtk application and I assume because the voice chat feature, I'm working on, sends quite a bit of messages, it was possible that the application just crashed because of an assertion in the message queue. I'm not sure whether this is just a missing check in the implementation or not. Because right in front of the assertion, it verifies that there's not current envelope or sending task. However it doesn't actually verify the envelope queue is empty. The assertion just assumes this.

So maybe this is easy to fix by adding a `(NULL != mq->envelope_head)` to the brach and adding a new envelope to the queue in that case.
Steps To ReproduceI randomly ran into this testing around with the Messenger-GTK application. Couldn't easily reproduce it but sometimes it happens.
Additional InformationAssertion that causes the crash:

Messenger-GTK repository:
TagsNo tags attached.



2024-07-01 20:47

developer   ~0022778

I ran into another issue when using the code from gnunet-gtk to merge the g_main_loop from GTK and the scheduler from GNUnet into a single thread. While I could still reproduce the problem described above. At times I also tripped over another assertion in client.c:


2024-07-04 22:26

developer   ~0022786

I've implemented a short patch to fix it and I think that should work out.


2024-07-09 19:05

developer   ~0022804

I've implemented a second patch to optimize sending in the regard that `GNUNET_MQ_send()` will still send a message in case the queue has not been empty. So it won't run into the case of piling up envelopes without sending any.

Issue History

Date Modified Username Field Change
2024-06-25 15:36 thejackimonster New Issue
2024-07-01 20:47 thejackimonster Note Added: 0022778
2024-07-04 22:26 thejackimonster Note Added: 0022786
2024-07-09 19:05 thejackimonster Note Added: 0022804