Bug#678408: nobind option makes autofs segfault

2012-09-24 Thread Michael Tokarev
Control: tag -1 = confirmed upstream patch

[Answering to a relatively old bugreport, so not removing context...]

On 25.06.2012 14:02, Marc Lehmann wrote:
 On Sun, Jun 24, 2012 at 10:23:24PM +0300, Michael Tokarev m...@tls.msk.ru 
 wrote:
 seems the symlink mount has also been removed - I have since switched to
 am-utils, which solves both problems, as autofs seems to be eternally
 broken.

 Can you please show the options or maps you were using with autofs?
 
 /etc/auto.master
 
   /fs /etc/maps/fs nobind
 
 /etc/maps/fs
 
   doom_db -symlink:/db
 
 That's a symlink mount - it simply creates a symlink (it can also be used
 with an nfs mount and will symlink instead of bind for normal mounts,
 thus my confusion with nobind, which I believed to do the same).

Ok.  I finally was able to reproduce this (it turned out to be not so easy :).

And even more, apparently upstream has a fix now:

commit ebc62059641517ea4d219fa1ecc17b92acef6cc0
Author: Ian Kent ik...@redhat.com
Date:   Wed Sep 12 09:09:49 2012 +0800

autofs-5.0.7 - fix nobind sun escaped map entries

If a map contains a Sun colon escape to indicate the mount is a local
file system and the nobind option is present there is no hostname in
the mount location and the mount fails.

But note: -symlink option does not exist.  There's nosymlink option,
but it is not used anymore, it is left for compatibility -- at least
as stated in comments in the code, however it actually IS used down
the line, to mean exactly the same as nobind.  So your confusion
is not without a reason.


 Yes, apparently autofs (both user and kernel space) has quite some
 bugs, but maybe it's a good idea to fix at least some of them...
 
 Right, but despite many people reporting them repeatedly, they have not
 been fixed for half a decade, so I decided it's pointless to hope for
 fixes - they are not coming to be, and upstream sometimes outright refuses
 to fix bugs (race condition on recursive mounts, see e.g. 556910). That's
 definitely not a debian problem, previous maintainers have reported bugs
 (sometimes with patches) to upstream, it's just that upstream isn't
 responsive, and bugs keep coming back.
 
 (As far as I know, the -symlink mount option was added by a previous
 debian maintainer because upstream refused to fix the underlying problem,
 and smylinks work around it nicely).

Aha.  I didn't know that.  This is actually rather bad, maybe we should
add a compatibility option too, -- because right now, when I specify
-nosymlink, it is passed to mount.nfs, and the result is, well, wrong
ofcourse.  I'll dig into that.

 The tragedy is that I so wanted to get away from amd, the menace of
 the early 90ies, but to my surprise, amd is much more stable, and even
 restarts cleanly, something I could never pull off with automount, wow,
 why didn't I switch back earlier :) I don't even need to touch every
 single mount point manually anymore after starting automount to avoid
 races!
 
 As far as I can see, the only drawback of am-utils over automount is that
 the former uses 5mb rss, and the latter 2mb. If not for that, there would
 be absolutly no reason to keep automount.
 
 So, from a purely technical perspective, the best way to fix autofs is
 to get rid of it, as am-utils now supports sun-style automount maps and
 the autofs filesystem. Ghosting doesn't work with amd and the autofs
 filesystem, but that never worked reliably with automount either.

Oh well.  But heck, we can't do that for wheezy at least :)

Now, having said all that, maybe it is a stupid idea to ask you for some
testing/comments on the new package I created, preliminary version of
stuff I want to upload, located at http://www.corpit.ru/mjt/tmp/autofs/ ?

Anyway, the bug you reported appears to be fixed now.

Thank you for your patience (or lack thereof)! :)

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-09-24 Thread Marc Lehmann
On Mon, Sep 24, 2012 at 02:27:06PM +0400, Michael Tokarev m...@tls.msk.ru 
wrote:
 Ok.  I finally was able to reproduce this (it turned out to be not so easy :).
 And even more, apparently upstream has a fix now:

Wow!

 Aha.  I didn't know that.  This is actually rather bad, maybe we should
 add a compatibility option too, -- because right now, when I specify
 -nosymlink, it is passed to mount.nfs, and the result is, well, wrong
 ofcourse.  I'll dig into that.

Well, that would be great, but I don't think that has a great future. It
tends to fall through the cracks, and is extra work, and makes debian
differ from the standard distro without good hope of getting the behaviour
in.

 Oh well.  But heck, we can't do that for wheezy at least :)

I switched to amd for most of my boxes. For the ones where I can't, I
switched to this (no kidding) to start automount:

   /usr/bin/perl -i -pe 's%/tmp/aut%\x01/\x03/\x05/\x07\x00%g' 
/usr/lib/x86_64-linux-gnu/autofs/mount_bind.so

that breaks the test for bind mounts so it thinks bind mounts do not work.
That works fine for me as I haven't found any use for bind mounts yet, but
have lots of problems (as reported, but not being able to unmount local
filesystem without ALSO taking care of automount is annoying as wlel :).

(I did consider going back to automount using this hack, because amd does
not have working multi-maps (but my config fortunately doesn't rely on
those yet), and with this hack, it works for me).

 Now, having said all that, maybe it is a stupid idea to ask you for some
 testing/comments on the new package I created, preliminary version of
 stuff I want to upload, located at http://www.corpit.ru/mjt/tmp/autofs/ ?

Well, I have the obligation to test :) I'll install it later and see if I
can replicate the test (maybe give me a few days :).

 Thank you for your patience (or lack thereof)! :)

Well, my guess is that many automount users don't have long-term patience
- they usually have to administrate a flock of boxes that just need to
work somehow :)

My primary motivation for reporting bugs is to make them known, either
for others to learn about their status when they hit the same issue, or
to get them fixed.

If I sounded like demanding a fix, then that wasn't my intention, sorry
for that!

Thanks a lot for your good work on this package!

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  schm...@schmorp.de
  -=/_/_//_/\_,_/ /_/\_\


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-09-24 Thread Michael Tokarev
On 24.09.2012 14:43, Marc Lehmann wrote:

[-symlink option apparently added by previous maintainer]

 Aha.  I didn't know that.  This is actually rather bad, maybe we should
 add a compatibility option too, -- because right now, when I specify
 -nosymlink, it is passed to mount.nfs, and the result is, well, wrong
 ofcourse.  I'll dig into that.
 
 Well, that would be great, but I don't think that has a great future. It
 tends to fall through the cracks, and is extra work, and makes debian
 differ from the standard distro without good hope of getting the behaviour
 in.

I mean, I don't want to break users' boxes like in your case
because some option is no longer recognized.  Accepting it and
doing nothing (or printing a warning) is not a big deal really.

 Oh well.  But heck, we can't do that for wheezy at least :)
 
 I switched to amd for most of my boxes. For the ones where I can't, I
 switched to this (no kidding) to start automount:
 
/usr/bin/perl -i -pe 's%/tmp/aut%\x01/\x03/\x05/\x07\x00%g' 
 /usr/lib/x86_64-linux-gnu/autofs/mount_bind.so

Wow.

 that breaks the test for bind mounts so it thinks bind mounts do not work.
 That works fine for me as I haven't found any use for bind mounts yet, but
 have lots of problems (as reported, but not being able to unmount local
 filesystem without ALSO taking care of automount is annoying as wlel :).

Well, it was meant as an optimisation.  Maybe these can also be
addressed somehow.  Note that nfs-mounts wont let you to umount
local filesystems too.  But okay.

 (I did consider going back to automount using this hack, because amd does
 not have working multi-maps (but my config fortunately doesn't rely on
 those yet), and with this hack, it works for me).

 Now, having said all that, maybe it is a stupid idea to ask you for some
 testing/comments on the new package I created, preliminary version of
 stuff I want to upload, located at http://www.corpit.ru/mjt/tmp/autofs/ ?
 
 Well, I have the obligation to test :) I'll install it later and see if I
 can replicate the test (maybe give me a few days :).

Actually you don't have any obligations here.  The thing is: you
reported a bug, and I see it is now fixed, at least here for me it
works now without segfaulting.

I was mostly asking you about any OTHER issue you may also have, since
you appears to have a good love for autofs and its issues :)

 Thank you for your patience (or lack thereof)! :)
 
 Well, my guess is that many automount users don't have long-term patience
 - they usually have to administrate a flock of boxes that just need to
 work somehow :)

I fixed it here by using static fstab entries at the end.  Annoying,
but autofs didn't fix an issue for me which I hoped it to fix.  To me
the problem was for two servers to be able to boot them in any order
without one failing because another isn't booted up yet.  One mounts
nfs share from another, so automount fixes this mount issue (when it
works ofcourse!), but these mounts are used by other software (it is
Oracle database in our case), and it fails anyway without seeing the
dirs.  So.. no difference in the end result.

 My primary motivation for reporting bugs is to make them known, either
 for others to learn about their status when they hit the same issue, or
 to get them fixed.
 
 If I sounded like demanding a fix, then that wasn't my intention, sorry
 for that!

No, you didn't sound like that, and you raised valid concerns about
overall code quality and maintenance.

Thank you!

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-09-24 Thread Marc Lehmann
On Mon, Sep 24, 2012 at 03:48:56PM +0400, Michael Tokarev m...@tls.msk.ru 
wrote:
 I mean, I don't want to break users' boxes like in your case
 because some option is no longer recognized.  Accepting it and
 doing nothing (or printing a warning) is not a big deal really.

Ahh, so your plan is to ignore it, not make it work.

  that breaks the test for bind mounts so it thinks bind mounts do not work.
  That works fine for me as I haven't found any use for bind mounts yet, but
  have lots of problems (as reported, but not being able to unmount local
  filesystem without ALSO taking care of automount is annoying as wlel :).
 
 Well, it was meant as an optimisation.  Maybe these can also be
 addressed somehow.  Note that nfs-mounts wont let you to umount
 local filesystems too.  But okay.

But bind mounts do let me unmount local filesystems, except, the umount
succeeds and the filesystem stays mounted in the automount dir. With
symlinks, I can't unmount the filesystem because it is busy.

That's ok of course, the issue is that the admin normally has the option,
except with automount.

Furthermore, this recursive bind mount issues have been fixed
countless times but always keep coming back (or keep not being fixed
completely). Symlinks just work race-free, which makes them quite sexy to
mem in addition to all the other advantages they come with :)

  Well, I have the obligation to test :) I'll install it later and see if I
  can replicate the test (maybe give me a few days :).
 
 Actually you don't have any obligations here.  The thing is: you
 reported a bug, and I see it is now fixed, at least here for me it
 works now without segfaulting.
 
 I was mostly asking you about any OTHER issue you may also have, since
 you appears to have a good love for autofs and its issues :)

I keep hitting these races and problems indeed. I'll try to see if
automount now just works with bind mounts, and keep patching it for
the other advantages of symlinks.

  - they usually have to administrate a flock of boxes that just need to
  work somehow :)
 
 I fixed it here by using static fstab entries at the end.  Annoying,
 but autofs didn't fix an issue for me which I hoped it to fix.  To me
 the problem was for two servers to be able to boot them in any order
 without one failing because another isn't booted up yet.  One mounts
 nfs share from another, so automount fixes this mount issue (when it
 works ofcourse!), but these mounts are used by other software (it is
 Oracle database in our case), and it fails anyway without seeing the
 dirs.  So.. no difference in the end result.

I don't know in which order debian does things these days (I don't sue
it's init system), but I found that things work much more smoothly if NFS
exports are done _before_ the network goes up (and conmversely, are not
unexported until the network is gone).  Combined with long enough timeouts
for any boots, could that work for you? (I probably don't fully understand
your issue, so I may be utterly wrong :).

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  schm...@schmorp.de
  -=/_/_//_/\_,_/ /_/\_\


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-06-25 Thread Marc Lehmann
On Sun, Jun 24, 2012 at 10:23:24PM +0300, Michael Tokarev m...@tls.msk.ru 
wrote:
 seems the symlink mount has also been removed - I have since switched to
 am-utils, which solves both problems, as autofs seems to be eternally
 broken.
 
 Can you please show the options or maps you were using with autofs?

/etc/auto.master

  /fs /etc/maps/fs nobind

/etc/maps/fs

  doom_db -symlink:/db

That's a symlink mount - it simply creates a symlink (it can also be used
with an nfs mount and will symlink instead of bind for normal mounts,
thus my confusion with nobind, which I believed to do the same). It also
happens with a normal mount:

   rain-vers=3,intr,tcp,rsize=1048576,wsize=1048576rain:/

As long as it is local, apparently.

 Yes, apparently autofs (both user and kernel space) has quite some
 bugs, but maybe it's a good idea to fix at least some of them...

Right, but despite many people reporting them repeatedly, they have not
been fixed for half a decade, so I decided it's pointless to hope for
fixes - they are not coming to be, and upstream sometimes outright refuses
to fix bugs (race condition on recursive mounts, see e.g. 556910). That's
definitely not a debian problem, previous maintainers have reported bugs
(sometimes with patches) to upstream, it's just that upstream isn't
responsive, and bugs keep coming back.

(As far as I know, the -symlink mount option was added by a previous
debian maintainer because upstream refused to fix the underlying problem,
and smylinks work around it nicely).

The tragedy is that I so wanted to get away from amd, the menace of
the early 90ies, but to my surprise, amd is much more stable, and even
restarts cleanly, something I could never pull off with automount, wow,
why didn't I switch back earlier :) I don't even need to touch every
single mount point manually anymore after starting automount to avoid
races!

As far as I can see, the only drawback of am-utils over automount is that
the former uses 5mb rss, and the latter 2mb. If not for that, there would
be absolutly no reason to keep automount.

So, from a purely technical perspective, the best way to fix autofs is
to get rid of it, as am-utils now supports sun-style automount maps and
the autofs filesystem. Ghosting doesn't work with amd and the autofs
filesystem, but that never worked reliably with automount either.

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  schm...@schmorp.de
  -=/_/_//_/\_,_/ /_/\_\



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-06-24 Thread Michael Tokarev

notfound 678408 4.1.4+debian-3
found 678408 5.0.6-2
tags 678408 + moreinfo
thanks

24.06.2012 3:35, Marc Lehmann wrote:

On Fri, Jun 22, 2012 at 09:05:17PM +0300, Michael Tokarevm...@tls.msk.ru  
wrote:

21.06.2012 17:24, Marc Lehmann wrote:

Package: autofs
Version: 4.1.4+debian-3


Really?


No, sorrry, 5.0.6-2, but I couldn't easily run reportbug on that machine
(due to autofs failing).


Oh okay.  Re-versioning accordingly.


Upgrading from what to what?


4.1.4+debian-3 to 5.0.6-2.

seems the symlink mount has also been removed - I have since switched to
am-utils, which solves both problems, as autofs seems to be eternally
broken.


Can you please show the options or maps you were using with autofs?
Yes, apparently autofs (both user and kernel space) has quite some
bugs, but maybe it's a good idea to fix at least some of them...

Besides, I don't even know what's symlink mount.

Thanks,

/mjt




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-06-23 Thread Marc Lehmann
On Fri, Jun 22, 2012 at 09:05:17PM +0300, Michael Tokarev m...@tls.msk.ru 
wrote:
 21.06.2012 17:24, Marc Lehmann пишет:
 Package: autofs
 Version: 4.1.4+debian-3
 
 Really?

No, sorrry, 5.0.6-2, but I couldn't easily run reportbug on that machine
(due to autofs failing).

 after upgrading, accessing automount-mountpoints make automount segfault:
 
 Upgrading from what to what?

4.1.4+debian-3 to 5.0.6-2.

seems the symlink mount has also been removed - I have since switched to
am-utils, which solves both problems, as autofs seems to be eternally
broken.

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  schm...@schmorp.de
  -=/_/_//_/\_,_/ /_/\_\



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-06-22 Thread Michael Tokarev

21.06.2012 17:24, Marc Lehmann пишет:

Package: autofs
Version: 4.1.4+debian-3


Really?


Severity: important


after upgrading, accessing automount-mountpoints make automount segfault:


Upgrading from what to what?

Thanks,

/mjt



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678408: nobind option makes autofs segfault

2012-06-21 Thread Marc Lehmann
Package: autofs
Version: 4.1.4+debian-3
Severity: important


after upgrading, accessing automount-mountpoints make automount segfault:

   automount[6339]: segfault at 8 ip 7f4d2c71b701 sp 7f4d2d81c3f8 error 
4 in libc-2.13.so[7f4d2c69f000+17a000]

the apparent reason is the use of the nobind option in auto.master:

   /fs /etc/maps/fsnobind

removing that option makes the segfault go away, but of course makes
automount use bind mounts again, which of course have very undesirable
consequences (can't unmount those filesystems easily anymore, races when
symlinks ahve multiple references to /fs etc.).

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages autofs depends on:
hi  libc62.13-23 Embedded GNU C Library: Shared lib
ii  ucf  3.0025+nmu1 Update Configuration File: preserv

Versions of packages autofs recommends:
ii  module-init-tools 3.12-1 tools for managing Linux kernel mo
ii  nfs-common1:1.2.2-4  NFS support files common to client

autofs suggests no packages.

-- Configuration Files:
/etc/init.d/autofs [Errno 2] No such file or directory: u'/etc/init.d/autofs'

-- debconf information excluded



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org