[libnice] Reliable communication hanging?

Youness Alaoui kakaroto at kakaroto.homelinux.net
Tue Jun 10 21:32:14 PDT 2014


Hi,

The first thing I notice is that you say you send data on
transport_writable signal. I hoep you know/understand that
transport_writable will only be signaled IF you do a send which returns
less than the number of bytes you wanted to send.. So if for example you
want to send 1000 bytes, and the nice_agent_send returned 1000, then
transport_writable will not be signaled.
Either way, it doesn't seem to be your problem since you say you used a
packet sniffer and all the packets got sent.
Which version of libnice are you using? I think it would be important to
know. I believe there was an email recently on the mailing list about the
recv() function only returning when the entire recv buffer is filled,
instead of returning whatever data is available. I'm not sure, but this
could be related. I think Olivier might be able to help, but knowing the
version of libnice you are using will be required before he can determine
the cause.
If you have a way to reproduce the problem, that would be helpful too.

Thanks,
Youness.



On Tue, Jun 10, 2014 at 11:51 AM, Francesco Massei <fmassei at gmail.com>
wrote:

> Hello,
>
> I'm facing a strange issue with libnice that maybe you can help me solve.
>
> I have two peers that, using a reliable agent
> (nice_agent_new_reliable()), communicate between themselves. The first
> (let's call him "A") sends some data using nice_agent_send() on each
> transport_writable signal, the second (let's call him "B") receives
> the data in the callback set with nice_agent_attach_recv().
> "A" always manages to send all the data, while "B", for some reason,
> receives only part of it: sometimes just the initial frames, sometimes
> nearly all of them, but it never manages to get them all.
> Right now I'm making tests running both A and B on the same machine,
> with a packet sniffer open, and:
> - "A" and "B" are both up and running, as I see they keep sending STUN
> messages to each other every now and then.
> - All the packets "A" sends are on the wire
> - If I try to send much more data from "A" (like streaming endlessly
> gibberish) eventually "B" will get everything
> - Waiting for a long time (even minutes) doesn't help
>
> The only hypothesis I can advance is that, for some reason, B waits
> some kind of ACK or SYN that will never arrive as long as A is not
> sending anything.
>
> Any idea on why is this happening and how could I solve it?
>
> Thank you very much!
> Francesco
> _______________________________________________
> nice mailing list
> nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20140611/59e12740/attachment.html>


More information about the nice mailing list