View topic - QNX File Descriptor Leak

QNX File Descriptor Leak

Discussion about the QNX6 OS.

QNX File Descriptor Leak

Postby vjeevana » Wed Dec 14, 2016 9:58 am

down vote
Working on a platform with below details

QNX localhost 6.3.0 2008/01/15-13:30:11EST IXP_23xx armbe

One of our application process leaks file descriptor. We found that file descriptor leakage happens by print "Too many open files" . Then we verified file leakgae be below program (I have pasted only skeleton/logic of the program)

(dir = opendir ("/proc"))
pid = atoi (dirent -> d_name)
sprintf (paths, "/proc/%d/as", pid);
fd = open (paths, O_RDONLY)
devctl (fd, DCMD_PROC_INFO, &info, sizeof (info), 0)
printf("files allocated %u\n",info.num_fdcons)

In QNX we are not able to find out api which will enable us to find out list of file descriptors and their properties opened by the process.(pidin -o is available only from 6.3.2.. we are using 6.3.0 . sin command is also not supported).
New Member
Posts: 3
Joined: Mon Dec 12, 2016 11:07 am

Re: QNX File Descriptor Leak

Postby Tim » Wed Dec 14, 2016 2:26 pm

Why don't you just slay your process's one by one and run your leak detect program after slaying each one.

When you get your file descriptors back then you know which process is leaking.

Senior Member
Posts: 1524
Joined: Wed Mar 10, 2004 12:28 am

Re: QNX File Descriptor Leak

Postby denkelly » Thu Dec 15, 2016 12:59 pm

Try "pidin fds"
Senior Member
Posts: 163
Joined: Sat Aug 02, 2008 3:27 pm

Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 4 guests