ioqueue problem and observations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I recently tested PJSIP (Windows build) on Mac OSX Parallels
virtualized environment. (Yes, I know it's not the greatest idea - and
I will get rid of it at some point.) But this showed couple of problems
with the ioqueue implementation.

Firstly, the default select implementations fails badly. The
virtualized machine will handle the audio data in largeish bursts
causing the sendto() calls to block at some point. It seems that the
select ioqueue in this case queues the work, and expects the main loop
select() to push the backlog. However, in case the main look was in
select() and there's no other activity within short enough time, the
packets get never sent out. This caused the default build to have "one
second of audio, one second of silence" kind of bug. I would expect
that if ioqueue_select.c:ioqueue_add_to_set() was fixed to wakeup
the select() call if it was active on another thread, would fix this
issue.

Then I changed over to ioqueue_winnt.c or iocp mode. This seems to work
(assuming MAX_PENDING in transport_udp.c is large enough). However, it
seems that bad things can happen if MAX_PENDING is too small. Neither
transport_send_rtp() or iocp version of pj_ioqueue_sendto() check if
the op_key was being queued or not causing it to get overwritten.
Preferably, it would be transport_udp.c that checks it since it's
already copying data bytes there.

-Timo



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux