Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340761 - net-fs/autofs-5.0.4 and 5.0.5 do not remove ghost entries upon SIGHUP
Summary: net-fs/autofs-5.0.4 and 5.0.5 do not remove ghost entries upon SIGHUP
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 346537
Blocks:
  Show dependency tree
 
Reported: 2010-10-12 21:21 UTC by Faustus
Modified: 2011-04-03 09:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Faustus 2010-10-12 21:21:27 UTC
If this is an upstream issue, I think it's best to be handled by for someone more familiar with reporting issues on the kernel mailing list. But I am not sure if it's not due to the specific set of patches applied by Gentoo.

autofs 5.0.3-r6 doesn't have the bug, but 5.0.4-r5 and ~5.0.5 do.

In auto.master, put
  /mnt/test  /etc/auto.test  --ghost

In auto.test, put
  floppy -fstype=auto :/dev/fd0
(or anything else, really)

Start autofs, observe /mnt/test/floppy, send SIGHUP to automount (/etc/init.d/autofs reload) - /mnt/test/floppy is not gone.

This is problematic when auto.test is maintained via udev (autofs needs to be restarted after disks are disconnected).
Comment 1 Faustus 2010-10-12 21:23:10 UTC
> send SIGHUP to automount (/etc/init.d/autofs reload)

Sorry, meant - send SIGHUP after commenting out the line in auto.test.
Comment 2 Dustin Polke 2010-10-13 09:19:59 UTC
(In reply to comment #1)
> > send SIGHUP to automount (/etc/init.d/autofs reload)
> 
> Sorry, meant - send SIGHUP after commenting out the line in auto.test.

This kind of confuses me... Do you start up autofs and then comment out the entry in auto.test and after restarting autofs (either by /etc/init.d/autofs restart or sending SIGHUP) the entry in /mnt/test is gone?

Could you please clarify this and give a clear set of instruction how to reproduce this?
At the moment, I think this not as a bug. But this might be due my confusion...
Comment 3 Faustus 2010-10-13 13:54:58 UTC
> Do you start up autofs and then comment out the
entry in auto.test and after restarting autofs (either by /etc/init.d/autofs
restart or sending SIGHUP) the entry in /mnt/test is gone?

The entry in /mnt/test should be gone after SIGHUP, but it is not gone in autofs >= 5.0.4.

> Could you please clarify this and give a clear set of instruction how to
reproduce this?

Sure, the steps are:
1. put "/mnt/test /etc/auto.test --ghost" in auto.master
2. put "floppy -fstype=auto :/dev/fd0" in auto.test
3. start autofs (/etc/init.d/autofs start)
4. see that /mnt/test/floppy exists
5. comment out the line in auto.test
6. send SIGHUP to autofs (/etc/init.d/autofs reload)
7. see that /mnt/test/floppy *still* exists (it shouldn't, as far as I understand)

Think about implementing automatic creation and removal of ghost mount points on top of udev. With autofs >= 5.0.4, you have to do a full "/etc/init.d/autofs restart" at step 6, which is ugly and error-prone.

Thanks!
Comment 4 Faustus 2010-10-17 15:35:20 UTC
Hi, any news? Is it indeed a bug in autofs?
Comment 5 Faustus 2011-01-14 07:27:35 UTC
Apparently, a fix for 5.0.5 will be added to the patchset:
http://linux.kernel.org/pipermail/autofs/2011-January/006324.html
Comment 6 Dustin Polke 2011-01-14 08:44:19 UTC
(In reply to comment #5)
> Apparently, a fix for 5.0.5 will be added to the patchset:
> http://linux.kernel.org/pipermail/autofs/2011-January/006324.html

Thanks. I added this patch to the rev bumped ebuild which hopefully will be in tree soon (see bug #346537).
You can use that ebuild in your local overlay until it hits the tree.

BR,
Dustin
Comment 7 Peter Volkov (RETIRED) gentoo-dev 2011-04-03 09:54:18 UTC
Fixed in 5.0.5-r1.