View Issue Details

IDProjectCategoryView StatusLast Update
0008979GNUnetutil librarypublic2024-10-10 10:20
Reporterthejackimonster Assigned Tothejackimonster  
PrioritynormalSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Product VersionGit master 
Fixed in Version0.22.1 
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:
https://git.gnunet.org/gnunet.git/tree/src/lib/util/mq.c#n328

Messenger-GTK repository:
https://git.gnunet.org/messenger-gtk.git/
TagsNo tags attached.

Activities

thejackimonster

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:
https://git.gnunet.org/gnunet.git/tree/src/lib/util/client.c#n849

thejackimonster

2024-07-04 22:26

developer   ~0022786

I've implemented a short patch to fix it and I think that should work out.
https://git.gnunet.org/gnunet.git/commit/?id=4ba0256369aaa141e558329d59df058acd5e3e64

thejackimonster

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.
https://git.gnunet.org/gnunet.git/commit/?id=cc17efdd940dc6abad29e51765d2fbf44953afdd

thejackimonster

2024-09-23 18:42

developer   ~0023355

Has been caused by multi-threading issues on application side.

schanzen

2024-10-10 10:20

administrator   ~0023494

released

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
2024-09-23 18:42 thejackimonster Assigned To => thejackimonster
2024-09-23 18:42 thejackimonster Status new => resolved
2024-09-23 18:42 thejackimonster Resolution open => fixed
2024-09-23 18:42 thejackimonster Fixed in Version => 0.22.1
2024-09-23 18:42 thejackimonster Note Added: 0023355
2024-10-10 10:20 schanzen Note Added: 0023494
2024-10-10 10:20 schanzen Status resolved => closed