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

gsmember gs gsmember at hotmail.de
Sat Aug 31 08:09:33 CEST 2013


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
-------------- next part --------------
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


More information about the Interest mailing list