[smbfs] Timing problems with kernel 2.2.x?
Michael H. Warfield
mhw at wittsend.com
Thu Nov 11 15:43:27 GMT 1999
On Fri, Nov 12, 1999 at 12:57:55AM +1100, Marc Haber wrote:
> [Note: This has been posted to linux-kernel and was ignored. Since
> smbfs is maintained by the samba team, I am retrying here]
I saw it over on the kernel mailing list but I think it got
ignored because no one else is doing quite what you are. Quite
frankly, I didn't pay it much attention because I don't use Debian
and I have no clue what apt is doing, so your description of the
problem wasn't very helpful.
> To maintain and install packages from CD-ROM to my Debian/GNU Linux
> system, I use Debian's apt package. Since my Linux box is stowed away
> in a closet, I use an smbfs mount to mount the CD-ROM drive from my
> Windows desktop machine to the Linux box.
What release of Debian?
> This used to work perfectly with kernel 2.0.x. However, kernel 2.2.x
> seems to have introduced some kind of weird timing problem.
> When I register a new CD-ROM with apt, I have to call the program
> "apt-cdrom" with the parameter "add". apt-cdrom umounts the CD-ROM,
> prompts the user to insert the new CD-ROM into the drive, mounts the
> CD-ROM and immediately proceeds to read the directory. This first read
> attempt fails with kernels 2.2.x. I have to disable the umount-mount
> sequence with the parameter "-m" and have the CD-ROM mounted
> previously for the CD-ROM registration to work. stracing apt-cdrom
> shows evidence that the first directory read returns an empty
> directory even if the mount call that was issued immediately before
> succeeded. After that failed directory access and the program's
> termination, the CD-ROM is mounted correctly and can be accessed.
> I now suspect that the 2.2 series smbfs needs some time after the
> mount call returned to actually attach the mounted share to the mount
> point in the local file system. Thus, access attempts issued
> immediately after the mount fail.
When I just now read this I got a real strong sense of deja-vu.
The earlier versions of smbmount in the Samba package (prior to 2.0.2
I believe) did have a timing problem because the smbmount parent process
exited after starting the remount child but before the mount was actually
accomplished. This created exactly the timing problem you described
here. It caused all sorts of havock with autofs. :-) This is actually
what originally got me involved with the Samba team in the first place.
That being said, however, that should have been fixed with
recent versions of smbmount. Some versions had a problem with the
remount process bombing out because of a misplaced debugging print
but Tridge cleaned that up when he reworked the code going into 2.0.6.
AFAIK, there shouldn't be a timing problem remaining, or autofs would
be broken AGAIN for smbmounts. I will however, double check this.
> Re-booting the system with a 2.0 series kernel (and using the correct
> smbmount version for the kernel) makes the problem vanish. It can be
> reproduced with kernel 2.2.12 and 2.2.13 (didn't try any earlier
> releases though) and even with the latest smbmount from samba
> Is this a kernel issue? Any chances to have this fixed in a future
If it's what I think it is then, no, I don't believe it's a
kernel problem. It's an smbmount problem.
But it shouldn't be present with 2.0.6pre3. What is your EXACT
command line to smbmount (minus account names and passwords, of course).
Did you have to change your command parameters to smbmount from
previous versions used with the 2.2.x kernels to the 2.0.6 version of
smbmount? Reason I ask that is that if you didn't, you either aren't
doing what you think you are doing or you haven't changed something you
though you had. The 2.0.6 version of smbmount goes back to the "mount
compatible" syntax like the older smbmount program used. If you use
the syntax from the 1.9.x through 2.0.4 versions of smbmount with the
2.0.6 version of smbmount, you should have gotten an error.
> -------------------------------------- !! No courtesy copies, please !! -----
> Marc Haber | " Questions are the | Mailadresse im Header
> Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
> Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
Michael H. Warfield | (770) 985-6132 | mhw at WittsEnd.com
(The Mad Wizard) | (770) 331-2437 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
More information about the samba