View topic - QNX File Descriptor Leak
QNX File Descriptor Leak
3 posts
• Page 1 of 1
QNX File Descriptor Leak
down vote
favorite
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).
favorite
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).
- vjeevana
- New Member
- Posts: 3
- Joined: Mon Dec 12, 2016 11:07 am
Re: QNX File Descriptor Leak
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.
Tim
When you get your file descriptors back then you know which process is leaking.
Tim
- Tim
- Senior Member
- Posts: 1519
- Joined: Wed Mar 10, 2004 12:28 am
Re: QNX File Descriptor Leak
Try "pidin fds"
- denkelly
- Senior Member
- Posts: 163
- Joined: Sat Aug 02, 2008 3:27 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests