"ignore" mount option set for autofs is not observed

Bug #1978426 reported by Maarten Jacobs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autofs (Ubuntu)
Incomplete
Undecided
Unassigned
thunar (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I am thinking autofs is not the right package for this, but the behavior is related to it.

I have various NFS mounts configured with autofs, and invariably all of these mounts are reported twice by 'mount' as well as 'gio mount -l'. Similarly my file manager (Thunar) also shows these mounts twice.

When I run 'mount', I see the same mount twice:

/etc/auto.<redacted> on /home/<redacted>/Documents type autofs (rw,relatime,fd=7,pgrp=11462,timeout=300,minproto=5,maxproto=5,direct,ignore,pipe_ino=167388)
<redacted>:/storage/Documents on /home/<redacted>/Documents type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=<redacted>,local_lock=none,addr=<redacted>)

I've anonymized the entries a bit. The first entry is created when the master map is read, the second one is the "actual" NFS mount (created when I access the mount point).

I've enabled "use_ignore_mount_option" in my autofs.conf - not quite sure if that's what caused the "ignore" option to be included on the autofs entry. But "ignore" is on the autofs line, and by the description of that option, it should cause user space applications to ignore the mount. Which apparently isn't happening.

Hence my earlier statement that I don't think autofs is the problem - I think it's doing what it's supposed to - but the other applications are not observing the mount option.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: autofs 5.1.6-2ubuntu0.1
ProcVersionSignature: Ubuntu 5.4.0-117.132-generic 5.4.189
Uname: Linux 5.4.0-117-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Sun Jun 12 21:43:36 2022
InstallationDate: Installed on 2013-05-04 (3326 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
SourcePackage: autofs
UpgradeStatus: Upgraded to focal on 2022-03-18 (86 days ago)

Revision history for this message
Maarten Jacobs (maarten256) wrote :
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to report this bug and trying to make Ubuntu better.

Have you experienced the same behavior with others user space applications? As you mentioned, this does not seem a autofs bug, but those apps not properly handling this option.

I added a task for Thunar since this is the app you mentioned.

Revision history for this message
Maarten Jacobs (maarten256) wrote :

Sorry for the delayed reply - couldn't get back to this sooner.

Other than "mount" and "gio mount" that I already mentioned, I also see the same effect in Chrome (the dialog that opens when I do a "save as" on a webpage. I also see the same thing in Eclipse, although by appearance it uses the same dialog as Chrome does.

I'm still looking for other examples - I don't have any file managers other than Thunar installed.

I can report that the same effect is also present on my Raspberry Pi - running Raspberry Pi Os (aka debian) - so I don't think the problem is unique to Ubuntu.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Since this seems to be a pattern among all those apps, I believe this should be reported to the upstream projects. TBH I do not see much we can do as downstream of those projects.

Revision history for this message
Maarten Jacobs (maarten256) wrote :

That sounds fair. What needs to happen to raise this problem up?

As an aside, I was surprised today. I found I had a different machine running an older release (18.04/Bionic) which did not show the problem. I upgraded it to 20.04/Focal and the problem appeared. Something fundamental seems to have changed somewhere along the line.

Revision history for this message
Paride Legovini (paride) wrote :

On Bionic does mount honor the ignore mount flag? I kind of expect it doesn't, being a lower level tool. What about `gio mount -l`? If there's a difference in behavior in `gio mount` then the bug could be in glib (src:glib2.0), and it's visible via thunar, chrome, elipse because they use gvfs, which in turn uses glib.

This is kind of a wild guess; more in general the underlying idea is that an lower level component stopped honoring the ignore mount option, and I don't believe that's the kernel.

I'm marking the autofs and thunar tasks as Incomplete for now, as we're not really sure of what's going on.

Changed in autofs (Ubuntu):
status: New → Incomplete
Changed in thunar (Ubuntu):
status: New → Incomplete
Revision history for this message
Maarten Jacobs (maarten256) wrote :

I now have a few machines on different releases (18.04, 20.04, 22.04) so I can compare.

On 18.04:
Output from mount:
/etc/auto.<redacted> on /home/<redacted>/Documents type autofs (rw,relatime,fd=6,pgrp=1323,timeout=300,minproto=5,maxproto=5,direct,pipe_ino=27955)
<redacted>:/<redacted>/Documents on /home/<redacted>/Documents type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=<redacted>,local_lock=none,addr=<redacted>)

Output from gio mount -l:
Drive(0): SanDisk SDSSDA120G
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Drive(1): TSSTcorpCD-ROM TS-L162C
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Mount(0): Documents -> file:///home/<redacted>/Documents
  Type: GProxyMount (GProxyVolumeMonitorUDisks2)

On 22.04:
Output from mount:
/etc/auto.<redacted> on /home/<redacted>/Documents type autofs (rw,relatime,fd=6,pgrp=1048,timeout=300,minproto=5,maxproto=5,direct,pipe_ino=28209)
<redacted>:/<redacted>/Documents on /home/<redacted>/Documents type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=<redacted>,local_lock=none,addr=<redacted>)

Output from gio mount -l:
Drive(0): SSD2SC120G1SA754D117-820
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Mount(4): Documents -> file:///home/jacobsma/Documents
  Type: GProxyMount (GProxyVolumeMonitorUDisks2)
Mount(5): Documents -> file:///home/jacobsma/Documents
  Type: GProxyMount (GProxyVolumeMonitorUDisks2)

gio mount does show the same mount twice on 22.04, but only once on 18.04. Oddly enough, the "ignore" mount option isn't set on either, so while I thought that might be related to this problem perhaps it isn't.

Should this bug be assigned to glibc (as you suggested), and the title should be updated since the ignore mount option doesn't seem to matter?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for autofs (Ubuntu) because there has been no activity for 60 days.]

Changed in autofs (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for thunar (Ubuntu) because there has been no activity for 60 days.]

Changed in thunar (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Paride Legovini (paride) wrote :

I'm setting this back to Incomplete, but I think what we need here is a minimal set of steps to reproduce the issue on a clean Ubuntu system. Something like steps to setup loopback NFS mounts in Bionic and Focal LXD containers, bringing to duplicate `gio mount -l` entries on the Focal container.

Is Jammy still affected?

Thanks

Changed in autofs (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Paride Legovini (paride) wrote :

Setting the Importance to Low as the user impact appears to be low.

Revision history for this message
Maarten Jacobs (maarten256) wrote :

Hello,

I can confirm that as of today, the problem still occurs on Jammy. I've attached a screenshot of the effect.

I didn't have any experience with LXD/LXC so spent most of my day yesterday trying to get that working. Some results from that endeavor:
- I had been using "gio mount -l" from the command line to check the behavior when I created this bug. As I found out yesterday though, gio mount -l on Jammy doesn't return *anything* at all. So for now I do not have a way to test the behavior on Jammy since gio appears to have changed/been broken (gio version 2.27.1).
- The observed behavior *only* appears with NFS mounts (or perhaps network mounts other than NFS too, but I've no way to verify that). Local mounts on the filesystem are fine (refer to the attached screenshot). It will not be possible to reproduce this behavior without an NFS share to mount.

Revision history for this message
Maarten Jacobs (maarten256) wrote :

I'm attaching a document that details the steps to recreate the behavior in LXC containers, as well as my observations for each of the versions (Bionic, Focal, Jammy). I'll collect a few screenshots of Nautilus that shows what it looks like for each of the versions and add that later.

Even without the screenshots this should be ample information for somebody to investigate in more detail.

There are differences in how gio (and as a result perhaps other applications) interpret the "autofs" filesystem type that is created for autofs mounts. Whereas on Bionic gio doesn't report the autofs mount, it is reported by gio on Focal and Jammy. Thus, when the filesystem is actually mounted, you end up with two mounts reported by gio (albeit each of a slightly different type).

Doesn't look like autofs is doing anything different but what gio reports is definitely different.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.