gstreamer pipeline EOS deadlock
I have a java app that uses gstreamer to process some audio. My pipeline is:
udpsrc name=side1 address="loadtest3" retrieve-sender-address=false reuse=false port=17840 caps="application/x-rtp, media=(string)audio, payload=0, clock-rate=(int)8000" timeout=10000000000 ! rtppcmudepay ! rtppcmupay min-ptime=1000000000 max-ptime=1000000000 mtu=10012 ! rtppcmudepay ! mulawdec ! interleave name=mix ! mulawenc ! appsink name=appsink wait-on-eos=false emit-signals=true sync=false async=false udpsrc name=side2 address="loadtest3" retrieve-sender-address=false reuse=false port=17842 caps="application/x-rtp, media=(string)audio, payload=0, clock-rate=(int)8000" ! rtppcmudepay ! rtppcmupay min-ptime=1000000000 max-ptime=1000000000 mtu=10012 ! rtppcmudepay ! mulawdec ! mix.
I do have over 200 pipelines running in parrallel and when the code sends an EOS in PLAYING state some of the pipelines are getting deadlocked into the sendEOS request. For example, from 1693 pipelines executed I do get 67 that end-up in that deadlock.
In the end all thread executors will be 'stuck' in the sendEOS and the app fail processing new requests.
What I do not understand is why for some time, some EOS events are processed ok by gstreamer until all are getting in a deadlock in that send EOS event.
If I execute one pipeline there is no issue & the send EOS works ok - or at least I could not reproduce it.