On Wed, Dec 27, 2000 at 11:11:12AM -0800, Jeremy Fitzhardinge wrote:
> On Tue, Dec 26, 2000 at 05:43:04PM -0800, Adam J. Richter wrote:
> > I thought I should submit this patch for compiling autofs-4.0.0-pre9
> > under glibc-2.2, in case nobody has done so already.
>
> Actually, there's a better patch. It doesn't need to know OPEN_MAX at
> all. My version has something like:
[...]
OK. Thanks. I basically applied your patch, moving the "+1"
outside of the loop, just because it was eating at me even though
the nanosecond that it will might save is an infinitesmal savings.
I've attached the patch below, just for completeness.
> > Also, I should mention that using the autofs4 module under
> > linux-2.4.0-test13-pre4 causes my desktop machine to hang after
> > about twenty minutes, although it was runing X every time the problem
>
> I haven't seen any reports like this before. I wonder if test13 has
> changed some of the vfs locking rules (again)...
>
> Are the lockups related to mount/umount events, or do they just happen
> spontaneously?
A couple of times my desktop machine would lock up when
I was not using it, although it is possible that some process might
have caused some activity that would trigger the problem, since
many of our home directores are mounted via autofs. I also saw it
lock up at least once when I sent a kill signal to autofs (I think I
sent it a SIGTERM, but it might have been a SIGKILL). I hope this
information is helpful.
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
[EMAIL PROTECTED] \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
--- autofs-4.0.0pre9/modules/lookup_program.c Sat Oct 28 15:43:06 2000
+++ autofs/modules/lookup_program.c Wed Dec 27 12:18:32 2000
@@ -93,6 +93,7 @@
enum state { st_space, st_map, st_done } state;
int quoted = 0;
int ret;
+ int num_fds;
syslog(LOG_DEBUG, MODPREFIX "looking up %s", name);
@@ -141,9 +142,10 @@
files_left = 2;
+ num_fds = (pipefd[0] > epipefd[0] ? pipefd[0] : epipefd[0]) + 1;
while (files_left != 0) {
readfds = ourfds;
- if ( select(OPEN_MAX, &readfds, NULL, NULL, NULL) < 0 &&
+ if ( select(num_fds, &readfds, NULL, NULL, NULL) < 0 &&
errno != EINTR )
break;