|
From: Tom H. <th...@cy...> - 2003-10-19 23:29:19
|
In message <106...@ix...>
Jeremy Fitzhardinge <je...@go...> wrote:
> On Sun, 2003-10-19 at 07:38, Tom Hughes wrote:
>
> > Your commit has finally shown up in the anonymous CVS tree and it
> > all seems to be fine so far, except that valgrind fails unless you
> > have a large soft limit on file descriptors, as follows:
>
> Thanks, I was wondering when this would turn up as a problem. I guess
> I'll have to try and raise the soft limit to at least 1024.
The only problem with that is, of course, that it makes it impossible
to use valgrind on any sort of problem where the number of available
file descriptors affects the behaviour of the program.
I think that probably what needs to be done is something along the
following lines:
- Add a switch (--descriptor-limit?) to control the descriptor
limit that valgrind will try and select
- Make valgrind raise the soft limit to the descriptor limit
chosen by the user using the switch, or 1024 if no switch
- Make the safe_fd routine start allocating FDs from some offset
below the chosen soft limit rather than a fixed point
That should make everything work reasonably well by default whilst
still allowing the user to reduce the limit on the rare occasions
when it is necessary to provoke a bug.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|