Re: Samba can't keep NT shares mounted

Andrew Pimlott (andrew@pimlott.ne.mediaone.net)
Wed, 22 Sep 1999 13:11:05 -0400


--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii

On Wed, Sep 22, 1999 at 08:17:08AM -0500, Steve Rhodes wrote:
> I read through a bunch of posts on the subject, and I have seen a number of
> theories that the problem might be caused by a period of inactivity, rather
> than heavy network load as I earlier speculated.

Yeah, the darn thing (smbmount) sometimes dies when asked to reconnect.
With--of all things--a SIGPIPE, from trying to print debug output. I
applied the simple attached patch to samba 2.0.5a, and (after a day or so)
the problem is no more. It seems to be a simple typo, since if SMBFS_DEBUG
is defined, we just closed the fd we're trying to print to.

I suspect this the problem for lots of people. If you compiled smbmount
without SMBFS_DEBUG set (the default), and usually see the see the problem
after a period of inactivity (specifically, the second reconnect try by the
kernel fails), and notice that smbmount is dead when the failure happens,
I'd bet this will help.

(I sent this to tridge@samba.org last night and have not heard anything
yet.)

Andrew

--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="smbmount.c.patch"

--- client/smbmount.c.orig Wed Sep 22 03:54:17 1999
+++ client/smbmount.c Wed Sep 22 03:54:20 1999
@@ -350,7 +350,7 @@
/* Wait for a signal from smbfs ... */
CatchSignal(SIGUSR1, &usr1_handler);
pause();
-#ifndef SMBFS_DEBUG
+#ifdef SMBFS_DEBUG
DEBUG(0,("smbmount: got signal, getting new socket\n"));
#endif
}

--Qxx1br4bt0+wmkIi--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/