Problem in getting File descriptor from pipeline

Keyur Patel keyur.patel at einfochips.com
Mon Jan 6 06:57:57 PST 2014


Hi Sebastian,


That think i already explained.
If terminal is in low memory state in that case there is buffer allocation error from linux kernel. So in such case a free of FD as standard way was not called as its state was different due to memory leak.

Hence we have close whenever error comes.
So its working with patch . I have stress tested my board with this patch its working fine.
Without it its opening lots of dup() fds. Till 1024(Max limit)

Hence i added fallback mechanism in my patch. So i would recommend to integrate it on main source.

Regards,
Keyur

-----Original Message-----
From: gstreamer-devel-bounces at lists.freedesktop.org [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Sebastian Dröge
Sent: 06 January 2014 07:57
To: Discussion of the development of and with GStreamer
Subject: Re: Problem in getting File descriptor from pipeline

On Mo, 2014-01-06 at 17:44 +0530, Keyur Patel wrote:
> Hi,
> 
> Please find attached patch with version.
> 
> This bug is available in latest version code as well. As i have checked for gst-plugin-good code, To close dup-fd is not handled.
> 
> To reproduce bug on arm board do below steps.
> 1) make application which continuously write a file with large chunk and put system on low RAM(memory) state.
> 2) now write simple application with pipeline as i mentioned in previous mail. And continuous try to change state to play to null and null to play.
> 3) print fds of 2nd step application from its code when changing pipeline state.
> 4) In normal case , you will get 2 consecutive  fd are open during play and during null they 2 are freed.
> 	But in low memory case first fd is closed after null state but 2nd one remains open, when you again play another 2 fds (TOTAL 3) shall be created. Hence chain continues.
> 
> Its very critical issue, as embedded system can go to low memory state at any time.

Your patch is not correct as it would cause the fd to be closed multiple times. The correct place for closing the fd is the finalize function of the buffer pool, where it is already closed.

So the problem in your case seems to be that the buffer pool is never released. Can you confirm that? If that's the case you'll have to find the reason why it is leaked.

--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com Expertise, Straight from the Source

*************************************************************************************************************************************************************
eInfochips Business Disclaimer : This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the
  company accepts no liability for any damage caused by any virus transmitted by this email.
*************************************************************************************************************************************************************




*************************************************************************************************************************************************************
eInfochips Business Disclaimer : This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.
*************************************************************************************************************************************************************


---------------------------------------------------------------------------------------------
Notice: 
This message has been scanned by Trend Micro Mail Security scanner and is believed to be clean
---------------------------------------------------------------------------------------------


More information about the gstreamer-devel mailing list