* [uml-devel] hppfs file descriptor leak?
@ 2004-05-03 16:25 Dan Eaton
2004-05-04 2:21 ` Jeff Dike
2005-09-05 20:35 ` Blaisorblade
0 siblings, 2 replies; 6+ messages in thread
From: Dan Eaton @ 2004-05-03 16:25 UTC (permalink / raw)
To: user-mode-linux-devel
I am attempting to track down an issue that I am seeing but I thought
that I would ask if you have anyone has seen this or has any insight
into the behavior in parallel to my troubleshooting. I am using
hppfs to spoof some /proc entries in the UML. When I mount /proc
with hppfs, however, the system only runs for a short while before
the UML kernel process runs out of file descriptors (1024). It seems
that each access to /proc entries that I am spoofing from the host
results in an open file that never gets closed. I am looking at it
via gdb but any insight that anyone has would be greatly appreciated.
Configuration:
2.4.24-2 for UML
2.4.24 for host with the skas3 patch(same thing seen running tt mode)
The host and UML are running RH9.
(Basically latest and greatest 2.4 stuff I could find.)
Thanks in advance for any help.
--
Dan Eaton <Dan.Eaton@rlx.com>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] hppfs file descriptor leak?
2004-05-03 16:25 [uml-devel] hppfs file descriptor leak? Dan Eaton
@ 2004-05-04 2:21 ` Jeff Dike
2004-05-04 16:01 ` Richard Potter
2005-09-05 20:35 ` Blaisorblade
1 sibling, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2004-05-04 2:21 UTC (permalink / raw)
To: Dan Eaton; +Cc: user-mode-linux-devel
Dan.Eaton@rlx.com said:
> It seems that each access to /proc entries that I am spoofing from the
> host results in an open file that never gets closed. I am looking at
> it via gdb but any insight that anyone has would be greatly
> appreciated.
First I've heard of it, but I'm not too surprised. The thing to do to
track it down is see what file descriptors are being lost by looking at
/proc/<uml-pid>/fd. It should be pretty obvious.
I'll take a look at it when I get a chance.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] hppfs file descriptor leak?
2004-05-04 2:21 ` Jeff Dike
@ 2004-05-04 16:01 ` Richard Potter
2004-05-04 20:39 ` Jeff Dike
0 siblings, 1 reply; 6+ messages in thread
From: Richard Potter @ 2004-05-04 16:01 UTC (permalink / raw)
To: Jeff Dike; +Cc: Dan Eaton, user-mode-linux-devel
In run_helper() in helper.c, fds[0] is never closed. Could this be it?
When debugging sbuml, I had to add this line:
--- helper.c.org Wed May 5 00:46:40 2004
+++ helper.c Wed May 5 00:47:18 2004
@@ -100,6 +100,8 @@
pid = -errno;
}
+ os_close_file(fds[0]); // for sbuml... Is this a uml bug?
+
if(stack_out == NULL) free_stack(stack, 0);
else *stack_out = stack;
return(pid);
change_tramp() in net_user.c also does not close fds[0].
These are in 2.4.23-2.
I don't know if these are related to hppfs, but it may show the pattern
to look for in other code.
--Richard
> Dan.Eaton@rlx.com said:
> > It seems that each access to /proc entries that I am spoofing from the
> > host results in an open file that never gets closed. I am looking at
> > it via gdb but any insight that anyone has would be greatly
> > appreciated.
>
> First I've heard of it, but I'm not too surprised. The thing to do to
> track it down is see what file descriptors are being lost by looking at
> /proc/<uml-pid>/fd. It should be pretty obvious.
>
> I'll take a look at it when I get a chance.
>
> Jeff
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] hppfs file descriptor leak?
2004-05-03 16:25 [uml-devel] hppfs file descriptor leak? Dan Eaton
2004-05-04 2:21 ` Jeff Dike
@ 2005-09-05 20:35 ` Blaisorblade
2005-09-08 17:53 ` Antoine Martin
1 sibling, 1 reply; 6+ messages in thread
From: Blaisorblade @ 2005-09-05 20:35 UTC (permalink / raw)
To: user-mode-linux-devel, Antoine Martin; +Cc: Dan Eaton
On Monday 03 May 2004 18:25, Dan Eaton wrote:
> I am attempting to track down an issue that I am seeing but I thought
> that I would ask if you have anyone has seen this or has any insight
> into the behavior in parallel to my troubleshooting. I am using
> hppfs to spoof some /proc entries in the UML. When I mount /proc
> with hppfs, however, the system only runs for a short while before
> the UML kernel process runs out of file descriptors (1024). It seems
> that each access to /proc entries that I am spoofing from the host
> results in an open file that never gets closed. I am looking at it
> via gdb but any insight that anyone has would be greatly appreciated.
Don't know if this is relevant for you any more (I guess not), but I think I
found it, while working on other stuff.
There's almost no call to close() in hppfs code, and everything matches with
your description. Every time a file is opened in hostfs, an host fd is
allocated where appropriate (for each distinct call to open() in userspace,
even if more calls refer to the same file), and it's leaked.
Antoine, have you a clue why you never hit that? It's there both in 2.4 and
2.6.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] hppfs file descriptor leak?
2005-09-05 20:35 ` Blaisorblade
@ 2005-09-08 17:53 ` Antoine Martin
0 siblings, 0 replies; 6+ messages in thread
From: Antoine Martin @ 2005-09-08 17:53 UTC (permalink / raw)
To: Blaisorblade; +Cc: user-mode-linux-devel, Dan Eaton
> Antoine, have you a clue why you never hit that? It's there both in 2.4 and
> 2.6.
That's because I haven't used it lately, I made sure it worked - but did
not push it, I am still struggling to figure out which libraries need to
be included in the chroot - especially with pcap: building as a 32-bit
app on a 64-bit host was kind of difficult.
I am hoping to get more time to play with this in the next few weeks and
I will keep you posted.
Antoine
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-08 17:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-03 16:25 [uml-devel] hppfs file descriptor leak? Dan Eaton
2004-05-04 2:21 ` Jeff Dike
2004-05-04 16:01 ` Richard Potter
2004-05-04 20:39 ` Jeff Dike
2005-09-05 20:35 ` Blaisorblade
2005-09-08 17:53 ` Antoine Martin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.