[Interest] QNAM::get() spawns three processess and opens file descriptors which I am unable to close

gsmember gs gsmember at hotmail.de
Sun Sep 1 20:18:02 CEST 2013


Hello,I managed to find the "bug".Somewhere in my code I initialized the class posted in the initial mail multiple times. So the QNAM was instanciated multiple times as well.That caused the issue. My mistake.
Thank you for your assistance.
_gs

Date: Sat, 31 Aug 2013 08:09:33 +0200
From: gsmember at hotmail.de
To: interest at qt-project.org; thiago.macieira at intel.com
Subject: Re: [Interest] QNAM::get() spawns three processess and opens file	descriptors which I am unable to close

I changed my application to do nothing after the first get() call. And thererfore there I saw 3 running threads beside the main thread. I will provide a sample, I was a bit busy in the past week.
 
Thank you
 
Thiago Macieira <thiago.macieira at intel.com> schrieb:
 
On quarta-feira, 28 de agosto de 2013 17:11:22, gsmember gs wrote:
> Hi,I wrote a desktop app on Debian5. Right after the first manager->get() I
> opened pstree and htop:root at kvm2:~# pstree | grep votebotserver
> |-screen---votebotserver---4*[{votebotserver}] htop shows me 4 running
> processess as well.
 
Those are threads. Don't kill them.
 
> And after 2 hours, running many
> requests, I hit the user limit of open file descriptors.
 
Please show us a small, self-contained, compilable example of the problem. I
have never heard of file descriptor leakage in Qt.
 
> "lsof | grep resrv" gave me a bunch of open fd's:[...]
> resrv 12701  root   13r     FIFO                0,8      0t0     319902 pipe
> resrv 12701  root   14w     FIFO                0,8      0t0     319902 pipe
 
Those are pipes. They aren't related to QNAM, since QNAM doesn't use pipes.
 
It could be because of the threads. Each thread that you start consumes 2 file
descriptors in the form of pipes (until Qt 5.1 or until a recent enough glib2
in your system, then it's only one). But you said that the number of threads
running was only 3, so that doesn't explain.
 
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130901/e3e7367d/attachment.html>


More information about the Interest mailing list